From fcad73edbfe225a53f8f1a473e3029834697e362 Mon Sep 17 00:00:00 2001 From: Chandra shekar Varkala Date: Thu, 11 Jan 2024 14:28:59 -0600 Subject: [PATCH] chore: tc corrections --- .../active_campaign/router/data.ts | 136 +- .../destinations/adj/processor/data.ts | 49 +- .../destinations/adj/router/data.ts | 176 +- .../destinations/af/router/data.ts | 12 +- .../destinations/airship/router/data.ts | 182 +- .../destinations/algolia/router/data.ts | 244 +- .../destinations/am/batch/data.ts | 1130 +- .../destinations/am/router/data.ts | 101 +- .../destinations/appcues/router/data.ts | 107 +- .../destinations/attentive_tag/router/data.ts | 60 +- .../destinations/autopilot/router/data.ts | 132 +- .../destinations/blueshift/router/data.ts | 74 +- .../destinations/branch/router/data.ts | 111 +- .../destinations/braze/router/data.ts | 220 +- .../campaign_manager/router/data.ts | 115 +- .../destinations/candu/router/data.ts | 39 +- .../clevertap/dataDelivery/data.ts | 401 +- .../destinations/clevertap/network.ts | 3 +- .../destinations/clevertap/router/data.ts | 71 +- .../destinations/clickup/network.ts | 486 +- .../destinations/clickup/processor/data.ts | 1645 +- .../destinations/clickup/router/data.ts | 750 +- .../destinations/courier/router/data.ts | 56 +- .../criteo_audience/dataDelivery/data.ts | 906 +- .../criteo_audience/router/data.ts | 39 +- .../destinations/custify/network.ts | 66 +- .../destinations/custify/processor/data.ts | 1365 +- .../destinations/custify/router/data.ts | 423 +- .../destinations/customerio/router/data.ts | 152 +- .../destinations/delighted/network.ts | 54 +- .../destinations/delighted/processor/data.ts | 1882 +- .../destinations/delighted/router/data.ts | 346 +- .../destinations/discord/router/data.ts | 124 +- .../destinations/drip/processor/data.ts | 2983 ++- .../destinations/drip/router/data.ts | 373 +- .../destinations/engage/router/data.ts | 127 +- .../facebook_conversions/router/data.ts | 180 +- .../router/data.ts | 549 +- .../facebook_pixel/router/data.ts | 189 +- .../destinations/fb/router/data.ts | 120 +- .../fb_custom_audience/router/data.ts | 286 +- .../destinations/freshmarketer/network.ts | 956 +- .../freshmarketer/processor/data.ts | 6275 +++-- .../destinations/freshmarketer/router/data.ts | 635 +- .../destinations/freshsales/network.ts | 955 +- .../destinations/freshsales/processor/data.ts | 5354 ++--- .../destinations/freshsales/router/data.ts | 336 +- .../destinations/ga/processor/data.ts | 20007 ++++++++-------- .../destinations/ga/router/data.ts | 818 +- .../destinations/ga360/processor/data.ts | 18851 ++++++++------- .../destinations/ga360/router/data.ts | 818 +- .../destinations/gainsight/network.ts | 124 +- .../destinations/gainsight/processor/data.ts | 1947 +- .../destinations/gainsight/router/data.ts | 863 +- .../destinations/gainsight_px/network.ts | 420 +- .../destinations/gainsight_px/router/data.ts | 147 +- .../gcs_datalake/processor/data.ts | 377 +- .../destinations/gladly/router/data.ts | 242 +- .../router/data.ts | 101 +- .../dataDelivery/data.ts | 1438 +- .../router/data.ts | 200 +- .../router/data.ts | 46 +- .../google_cloud_function/router/data.ts | 218 +- .../destinations/googlesheets/router/data.ts | 373 +- .../destinations/heap/router/data.ts | 352 +- .../destinations/hs/router/data.ts | 943 +- .../destinations/impact/router/data.ts | 112 +- .../destinations/indicative/router/data.ts | 86 +- .../intercom/dataDelivery/data.ts | 161 +- .../destinations/intercom/network.ts | 1 + .../destinations/intercom/router/data.ts | 60 +- .../destinations/iterable/router/data.ts | 246 +- .../destinations/june/router/data.ts | 64 +- .../destinations/kafka/batch/data.ts | 343 +- .../destinations/keen/router/data.ts | 112 +- .../destinations/kissmetrics/router/data.ts | 54 +- .../destinations/klaviyo/network.ts | 128 +- .../destinations/klaviyo/processor/data.ts | 4821 ++-- .../destinations/klaviyo/router/data.ts | 181 +- .../destinations/kustomer/router/data.ts | 99 +- .../destinations/lambda/router/data.ts | 210 +- .../destinations/leanplum/router/data.ts | 132 +- .../destinations/lemnisk/router/data.ts | 95 +- .../destinations/lytics/router/data.ts | 92 +- .../destinations/mailchimp/router/data.ts | 266 +- .../destinations/mailjet/router/data.ts | 24 +- .../destinations/mailmodo/router/data.ts | 147 +- .../destinations/marketo/router/data.ts | 1142 +- .../marketo_bulk_upload/processor/data.ts | 1002 +- .../marketo_static_list/dataDelivery/data.ts | 617 +- .../marketo_static_list/router/data.ts | 3290 ++- .../destinations/mautic/router/data.ts | 58 +- .../destinations/moengage/router/data.ts | 80 +- .../destinations/monday/router/data.ts | 62 +- .../destinations/monetate/router/data.ts | 136 +- .../destinations/mp/router/data.ts | 885 +- .../destinations/ometria/router/data.ts | 49 +- .../destinations/one_signal/router/data.ts | 100 +- .../optimizely_fullstack/router/data.ts | 241 +- .../destinations/ortto/router/data.ts | 167 +- .../destinations/pagerduty/router/data.ts | 76 +- .../destinations/pardot/router/data.ts | 329 +- .../destinations/persistiq/router/data.ts | 21 +- .../destinations/pinterest_tag/router/data.ts | 859 +- .../destinations/pipedream/router/data.ts | 133 +- .../destinations/posthog/router/data.ts | 74 +- .../destinations/profitwell/router/data.ts | 22 +- .../destinations/reddit/router/data.ts | 158 +- .../destinations/refiner/router/data.ts | 62 +- .../revenue_cat/processor/data.ts | 2160 +- .../destinations/rockerbox/processor/data.ts | 1493 +- .../destinations/rockerbox/router/data.ts | 112 +- .../destinations/salesforce/router/data.ts | 108 +- .../destinations/segment/processor/data.ts | 1343 +- .../destinations/sendgrid/router/data.ts | 55 +- .../destinations/sendinblue/router/data.ts | 136 +- .../destinations/serenytics/router/data.ts | 84 +- .../destinations/signl4/router/data.ts | 78 +- .../destinations/singular/router/data.ts | 309 +- .../destinations/slack/processor/data.ts | 3993 ++- .../destinations/slack/router/data.ts | 124 +- .../snapchat_conversion/router/data.ts | 221 +- .../dataDelivery/data.ts | 368 +- .../processor/data.ts | 2753 +-- .../snapchat_custom_audience/router/data.ts | 37 +- .../destinations/splitio/processor/data.ts | 1818 +- .../destinations/splitio/router/data.ts | 93 +- .../destinations/stormly/router/data.ts | 73 +- .../the_trade_desk/router/data.ts | 432 +- .../destinations/tiktok_ads/processor/data.ts | 4 +- .../destinations/tiktok_ads/router/data.ts | 373 +- .../processor/data.ts | 1233 +- .../tiktok_ads_offline_events/router/data.ts | 135 +- .../tiktok_audience/processor/data.ts | 1568 +- .../tiktok_audience/router/data.ts | 229 +- .../destinations/trengo/router/data.ts | 205 +- .../destinations/user/router/data.ts | 40 +- .../destinations/vero/processor/data.ts | 1624 +- .../destinations/vero/router/data.ts | 146 +- .../destinations/webhook/router/data.ts | 153 +- .../destinations/woopra/router/data.ts | 138 +- .../destinations/wootric/network.ts | 347 +- .../destinations/wootric/processor/data.ts | 3675 ++- .../destinations/wootric/router/data.ts | 3005 +-- .../destinations/yahoo_dsp/router/data.ts | 20 +- .../destinations/zendesk/router/data.ts | 80 +- 146 files changed, 68605 insertions(+), 56417 deletions(-) diff --git a/test/integrations/destinations/active_campaign/router/data.ts b/test/integrations/destinations/active_campaign/router/data.ts index f65a65d9bc..782d1e3379 100644 --- a/test/integrations/destinations/active_campaign/router/data.ts +++ b/test/integrations/destinations/active_campaign/router/data.ts @@ -18,7 +18,9 @@ export const data = [ eventKey: 'f8a866fddc721350fdc2fbbd2e5c43a6dddaaa03', }, }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, message: { channel: 'web', context: { @@ -28,13 +30,21 @@ 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 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', locale: 'en-US', ip: '0.0.0.0', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, }, messageId: '84e26acc-56a5-4835-8233-591137fca468', session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', @@ -56,9 +66,18 @@ export const data = [ Random: 'random', }, lists: [ - { id: 2, status: 'subscribe' }, - { id: 3, status: 'unsubscribe' }, - { id: 3, status: 'unsubscribexyz' }, + { + id: 2, + status: 'subscribe', + }, + { + id: 3, + status: 'unsubscribe', + }, + { + id: 3, + status: 'unsubscribexyz', + }, ], address: { city: 'kolkata', @@ -68,7 +87,9 @@ export const data = [ street: '', }, }, - integrations: { All: true }, + integrations: { + All: true, + }, sentAt: '2019-10-14T09:03:22.563Z', }, }, @@ -96,10 +117,22 @@ export const data = [ lastName: 'Doe', phone: '92374162212', fieldValues: [ - { field: '0', value: 'Trastkiv' }, - { field: '1', value: 'Russia' }, - { field: '3', value: '||Potato||Onion||' }, - { field: '4', value: 'random' }, + { + field: '0', + value: 'Trastkiv', + }, + { + field: '1', + value: 'Russia', + }, + { + field: '3', + value: '||Potato||Onion||', + }, + { + field: '4', + value: 'random', + }, ], }, }, @@ -108,11 +141,18 @@ export const data = [ files: {}, method: 'POST', params: {}, - headers: { 'Api-Token': 'dummyApiToken', 'Content-Type': 'application/json' }, + headers: { + 'Api-Token': 'dummyApiToken', + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://active.campaigns.rudder.com/api/3/contact/sync', }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { @@ -148,7 +188,9 @@ export const data = [ eventKey: 'f8a866fddc721350fdc2fbbd2e5c43a6dddaaa03', }, }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, message: { channel: 'web', context: { @@ -158,13 +200,24 @@ export const data = [ namespace: 'com.rudderlabs.javascript', version: '1.0.0', }, - traits: { email: 'jamesDoe@gmail.com', anonymousId: '12345' }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + traits: { + email: 'jamesDoe@gmail.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 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, }, request_ip: '1.1.1.1', type: 'page', @@ -181,7 +234,9 @@ export const data = [ title: 'Test Page', url: 'https://www.rudderlabs.com', }, - integrations: { All: true }, + integrations: { + All: true, + }, sentAt: '2019-10-14T11:15:53.296Z', }, }, @@ -202,17 +257,28 @@ export const data = [ XML: {}, FORM: {}, JSON_ARRAY: {}, - JSON: { siteTrackingDomain: { name: 'rudderlabs.com' } }, + JSON: { + siteTrackingDomain: { + name: 'rudderlabs.com', + }, + }, }, type: 'REST', files: {}, method: 'POST', params: {}, - headers: { 'Api-Token': 'dummyApiToken', 'Content-Type': 'application/json' }, + headers: { + 'Api-Token': 'dummyApiToken', + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://active.campaigns.rudder.com/api/3/siteTrackingDomains', }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { @@ -246,7 +312,10 @@ export const data = [ sentAt: '2023-01-10T22:31:10.954Z', channel: 'web', context: { - os: { name: '', version: '' }, + os: { + name: '', + version: '', + }, app: { name: 'RudderLabs JavaScript SDK', build: '1.0.0', @@ -273,7 +342,10 @@ export const data = [ innerHeight: 782, }, traits: {}, - library: { name: 'RudderLabs JavaScript SDK', version: '2.20.0' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '2.20.0', + }, campaign: {}, sessionId: 1673389635049, userAgent: @@ -297,7 +369,9 @@ export const data = [ receivedAt: '2023-01-10T22:31:11.612Z', request_ip: '0.0.0.20', anonymousId: '878e8f5f-9b6c-4aef-b5d3-1b970a13f17a', - integrations: { All: true }, + integrations: { + All: true, + }, originalTimestamp: '2023-01-10T22:31:10.943Z', }, destination: { @@ -308,7 +382,9 @@ export const data = [ eventKey: 'f8a866fddc721350fdc2fbbd2e5c43a6dddaaa03', }, }, - metadata: { jobId: 5, userId: 'u1' }, + metadata: { + jobId: 5, + }, }, ], destType: 'active_campaign', @@ -332,7 +408,11 @@ export const data = [ module: 'destination', }, statusCode: 400, - metadata: [{ jobId: 5, userId: 'u1' }], + metadata: [ + { + jobId: 5, + }, + ], batched: false, destination: { Config: { diff --git a/test/integrations/destinations/adj/processor/data.ts b/test/integrations/destinations/adj/processor/data.ts index e28a25cf59..2c208d0d08 100644 --- a/test/integrations/destinations/adj/processor/data.ts +++ b/test/integrations/destinations/adj/processor/data.ts @@ -2179,8 +2179,7 @@ export const data = [ status: 200, body: [ { - error: - 'App Token is not present. Please configure your app token from config dashbaord', + error: 'App Token is not present. Please configure your app token from config dashbaord', statTags: { destType: 'ADJ', errorCategory: 'dataValidation', @@ -2206,24 +2205,24 @@ export const data = [ body: [ { message: { - type: 'track', - event: 'Application Installed', - sentAt: '2022-09-28T20:14:44.995Z', - userId: 'sample_user_id', - context: { - device: { - id: 'sample_device_id', - type: 'android', - advertisingId: '_sample', - }, - traits: { - userId: '_sample_uid', - anonymousId: '_sample_anonid', + "type": "track", + "event": "Application Installed", + "sentAt": "2022-09-28T20:14:44.995Z", + "userId": "sample_user_id", + "context": { + "device": { + "id": "sample_device_id", + "type": "android", + "advertisingId": "_sample" }, - }, - timestamp: '2022-09-28T20:14:43.314Z', - request_ip: '71.189.106.156', - originalTimestamp: '2022-09-28T20:14:44.995Z', + "traits": { + "userId": "_sample_uid", + "anonymousId": "_sample_anonid" + } + }, + "timestamp": "2022-09-28T20:14:43.314Z", + "request_ip": "71.189.106.156", + "originalTimestamp": "2022-09-28T20:14:44.995Z" }, destination: { ID: '1i3Em7GMU9xVEiDlZUN8c88BMS9', @@ -2246,7 +2245,8 @@ export const data = [ }, Config: { appToken: 'testAppToken', - customMappings: [{ from: 'Application Installed', to: '3fdmll' }], + customMappings: [ + { from: 'Application Installed', to: '3fdmll' }], partnerParamsKeys: [ { from: 'key1', to: 'partnerParamKey-1' }, { from: 'key2', to: 'partnerParamKey-2' }, @@ -2277,10 +2277,10 @@ export const data = [ endpoint: 'https://s2s.adjust.com/event', headers: { Accept: '*/*' }, params: { - event_token: '3fdmll', - ip_address: '71.189.106.156', + event_token: "3fdmll", + ip_address: "71.189.106.156", android_id: 'sample_device_id', - gps_adid: '_sample', + gps_adid: "_sample", s2s: 1, app_token: 'testAppToken', environment: 'production', @@ -2294,5 +2294,4 @@ export const data = [ ], }, }, - }, -]; + },]; diff --git a/test/integrations/destinations/adj/router/data.ts b/test/integrations/destinations/adj/router/data.ts index 22c4e899d2..c662d7b557 100644 --- a/test/integrations/destinations/adj/router/data.ts +++ b/test/integrations/destinations/adj/router/data.ts @@ -30,26 +30,57 @@ export const data = [ type: 'Android', attTrackingStatus: 3, }, - library: { name: 'com.rudderstack.android.sdk.core', version: '1.0.6' }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.6', + }, locale: 'en-US', - network: { bluetooth: false, carrier: 'Android', cellular: true, wifi: true }, - os: { name: 'Android', version: '9' }, - screen: { density: 420, height: 1794, width: 1080 }, + network: { + bluetooth: false, + carrier: 'Android', + cellular: true, + wifi: true, + }, + os: { + name: 'Android', + version: '9', + }, + screen: { + density: 420, + height: 1794, + width: 1080, + }, timezone: 'Asia/Kolkata', - traits: { anonymousId: '21e13f4bc7ceddad' }, + traits: { + anonymousId: '21e13f4bc7ceddad', + }, userAgent: 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', }, event: 'First Investment', - integrations: { All: true }, + integrations: { + All: true, + }, messageId: '1601322811899-d9c7dd00-50dc-4364-95c8-e89423eb3cfb', originalTimestamp: '2020-09-28T19:53:31.900Z', properties: { currency: 'EUR', key1: 'value1', key2: 'value2', - key3: { k4: 'v4', k5: { k6: 'v6' } }, - key5: [{ k: 'v1' }, { k: 'v2' }], + key3: { + k4: 'v4', + k5: { + k6: 'v6', + }, + }, + key5: [ + { + k: 'v1', + }, + { + k: 'v2', + }, + ], revenue: 20.37566, }, receivedAt: '2020-09-29T14:50:43.005+05:30', @@ -58,7 +89,9 @@ export const data = [ timestamp: '2020-09-29T14:50:29.907+05:30', type: 'track', }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, destination: { ID: '1i3Em7GMU9xVEiDlZUN8c88BMS9', Name: 'ADJ', @@ -81,8 +114,14 @@ export const data = [ Config: { appToken: 'testAppToken', customMappings: [ - { from: 'Application Installed', to: '3fdmll' }, - { from: 'First Investment', to: 'testEventToken' }, + { + from: 'Application Installed', + to: '3fdmll', + }, + { + from: 'First Investment', + to: 'testEventToken', + }, ], environment: true, }, @@ -108,7 +147,9 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://s2s.adjust.com/event', - headers: { Accept: '*/*' }, + headers: { + Accept: '*/*', + }, params: { callback_params: '{"key1":"value1","key2":"value2","key3.k4":"v4","key3.k5.k6":"v6","key5[0].k":"v1","key5[1].k":"v2"}', @@ -124,11 +165,20 @@ export const data = [ event_token: 'testEventToken', environment: 'production', }, - body: { JSON: {}, XML: {}, JSON_ARRAY: {}, FORM: {} }, + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, files: {}, userId: '21e13f4bc7ceddad', }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { @@ -153,8 +203,14 @@ export const data = [ Config: { appToken: 'testAppToken', customMappings: [ - { from: 'Application Installed', to: '3fdmll' }, - { from: 'First Investment', to: 'testEventToken' }, + { + from: 'Application Installed', + to: '3fdmll', + }, + { + from: 'First Investment', + to: 'testEventToken', + }, ], environment: true, }, @@ -199,26 +255,57 @@ export const data = [ type: 'ios', attTrackingStatus: 3, }, - library: { name: 'com.rudderstack.android.sdk.core', version: '1.0.6' }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.6', + }, locale: 'en-US', - network: { bluetooth: false, carrier: 'Android', cellular: true, wifi: true }, - os: { name: 'Android', version: '9' }, - screen: { density: 420, height: 1794, width: 1080 }, + network: { + bluetooth: false, + carrier: 'Android', + cellular: true, + wifi: true, + }, + os: { + name: 'Android', + version: '9', + }, + screen: { + density: 420, + height: 1794, + width: 1080, + }, timezone: 'Asia/Kolkata', - traits: { anonymousId: '21e13f4bc7ceddad' }, + traits: { + anonymousId: '21e13f4bc7ceddad', + }, userAgent: 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', }, event: 'First Investment', - integrations: { All: true }, + integrations: { + All: true, + }, messageId: '1601322811899-d9c7dd00-50dc-4364-95c8-e89423eb3cfb', originalTimestamp: '2020-09-28T19:53:31.900Z', properties: { currency: 'EUR', key1: 'value1', key2: 'value2', - key3: { k4: 'v4', k5: { k6: 'v6' } }, - key5: [{ k: 'v1' }, { k: 'v2' }], + key3: { + k4: 'v4', + k5: { + k6: 'v6', + }, + }, + key5: [ + { + k: 'v1', + }, + { + k: 'v2', + }, + ], revenue: 20.37566, }, receivedAt: '2020-09-29T14:50:43.005+05:30', @@ -227,7 +314,9 @@ export const data = [ timestamp: '2020-09-29T14:50:29.907+05:30', type: 'track', }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, destination: { ID: '1i3Em7GMU9xVEiDlZUN8c88BMS9', Name: 'ADJ', @@ -250,8 +339,14 @@ export const data = [ Config: { appToken: 'testAppToken', customMappings: [ - { from: 'Application Installed', to: '3fdmll' }, - { from: 'First Investment', to: 'testEventToken' }, + { + from: 'Application Installed', + to: '3fdmll', + }, + { + from: 'First Investment', + to: 'testEventToken', + }, ], environment: true, }, @@ -277,7 +372,9 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://s2s.adjust.com/event', - headers: { Accept: '*/*' }, + headers: { + Accept: '*/*', + }, params: { callback_params: '{"key1":"value1","key2":"value2","key3.k4":"v4","key3.k5.k6":"v6","key5[0].k":"v1","key5[1].k":"v2"}', @@ -293,11 +390,20 @@ export const data = [ event_token: 'testEventToken', environment: 'production', }, - body: { JSON: {}, XML: {}, JSON_ARRAY: {}, FORM: {} }, + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, files: {}, userId: '21e13f4bc7ceddad', }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { @@ -322,8 +428,14 @@ export const data = [ Config: { appToken: 'testAppToken', customMappings: [ - { from: 'Application Installed', to: '3fdmll' }, - { from: 'First Investment', to: 'testEventToken' }, + { + from: 'Application Installed', + to: '3fdmll', + }, + { + from: 'First Investment', + to: 'testEventToken', + }, ], environment: true, }, diff --git a/test/integrations/destinations/af/router/data.ts b/test/integrations/destinations/af/router/data.ts index b6dca3a75e..46f30fef81 100644 --- a/test/integrations/destinations/af/router/data.ts +++ b/test/integrations/destinations/af/router/data.ts @@ -43,7 +43,7 @@ export const data = [ sentAt: '2019-10-14T11:15:53.296Z', integrations: { AF: { af_uid: 'afUid' } }, }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { jobId: 2 }, destination: { Config: { devKey: 'ef1d42390426e3f7c90ac78272e74344', @@ -85,7 +85,7 @@ export const data = [ sentAt: '2019-10-14T11:15:53.296Z', integrations: { AF: { af_uid: 'afUid' } }, }, - metadata: { jobId: 3, userId: 'u1' }, + metadata: { jobId: 2 }, destination: { Config: { devKey: 'ef1d42390426e3f7c90ac78272e74344', @@ -128,7 +128,7 @@ export const data = [ sentAt: '2019-10-14T11:15:53.296Z', integrations: { AF: { af_uid: 'afUid' } }, }, - metadata: { jobId: 4, userId: 'u1' }, + metadata: { jobId: 2 }, destination: { Config: { devKey: 'ef1d42390426e3f7c90ac78272e74344', @@ -177,7 +177,7 @@ export const data = [ }, files: {}, }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [{ jobId: 2 }], batched: false, statusCode: 200, destination: { @@ -217,7 +217,7 @@ export const data = [ }, files: {}, }, - metadata: [{ jobId: 3, userId: 'u1' }], + metadata: [{ jobId: 2 }], batched: false, statusCode: 200, destination: { @@ -257,7 +257,7 @@ export const data = [ }, files: {}, }, - metadata: [{ jobId: 4, userId: 'u1' }], + metadata: [{ jobId: 2 }], batched: false, statusCode: 200, destination: { diff --git a/test/integrations/destinations/airship/router/data.ts b/test/integrations/destinations/airship/router/data.ts index 8ed6f57a42..bc11bc2cfc 100644 --- a/test/integrations/destinations/airship/router/data.ts +++ b/test/integrations/destinations/airship/router/data.ts @@ -11,9 +11,15 @@ export const data = [ input: [ { destination: { - Config: { apiKey: 'dummyApiKey', appKey: 'O2YARRI15I', dataCenter: false }, + Config: { + apiKey: 'dummyApiKey', + appKey: 'O2YARRI15I', + dataCenter: false, + }, + }, + metadata: { + jobId: 1, }, - metadata: { jobId: 1, userId: 'u1' }, message: { channel: 'web', context: { @@ -23,14 +29,26 @@ export const data = [ namespace: 'com.rudderlabs.javascript', version: '1.0.0', }, - traits: { email: 'testone@gmail.com', firstName: 'test', lastName: 'one' }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + traits: { + email: 'testone@gmail.com', + firstName: 'test', + lastName: 'one', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', locale: 'en-US', ip: '0.0.0.0', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, }, type: 'track', messageId: '84e26acc-56a5-4835-8233-591137fca468', @@ -44,14 +62,28 @@ export const data = [ brand: 'Victory Sneakers', colors: ['red', 'blue'], items: [ - { text: 'New Line Sneakers', price: '$ 79.95' }, - { text: 'Old Line Sneakers', price: '$ 79.95' }, - { text: 'Blue Line Sneakers', price: '$ 79.95' }, + { + text: 'New Line Sneakers', + price: '$ 79.95', + }, + { + text: 'Old Line Sneakers', + price: '$ 79.95', + }, + { + text: 'Blue Line Sneakers', + price: '$ 79.95', + }, ], name: 'Hugh Manbeing', - userLocation: { state: 'CO', zip: '80202' }, + userLocation: { + state: 'CO', + zip: '80202', + }, + }, + integrations: { + All: true, }, - integrations: { All: true }, sentAt: '2019-10-14T09:03:22.563Z', }, }, @@ -82,7 +114,9 @@ export const data = [ body: { JSON: { occured: '2019-10-14T09:03:17.562Z', - user: { named_user_id: 'testuserId1' }, + user: { + named_user_id: 'testuserId1', + }, body: { name: 'product_clicked', properties: { @@ -90,12 +124,24 @@ export const data = [ brand: 'Victory Sneakers', colors: ['red', 'blue'], items: [ - { text: 'New Line Sneakers', price: '$ 79.95' }, - { text: 'Old Line Sneakers', price: '$ 79.95' }, - { text: 'Blue Line Sneakers', price: '$ 79.95' }, + { + text: 'New Line Sneakers', + price: '$ 79.95', + }, + { + text: 'Old Line Sneakers', + price: '$ 79.95', + }, + { + text: 'Blue Line Sneakers', + price: '$ 79.95', + }, ], name: 'Hugh Manbeing', - userLocation: { state: 'CO', zip: '80202' }, + userLocation: { + state: 'CO', + zip: '80202', + }, }, }, }, @@ -105,11 +151,19 @@ export const data = [ }, files: {}, }, - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [ + { + jobId: 1, + }, + ], batched: false, statusCode: 200, destination: { - Config: { apiKey: 'dummyApiKey', appKey: 'O2YARRI15I', dataCenter: false }, + Config: { + apiKey: 'dummyApiKey', + appKey: 'O2YARRI15I', + dataCenter: false, + }, }, }, ], @@ -129,9 +183,15 @@ export const data = [ input: [ { destination: { - Config: { apiKey: 'dummyApiKey', appKey: 'O2YARRI15I', dataCenter: false }, + Config: { + apiKey: 'dummyApiKey', + appKey: 'O2YARRI15I', + dataCenter: false, + }, + }, + metadata: { + jobId: 2, }, - metadata: { jobId: 2, userId: 'u1' }, message: { anonymousId: '507f191e810c19729de860ea', channel: 'browser', @@ -140,7 +200,9 @@ export const data = [ 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 }, + integrations: { + All: true, + }, messageId: '022bb90c-bbac-11e4-8dfc-aa07a5b093db', receivedAt: '2015-02-23T22:28:55.387Z', sentAt: '2015-02-23T22:28:55.111Z', @@ -193,9 +255,15 @@ export const data = [ params: {}, body: { JSON: { - audience: { named_user_id: '97980cfea0067' }, - add: { rudderstack_integration: ['firstname', 'favcolor'] }, - remove: { rudderstack_integration: ['lastname'] }, + audience: { + named_user_id: '97980cfea0067', + }, + add: { + rudderstack_integration: ['firstname', 'favcolor'], + }, + remove: { + rudderstack_integration: ['lastname'], + }, }, JSON_ARRAY: {}, XML: {}, @@ -223,7 +291,12 @@ export const data = [ value: 'Peter Gibbons', timestamp: '2015-02-23T22:28:55Z', }, - { action: 'set', key: 'age', value: 34, timestamp: '2015-02-23T22:28:55Z' }, + { + action: 'set', + key: 'age', + value: 34, + timestamp: '2015-02-23T22:28:55Z', + }, { action: 'set', key: 'email', @@ -281,11 +354,19 @@ export const data = [ files: {}, }, ], - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { - Config: { apiKey: 'dummyApiKey', appKey: 'O2YARRI15I', dataCenter: false }, + Config: { + apiKey: 'dummyApiKey', + appKey: 'O2YARRI15I', + dataCenter: false, + }, }, }, ], @@ -304,8 +385,15 @@ export const data = [ body: { input: [ { - destination: { Config: { apiKey: 'dummyApiKey', dataCenter: false } }, - metadata: { jobId: 3, userId: 'u1' }, + destination: { + Config: { + apiKey: 'dummyApiKey', + dataCenter: false, + }, + }, + metadata: { + jobId: 3, + }, message: { anonymousId: '507f191e810c19729de860ea', channel: 'browser', @@ -314,7 +402,9 @@ export const data = [ 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 }, + integrations: { + All: true, + }, messageId: '022bb90c-bbac-11e4-8dfc-aa07a5b093db', receivedAt: '2015-02-23T22:28:55.387Z', sentAt: '2015-02-23T22:28:55.111Z', @@ -367,9 +457,15 @@ export const data = [ params: {}, body: { JSON: { - audience: { named_user_id: '97980cfea0067' }, - add: { rudderstack_integration_group: ['firstname', 'favcolor'] }, - remove: { rudderstack_integration_group: ['lastname'] }, + audience: { + named_user_id: '97980cfea0067', + }, + add: { + rudderstack_integration_group: ['firstname', 'favcolor'], + }, + remove: { + rudderstack_integration_group: ['lastname'], + }, }, JSON_ARRAY: {}, XML: {}, @@ -397,7 +493,12 @@ export const data = [ value: 'Peter Gibbons', timestamp: '2015-02-23T22:28:55Z', }, - { action: 'set', key: 'age', value: 34, timestamp: '2015-02-23T22:28:55Z' }, + { + action: 'set', + key: 'age', + value: 34, + timestamp: '2015-02-23T22:28:55Z', + }, { action: 'set', key: 'email', @@ -455,10 +556,19 @@ export const data = [ files: {}, }, ], - metadata: [{ jobId: 3, userId: 'u1' }], + metadata: [ + { + jobId: 3, + }, + ], batched: false, statusCode: 200, - destination: { Config: { apiKey: 'dummyApiKey', dataCenter: false } }, + destination: { + Config: { + apiKey: 'dummyApiKey', + dataCenter: false, + }, + }, }, ], }, diff --git a/test/integrations/destinations/algolia/router/data.ts b/test/integrations/destinations/algolia/router/data.ts index 65c74342dc..aaf3e224e3 100644 --- a/test/integrations/destinations/algolia/router/data.ts +++ b/test/integrations/destinations/algolia/router/data.ts @@ -17,7 +17,10 @@ export const data = [ userId: 'test-user-id1', channel: 'web', context: { - os: { name: '', version: '' }, + os: { + name: '', + version: '', + }, app: { name: 'RudderLabs JavaScript SDK', build: '1.0.0', @@ -53,7 +56,10 @@ export const data = [ custom_date1: '2019-10-14T11:15:53.296Z', custom_flavor: 'chocolate', }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.2.1' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.2.1', + }, campaign: {}, userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36', @@ -65,17 +71,27 @@ export const data = [ index: 'products', queryId: '43b15df305339e827f0ac0bdc5ebcaa7', products: [ - { objectId: 'ecommerce-sample-data-919', position: 7 }, - { objectId: '9780439784542', position: 8 }, + { + objectId: 'ecommerce-sample-data-919', + position: 7, + }, + { + objectId: '9780439784542', + position: 8, + }, ], }, receivedAt: '2021-10-25T15:10:08.889+05:30', request_ip: '[::1]', anonymousId: '7138f7d9-5dd2-4337-805d-ca17be59dc8e', - integrations: { All: true }, + integrations: { + All: true, + }, originalTimestamp: '2021-10-25T09:40:08.879Z', }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, destination: { ID: '1zzHtStW2ZPlullmz6L7DGnmk9V', Name: 'algolia-dev', @@ -84,7 +100,9 @@ export const data = [ Name: 'ALGOLIA', DisplayName: 'Algolia', Config: { - destConfig: { defaultConfig: ['apiKey', 'applicationId', 'eventTypeSettings'] }, + destConfig: { + defaultConfig: ['apiKey', 'applicationId', 'eventTypeSettings'], + }, excludeKeys: [], includeKeys: [], saveDestinationResponse: true, @@ -110,8 +128,14 @@ export const data = [ apiKey: 'apiKey', applicationId: 'appId', eventTypeSettings: [ - { from: 'product clicked', to: 'click' }, - { from: 'product list viewed', to: 'view' }, + { + from: 'product clicked', + to: 'click', + }, + { + from: 'product list viewed', + to: 'view', + }, ], }, Enabled: true, @@ -127,7 +151,10 @@ export const data = [ userId: 'test-user-id1', channel: 'web', context: { - os: { name: '', version: '' }, + os: { + name: '', + version: '', + }, app: { name: 'RudderLabs JavaScript SDK', build: '1.0.0', @@ -163,7 +190,10 @@ export const data = [ custom_date1: '2019-10-14T11:15:53.296Z', custom_flavor: 'chocolate', }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.2.1' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.2.1', + }, campaign: {}, userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36', @@ -171,14 +201,21 @@ export const data = [ rudderId: 'e3e907f1-f79a-444b-b91d-da47488f8273', messageId: '7b58e140-b66b-4e88-a5ec-bd6811fc3836', timestamp: '2021-10-25T15:10:08.943+05:30', - properties: { index: 'products', filters: ['field1:hello', 'val1:val2'] }, + properties: { + index: 'products', + filters: ['field1:hello', 'val1:val2'], + }, receivedAt: '2021-10-25T15:10:08.943+05:30', request_ip: '[::1]', anonymousId: '7138f7d9-5dd2-4337-805d-ca17be59dc8e', - integrations: { All: true }, + integrations: { + All: true, + }, originalTimestamp: '2021-10-25T09:40:08.886Z', }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, destination: { ID: '1zzHtStW2ZPlullmz6L7DGnmk9V', Name: 'algolia-dev', @@ -187,7 +224,9 @@ export const data = [ Name: 'ALGOLIA', DisplayName: 'Algolia', Config: { - destConfig: { defaultConfig: ['apiKey', 'applicationId', 'eventTypeSettings'] }, + destConfig: { + defaultConfig: ['apiKey', 'applicationId', 'eventTypeSettings'], + }, excludeKeys: [], includeKeys: [], saveDestinationResponse: true, @@ -213,8 +252,14 @@ export const data = [ apiKey: 'apiKey-2', applicationId: 'appId-2', eventTypeSettings: [ - { from: 'product clicked', to: 'click' }, - { from: 'product list viewed', to: 'view' }, + { + from: 'product clicked', + to: 'click', + }, + { + from: 'product list viewed', + to: 'view', + }, ], }, Enabled: true, @@ -232,14 +277,26 @@ export const data = [ namespace: 'com.rudderlabs.javascript', version: '1.0.0', }, - traits: { email: 'testone@gmail.com', firstName: 'test', lastName: 'one' }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + traits: { + email: 'testone@gmail.com', + firstName: 'test', + lastName: 'one', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', locale: 'en-US', ip: '0.0.0.0', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, page: { path: '/destinations/ometria', referrer: '', @@ -258,16 +315,27 @@ export const data = [ anonymousId: '123456', event: 'product clicked', userId: 'testuserId1', - properties: { filters: ['field1:hello', 'val1:val2'] }, - integrations: { All: true }, + properties: { + filters: ['field1:hello', 'val1:val2'], + }, + integrations: { + All: true, + }, sentAt: '2019-10-14T09:03:22.563Z', }, - metadata: { jobId: 3, userId: 'u1' }, + metadata: { + jobId: 3, + }, destination: { Config: { apiKey: 'dummyApiKey', applicationId: 'O2YARRI15I', - eventTypeSettings: [{ from: 'product clicked', to: 'cLick ' }], + eventTypeSettings: [ + { + from: 'product clicked', + to: 'cLick ', + }, + ], }, }, }, @@ -288,7 +356,10 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://insights.algolia.io/1/events', - headers: { 'X-Algolia-Application-Id': 'appId', 'X-Algolia-API-Key': 'apiKey' }, + headers: { + 'X-Algolia-Application-Id': 'appId', + 'X-Algolia-API-Key': 'apiKey', + }, params: {}, body: { JSON: { @@ -317,8 +388,12 @@ export const data = [ files: {}, }, metadata: [ - { jobId: 1, userId: 'u1' }, - { jobId: 2, userId: 'u1' }, + { + jobId: 1, + }, + { + jobId: 2, + }, ], batched: true, statusCode: 200, @@ -330,7 +405,9 @@ export const data = [ Name: 'ALGOLIA', DisplayName: 'Algolia', Config: { - destConfig: { defaultConfig: ['apiKey', 'applicationId', 'eventTypeSettings'] }, + destConfig: { + defaultConfig: ['apiKey', 'applicationId', 'eventTypeSettings'], + }, excludeKeys: [], includeKeys: [], saveDestinationResponse: true, @@ -356,8 +433,14 @@ export const data = [ apiKey: 'apiKey', applicationId: 'appId', eventTypeSettings: [ - { from: 'product clicked', to: 'click' }, - { from: 'product list viewed', to: 'view' }, + { + from: 'product clicked', + to: 'click', + }, + { + from: 'product list viewed', + to: 'view', + }, ], }, Enabled: true, @@ -371,11 +454,20 @@ export const data = [ Config: { apiKey: 'dummyApiKey', applicationId: 'O2YARRI15I', - eventTypeSettings: [{ from: 'product clicked', to: 'cLick ' }], + eventTypeSettings: [ + { + from: 'product clicked', + to: 'cLick ', + }, + ], }, }, error: 'Missing required value from "properties.index"', - metadata: [{ jobId: 3, userId: 'u1' }], + metadata: [ + { + jobId: 3, + }, + ], statTags: { destType: 'ALGOLIA', errorCategory: 'dataValidation', @@ -409,7 +501,10 @@ export const data = [ userId: 'anonymous', channel: 'web', context: { - os: { name: '', version: '' }, + os: { + name: '', + version: '', + }, app: { name: 'RudderLabs JavaScript SDK', version: '2.35.0', @@ -434,8 +529,14 @@ export const data = [ innerWidth: 2514, innerHeight: 567, }, - traits: { loggedIn: false, customerId: 'anonymous' }, - library: { name: 'RudderLabs JavaScript SDK', version: '2.35.0' }, + traits: { + loggedIn: false, + customerId: 'anonymous', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '2.35.0', + }, campaign: {}, sessionId: 1687204412379, userAgent: @@ -1992,7 +2093,9 @@ export const data = [ receivedAt: '2023-06-19T22:22:32.431Z', request_ip: '104.205.211.60', anonymousId: '7b701174-5998-480e-a4df-b322d0ec9d1c', - integrations: { All: true }, + integrations: { + All: true, + }, originalTimestamp: '2023-06-19T19:54:41.686Z', }, destination: { @@ -2001,17 +2104,35 @@ export const data = [ apiKey: 'apiKey', applicationId: 'appId', eventTypeSettings: [ - { from: 'productClicked', to: 'click' }, - { from: 'product list filtered', to: 'click' }, - { from: 'Product List Viewed', to: 'view' }, - { from: 'Order Completed', to: 'conversion' }, - { from: 'Product Added', to: 'click' }, + { + from: 'productClicked', + to: 'click', + }, + { + from: 'product list filtered', + to: 'click', + }, + { + from: 'Product List Viewed', + to: 'view', + }, + { + from: 'Order Completed', + to: 'conversion', + }, + { + from: 'Product Added', + to: 'click', + }, ], oneTrustCookieCategories: [], eventDelivery: false, eventDeliveryTS: 1687213909459, }, - liveEventsConfig: { eventDelivery: false, eventDeliveryTS: 1687213909459 }, + liveEventsConfig: { + eventDelivery: false, + eventDeliveryTS: 1687213909459, + }, id: 'destId', workspaceId: 'wspId', DestinationDefinition: { @@ -2071,7 +2192,6 @@ export const data = [ workspaceId: 'wspId', destinationId: 'destId', jobId: 12, - userId: 'u1', }, }, ], @@ -2127,7 +2247,10 @@ export const data = [ }, endpoint: 'https://insights.algolia.io/1/events', files: {}, - headers: { 'X-Algolia-API-Key': 'apiKey', 'X-Algolia-Application-Id': 'appId' }, + headers: { + 'X-Algolia-API-Key': 'apiKey', + 'X-Algolia-Application-Id': 'appId', + }, method: 'POST', params: {}, type: 'REST', @@ -2140,11 +2263,26 @@ export const data = [ eventDelivery: false, eventDeliveryTS: 1687213909459, eventTypeSettings: [ - { from: 'productClicked', to: 'click' }, - { from: 'product list filtered', to: 'click' }, - { from: 'Product List Viewed', to: 'view' }, - { from: 'Order Completed', to: 'conversion' }, - { from: 'Product Added', to: 'click' }, + { + from: 'productClicked', + to: 'click', + }, + { + from: 'product list filtered', + to: 'click', + }, + { + from: 'Product List Viewed', + to: 'view', + }, + { + from: 'Order Completed', + to: 'conversion', + }, + { + from: 'Product Added', + to: 'click', + }, ], oneTrustCookieCategories: [], }, @@ -2195,7 +2333,10 @@ export const data = [ id: 'destId', isConnectionEnabled: true, isProcessorEnabled: true, - liveEventsConfig: { eventDelivery: false, eventDeliveryTS: 1687213909459 }, + liveEventsConfig: { + eventDelivery: false, + eventDeliveryTS: 1687213909459, + }, name: 'my_algolia', revisionId: 'revisionId1', secretConfig: {}, @@ -2210,7 +2351,6 @@ export const data = [ workspaceId: 'wspId', destinationId: 'destId', jobId: 12, - userId: 'u1', }, ], statusCode: 200, diff --git a/test/integrations/destinations/am/batch/data.ts b/test/integrations/destinations/am/batch/data.ts index d29c38ee35..962bb476c4 100644 --- a/test/integrations/destinations/am/batch/data.ts +++ b/test/integrations/destinations/am/batch/data.ts @@ -45,19 +45,31 @@ export const data = [ }, ], api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', - options: { min_id_length: 1 }, + options: { + min_id_length: 1, + }, }, }, type: 'REST', files: {}, method: 'POST', params: {}, - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://api.eu.amplitude.com/2/httpapi', }, - metadata: { job_id: 1, userId: 'u1' }, - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'EU' } }, + metadata: { + job_id: 1, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'EU', + }, + }, }, ], }, @@ -70,9 +82,13 @@ export const data = [ { batched: false, error: 'Both userId and deviceId cannot be undefined', - //TODO: fix this. metadata should be an array - metadata: { job_id: 1, userId: 'u1' }, - statTags: { errorCategory: 'dataValidation', errorType: 'instrumentation' }, + metadata: { + job_id: 1, + }, + statTags: { + errorCategory: 'dataValidation', + errorType: 'instrumentation', + }, statusCode: 400, }, ], @@ -127,7 +143,9 @@ export const data = [ }, ], api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', - options: { min_id_length: 1 }, + options: { + min_id_length: 1, + }, }, }, type: 'REST', @@ -135,12 +153,22 @@ export const data = [ method: 'POST', params: {}, userId: 'my-anonymous-id-new', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://api.eu.amplitude.com/2/httpapi', }, - metadata: { job_id: 1, userId: 'u1' }, - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'EU' } }, + metadata: { + job_id: 1, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'EU', + }, + }, }, { message: { @@ -163,11 +191,15 @@ export const data = [ os_version: '', session_id: -1, app_version: '1.1.5', - event_properties: { key: 'val' }, + event_properties: { + key: 'val', + }, }, ], api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', - options: { min_id_length: 1 }, + options: { + min_id_length: 1, + }, }, }, type: 'REST', @@ -175,12 +207,22 @@ export const data = [ method: 'POST', params: {}, userId: 'my-anonymous-id-new', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://api2.amplitude.com/2/httpapi', }, - metadata: { job_id: 2, userId: 'u1' }, - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + metadata: { + job_id: 2, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, { message: { @@ -203,11 +245,15 @@ export const data = [ os_version: '', session_id: -1, app_version: '1.1.5', - event_properties: { key: 'val' }, + event_properties: { + key: 'val', + }, }, ], api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', - options: { min_id_length: 1 }, + options: { + min_id_length: 1, + }, }, }, type: 'REST', @@ -215,12 +261,22 @@ export const data = [ method: 'POST', params: {}, userId: 'my-anonymous-id-new', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://api2.amplitude.com/2/httpapi', }, - metadata: { job_id: 3, userId: 'u1' }, - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + metadata: { + job_id: 3, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, { message: { @@ -233,7 +289,9 @@ export const data = [ { ip: '[::1]', time: 1603132726413, - groups: { Company: 'Comapny-ABC' }, + groups: { + Company: 'Comapny-ABC', + }, os_name: '', user_id: 'sampleusrRudder3', app_name: 'RudderLabs JavaScript SDK', @@ -244,11 +302,15 @@ export const data = [ os_version: '', session_id: -1, app_version: '1.1.5', - user_properties: { Company: 'Comapny-ABC' }, + user_properties: { + Company: 'Comapny-ABC', + }, }, ], api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', - options: { min_id_length: 1 }, + options: { + min_id_length: 1, + }, }, }, type: 'REST', @@ -256,12 +318,22 @@ export const data = [ method: 'POST', params: {}, userId: 'my-anonymous-id-new', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://api2.amplitude.com/2/httpapi', }, - metadata: { job_id: 4, userId: 'u1' }, - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + metadata: { + job_id: 4, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, { message: { @@ -274,7 +346,9 @@ export const data = [ { ip: '[::1]', time: 1603132726413, - groups: { Company: 'Comapny-ABC' }, + groups: { + Company: 'Comapny-ABC', + }, os_name: '', user_id: 'sampleusrRudder3', app_name: 'RudderLabs JavaScript SDK', @@ -285,11 +359,15 @@ export const data = [ os_version: '', session_id: -1, app_version: '1.1.5', - user_properties: { Company: 'Comapny-ABC' }, + user_properties: { + Company: 'Comapny-ABC', + }, }, ], api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', - options: { min_id_length: 1 }, + options: { + min_id_length: 1, + }, }, }, type: 'REST', @@ -297,12 +375,22 @@ export const data = [ method: 'POST', params: {}, userId: 'my-anonymous-id-new', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://api2.amplitude.com/2/httpapi', }, - metadata: { job_id: 5, userId: 'u1' }, - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + metadata: { + job_id: 5, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, { message: { @@ -326,8 +414,16 @@ export const data = [ version: '1', endpoint: 'https://api2.amplitude.com/groupidentify', }, - metadata: { job_id: 6, userId: 'u1' }, - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + metadata: { + job_id: 6, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, { message: { @@ -349,8 +445,16 @@ export const data = [ version: '1', endpoint: 'https://api2.amplitude.com/usermap', }, - metadata: { job_id: 7, userId: 'u1' }, - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + metadata: { + job_id: 7, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, ], }, @@ -397,7 +501,9 @@ export const data = [ }, ], api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', - options: { min_id_length: 1 }, + options: { + min_id_length: 1, + }, }, }, type: 'REST', @@ -405,12 +511,24 @@ export const data = [ method: 'POST', params: {}, userId: 'my-anonymous-id-new', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://api.eu.amplitude.com/2/httpapi', }, - metadata: [{ job_id: 1, userId: 'u1' }], - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'EU' } }, + metadata: [ + { + job_id: 1, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'EU', + }, + }, }, { batchedRequest: { @@ -434,8 +552,18 @@ export const data = [ version: '1', endpoint: 'https://api2.amplitude.com/groupidentify', }, - metadata: [{ job_id: 6, userId: 'u1' }], - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + metadata: [ + { + job_id: 6, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, { batchedRequest: { @@ -457,8 +585,18 @@ export const data = [ version: '1', endpoint: 'https://api2.amplitude.com/usermap', }, - metadata: [{ job_id: 7, userId: 'u1' }], - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + metadata: [ + { + job_id: 7, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, { batchedRequest: { @@ -481,7 +619,9 @@ export const data = [ os_version: '', session_id: -1, app_version: '1.1.5', - event_properties: { key: 'val' }, + event_properties: { + key: 'val', + }, }, { ip: '[::1]', @@ -496,12 +636,16 @@ export const data = [ os_version: '', session_id: -1, app_version: '1.1.5', - event_properties: { key: 'val' }, + event_properties: { + key: 'val', + }, }, { ip: '[::1]', time: 1603132726413, - groups: { Company: 'Comapny-ABC' }, + groups: { + Company: 'Comapny-ABC', + }, os_name: '', user_id: 'sampleusrRudder3', app_name: 'RudderLabs JavaScript SDK', @@ -512,12 +656,16 @@ export const data = [ os_version: '', session_id: -1, app_version: '1.1.5', - user_properties: { Company: 'Comapny-ABC' }, + user_properties: { + Company: 'Comapny-ABC', + }, }, { ip: '[::1]', time: 1603132726413, - groups: { Company: 'Comapny-ABC' }, + groups: { + Company: 'Comapny-ABC', + }, os_name: '', user_id: 'sampleusrRudder3', app_name: 'RudderLabs JavaScript SDK', @@ -528,7 +676,9 @@ export const data = [ os_version: '', session_id: -1, app_version: '1.1.5', - user_properties: { Company: 'Comapny-ABC' }, + user_properties: { + Company: 'Comapny-ABC', + }, }, ], api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', @@ -539,17 +689,33 @@ export const data = [ method: 'POST', params: {}, userId: 'my-anonymous-id-new', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://api2.amplitude.com/batch', }, metadata: [ - { job_id: 2, userId: 'u1' }, - { job_id: 3, userId: 'u1' }, - { job_id: 4, userId: 'u1' }, - { job_id: 5, userId: 'u1' }, + { + job_id: 2, + }, + { + job_id: 3, + }, + { + job_id: 4, + }, + { + job_id: 5, + }, ], - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, ], }, @@ -601,7 +767,9 @@ export const data = [ }, }, api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', - options: { min_id_length: 1 }, + options: { + min_id_length: 1, + }, }, }, type: 'REST', @@ -609,12 +777,22 @@ export const data = [ method: 'POST', params: {}, userId: 'my-anonymous-id-new', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://api2.amplitude.com/2/httpapi', }, - metadata: { job_id: 1, userId: 'u1' }, - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + metadata: { + job_id: 1, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, { message: { @@ -636,10 +814,14 @@ export const data = [ os_version: '', session_id: -1, app_version: '1.1.5', - event_properties: { key: 'val' }, + event_properties: { + key: 'val', + }, }, api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', - options: { min_id_length: 1 }, + options: { + min_id_length: 1, + }, }, }, type: 'REST', @@ -647,12 +829,22 @@ export const data = [ method: 'POST', params: {}, userId: 'my-anonymous-id-new', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://api2.amplitude.com/2/httpapi', }, - metadata: { job_id: 2, userId: 'u1' }, - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + metadata: { + job_id: 2, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, { message: { @@ -674,10 +866,14 @@ export const data = [ os_version: '', session_id: -1, app_version: '1.1.5', - event_properties: { key: 'val' }, + event_properties: { + key: 'val', + }, }, api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', - options: { min_id_length: 1 }, + options: { + min_id_length: 1, + }, }, }, type: 'REST', @@ -685,12 +881,22 @@ export const data = [ method: 'POST', params: {}, userId: 'my-anonymous-id-new', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://api2.amplitude.com/2/httpapi', }, - metadata: { job_id: 3, userId: 'u1' }, - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + metadata: { + job_id: 3, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, { message: { @@ -702,7 +908,9 @@ export const data = [ events: { ip: '[::1]', time: 1603132726413, - groups: { Company: 'Comapny-ABC' }, + groups: { + Company: 'Comapny-ABC', + }, os_name: '', user_id: 'sampleusrRudder3', app_name: 'RudderLabs JavaScript SDK', @@ -713,10 +921,14 @@ export const data = [ os_version: '', session_id: -1, app_version: '1.1.5', - user_properties: { Company: 'Comapny-ABC' }, + user_properties: { + Company: 'Comapny-ABC', + }, }, api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', - options: { min_id_length: 1 }, + options: { + min_id_length: 1, + }, }, }, type: 'REST', @@ -724,12 +936,22 @@ export const data = [ method: 'POST', params: {}, userId: 'my-anonymous-id-new', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://api2.amplitude.com/2/httpapi', }, - metadata: { job_id: 4, userId: 'u1' }, - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + metadata: { + job_id: 4, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, { message: { @@ -741,7 +963,9 @@ export const data = [ events: { ip: '[::1]', time: 1603132726413, - groups: { Company: 'Comapny-ABC' }, + groups: { + Company: 'Comapny-ABC', + }, os_name: '', user_id: 'sampleusrRudder3', app_name: 'RudderLabs JavaScript SDK', @@ -752,10 +976,14 @@ export const data = [ os_version: '', session_id: -1, app_version: '1.1.5', - user_properties: { Company: 'Comapny-ABC' }, + user_properties: { + Company: 'Comapny-ABC', + }, }, api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', - options: { min_id_length: 1 }, + options: { + min_id_length: 1, + }, }, }, type: 'REST', @@ -763,12 +991,22 @@ export const data = [ method: 'POST', params: {}, userId: 'my-anonymous-id-new', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://api2.amplitude.com/2/httpapi', }, - metadata: { job_id: 5, userId: 'u1' }, - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + metadata: { + job_id: 5, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, { message: { @@ -792,8 +1030,16 @@ export const data = [ version: '1', endpoint: 'https://api2.amplitude.com/groupidentify', }, - metadata: { job_id: 6, userId: 'u1' }, - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + metadata: { + job_id: 6, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, { message: { @@ -815,8 +1061,16 @@ export const data = [ version: '1', endpoint: 'https://api2.amplitude.com/usermap', }, - metadata: { job_id: 7, userId: 'u1' }, - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + metadata: { + job_id: 7, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, ], }, @@ -861,7 +1115,9 @@ export const data = [ }, }, api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', - options: { min_id_length: 1 }, + options: { + min_id_length: 1, + }, }, }, type: 'REST', @@ -869,12 +1125,24 @@ export const data = [ method: 'POST', params: {}, userId: 'my-anonymous-id-new', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://api2.amplitude.com/2/httpapi', }, - metadata: [{ job_id: 1, userId: 'u1' }], - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + metadata: [ + { + job_id: 1, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, { batchedRequest: { @@ -898,8 +1166,18 @@ export const data = [ version: '1', endpoint: 'https://api2.amplitude.com/groupidentify', }, - metadata: [{ job_id: 6, userId: 'u1' }], - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + metadata: [ + { + job_id: 6, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, { batchedRequest: { @@ -921,8 +1199,18 @@ export const data = [ version: '1', endpoint: 'https://api2.amplitude.com/usermap', }, - metadata: [{ job_id: 7, userId: 'u1' }], - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + metadata: [ + { + job_id: 7, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, { batchedRequest: { @@ -945,7 +1233,9 @@ export const data = [ os_version: '', session_id: -1, app_version: '1.1.5', - event_properties: { key: 'val' }, + event_properties: { + key: 'val', + }, }, { ip: '[::1]', @@ -960,12 +1250,16 @@ export const data = [ os_version: '', session_id: -1, app_version: '1.1.5', - event_properties: { key: 'val' }, + event_properties: { + key: 'val', + }, }, { ip: '[::1]', time: 1603132726413, - groups: { Company: 'Comapny-ABC' }, + groups: { + Company: 'Comapny-ABC', + }, os_name: '', user_id: 'sampleusrRudder3', app_name: 'RudderLabs JavaScript SDK', @@ -976,12 +1270,16 @@ export const data = [ os_version: '', session_id: -1, app_version: '1.1.5', - user_properties: { Company: 'Comapny-ABC' }, + user_properties: { + Company: 'Comapny-ABC', + }, }, { ip: '[::1]', time: 1603132726413, - groups: { Company: 'Comapny-ABC' }, + groups: { + Company: 'Comapny-ABC', + }, os_name: '', user_id: 'sampleusrRudder3', app_name: 'RudderLabs JavaScript SDK', @@ -992,7 +1290,9 @@ export const data = [ os_version: '', session_id: -1, app_version: '1.1.5', - user_properties: { Company: 'Comapny-ABC' }, + user_properties: { + Company: 'Comapny-ABC', + }, }, ], api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', @@ -1003,17 +1303,33 @@ export const data = [ method: 'POST', params: {}, userId: 'my-anonymous-id-new', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://api2.amplitude.com/batch', }, metadata: [ - { job_id: 2, userId: 'u1' }, - { job_id: 3, userId: 'u1' }, - { job_id: 4, userId: 'u1' }, - { job_id: 5, userId: 'u1' }, + { + job_id: 2, + }, + { + job_id: 3, + }, + { + job_id: 4, + }, + { + job_id: 5, + }, ], - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, ], }, @@ -1058,7 +1374,9 @@ export const data = [ device_manufacturer: 'Google', }, api_key: 'afasf', - options: { min_id_length: 1 }, + options: { + min_id_length: 1, + }, }, }, type: 'REST', @@ -1066,12 +1384,14 @@ export const data = [ method: 'POST', params: {}, userId: 'anon_id', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://api2.amplitude.com/2/httpapi', }, metadata: { - userId: 'u1', + userId: '90ca6da0-292e-4e79-9880-f8009e0ae4a3', jobId: 12, sourceId: '1fMCVYZboDlYlauh4GFsEo2JU77', destinationId: '1gXSYmSd7vkfFfJ4vtMCL0i43Lb', @@ -1107,7 +1427,11 @@ export const data = [ ], }, }, - Config: { appKey: 'asdf', dataCenter: 'asdfasdf', residencyServer: 'standard' }, + Config: { + appKey: 'asdf', + dataCenter: 'asdfasdf', + residencyServer: 'standard', + }, Enabled: true, Transformations: [], IsProcessorEnabled: false, @@ -1141,7 +1465,9 @@ export const data = [ device_manufacturer: 'Google', }, api_key: 'afasf', - options: { min_id_length: 1 }, + options: { + min_id_length: 1, + }, }, }, type: 'REST', @@ -1149,12 +1475,14 @@ export const data = [ method: 'POST', params: {}, userId: 'anon_id', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://api2.amplitude.com/2/httpapi', }, metadata: { - userId: 'u1', + userId: '90ca6da0-292e-4e79-9880-f8009e0ae4a3', jobId: 13, sourceId: '1fMCVYZboDlYlauh4GFsEo2JU77', destinationId: '1gXSYmSd7vkfFfJ4vtMCL0i43Lb', @@ -1190,7 +1518,11 @@ export const data = [ ], }, }, - Config: { appKey: 'asdf', dataCenter: 'asdfasdf', residencyServer: 'standard' }, + Config: { + appKey: 'asdf', + dataCenter: 'asdfasdf', + residencyServer: 'standard', + }, Enabled: true, Transformations: [], IsProcessorEnabled: false, @@ -1224,7 +1556,9 @@ export const data = [ device_manufacturer: 'Google', }, api_key: 'afasf', - options: { min_id_length: 1 }, + options: { + min_id_length: 1, + }, }, }, type: 'REST', @@ -1232,12 +1566,14 @@ export const data = [ method: 'POST', params: {}, userId: 'anon_id', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://api2.amplitude.com/2/httpapi', }, metadata: { - userId: 'u1', + userId: '90ca6da0-292e-4e79-9880-f8009e0ae4a3', jobId: 14, sourceId: '1fMCVYZboDlYlauh4GFsEo2JU77', destinationId: '1gXSYmSd7vkfFfJ4vtMCL0i43Lb', @@ -1273,7 +1609,11 @@ export const data = [ ], }, }, - Config: { appKey: 'asdf', dataCenter: 'asdfasdf', residencyServer: 'standard' }, + Config: { + appKey: 'asdf', + dataCenter: 'asdfasdf', + residencyServer: 'standard', + }, Enabled: true, Transformations: [], IsProcessorEnabled: false, @@ -1307,7 +1647,9 @@ export const data = [ device_manufacturer: 'Google', }, api_key: 'afasf', - options: { min_id_length: 1 }, + options: { + min_id_length: 1, + }, }, }, type: 'REST', @@ -1315,12 +1657,14 @@ export const data = [ method: 'POST', params: {}, userId: 'anon_id', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://api2.amplitude.com/2/httpapi', }, metadata: { - userId: 'u1', + userId: '90ca6da0-292e-4e79-9880-f8009e0ae4a3', jobId: 15, sourceId: '1fMCVYZboDlYlauh4GFsEo2JU77', destinationId: '1gXSYmSd7vkfFfJ4vtMCL0i43Lb', @@ -1356,7 +1700,11 @@ export const data = [ ], }, }, - Config: { appKey: 'asdf', dataCenter: 'asdfasdf', residencyServer: 'standard' }, + Config: { + appKey: 'asdf', + dataCenter: 'asdfasdf', + residencyServer: 'standard', + }, Enabled: true, Transformations: [], IsProcessorEnabled: false, @@ -1390,7 +1738,9 @@ export const data = [ device_manufacturer: 'Google', }, api_key: 'afasf', - options: { min_id_length: 1 }, + options: { + min_id_length: 1, + }, }, }, type: 'REST', @@ -1398,12 +1748,14 @@ export const data = [ method: 'POST', params: {}, userId: 'anon_id', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://api2.amplitude.com/2/httpapi', }, metadata: { - userId: 'u1', + userId: '90ca6da0-292e-4e79-9880-f8009e0ae4a3', jobId: 16, sourceId: '1fMCVYZboDlYlauh4GFsEo2JU77', destinationId: '1gXSYmSd7vkfFfJ4vtMCL0i43Lb', @@ -1439,7 +1791,11 @@ export const data = [ ], }, }, - Config: { appKey: 'asdf', dataCenter: 'asdfasdf', residencyServer: 'standard' }, + Config: { + appKey: 'asdf', + dataCenter: 'asdfasdf', + residencyServer: 'standard', + }, Enabled: true, Transformations: [], IsProcessorEnabled: false, @@ -1570,13 +1926,15 @@ export const data = [ method: 'POST', params: {}, userId: 'anon_id', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://api2.amplitude.com/batch', }, metadata: [ { - userId: 'u1', + userId: '90ca6da0-292e-4e79-9880-f8009e0ae4a3', jobId: 12, sourceId: '1fMCVYZboDlYlauh4GFsEo2JU77', destinationId: '1gXSYmSd7vkfFfJ4vtMCL0i43Lb', @@ -1585,7 +1943,7 @@ export const data = [ createdAt: '2020-10-20T18:17:32.465Z', }, { - userId: 'u1', + userId: '90ca6da0-292e-4e79-9880-f8009e0ae4a3', jobId: 13, sourceId: '1fMCVYZboDlYlauh4GFsEo2JU77', destinationId: '1gXSYmSd7vkfFfJ4vtMCL0i43Lb', @@ -1594,7 +1952,7 @@ export const data = [ createdAt: '2020-10-20T18:17:32.465Z', }, { - userId: 'u1', + userId: '90ca6da0-292e-4e79-9880-f8009e0ae4a3', jobId: 14, sourceId: '1fMCVYZboDlYlauh4GFsEo2JU77', destinationId: '1gXSYmSd7vkfFfJ4vtMCL0i43Lb', @@ -1603,7 +1961,7 @@ export const data = [ createdAt: '2020-10-20T18:17:32.465Z', }, { - userId: 'u1', + userId: '90ca6da0-292e-4e79-9880-f8009e0ae4a3', jobId: 15, sourceId: '1fMCVYZboDlYlauh4GFsEo2JU77', destinationId: '1gXSYmSd7vkfFfJ4vtMCL0i43Lb', @@ -1612,7 +1970,7 @@ export const data = [ createdAt: '2020-10-20T18:17:32.465Z', }, { - userId: 'u1', + userId: '90ca6da0-292e-4e79-9880-f8009e0ae4a3', jobId: 16, sourceId: '1fMCVYZboDlYlauh4GFsEo2JU77', destinationId: '1gXSYmSd7vkfFfJ4vtMCL0i43Lb', @@ -1649,7 +2007,11 @@ export const data = [ ], }, }, - Config: { appKey: 'asdf', dataCenter: 'asdfasdf', residencyServer: 'standard' }, + Config: { + appKey: 'asdf', + dataCenter: 'asdfasdf', + residencyServer: 'standard', + }, Enabled: true, Transformations: [], IsProcessorEnabled: false, @@ -1707,7 +2069,9 @@ export const data = [ }, ], api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', - options: { min_id_length: 1 }, + options: { + min_id_length: 1, + }, }, }, type: 'REST', @@ -1715,12 +2079,22 @@ export const data = [ method: 'POST', params: {}, userId: 'my-anonymous-id-new', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://api2.amplitude.com/2/httpapi', }, - metadata: { job_id: 1, userId: 'u1' }, - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + metadata: { + job_id: 1, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, { message: { @@ -1743,11 +2117,15 @@ export const data = [ os_version: '', session_id: -1, app_version: '1.1.5', - event_properties: { key: 'val' }, + event_properties: { + key: 'val', + }, }, ], api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', - options: { min_id_length: 1 }, + options: { + min_id_length: 1, + }, }, }, type: 'REST', @@ -1755,12 +2133,22 @@ export const data = [ method: 'POST', params: {}, userId: 'my-anonymous-id-new', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://api2.amplitude.com/2/httpapi', }, - metadata: { job_id: 2, userId: 'u1' }, - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + metadata: { + job_id: 2, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, { message: { @@ -1783,11 +2171,15 @@ export const data = [ os_version: '', session_id: -1, app_version: '1.1.5', - event_properties: { key: 'val' }, + event_properties: { + key: 'val', + }, }, ], api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', - options: { min_id_length: 1 }, + options: { + min_id_length: 1, + }, }, }, type: 'REST', @@ -1795,12 +2187,22 @@ export const data = [ method: 'POST', params: {}, userId: 'my-anonymous-id-new', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://api2.amplitude.com/2/httpapi', }, - metadata: { job_id: 3, userId: 'u1' }, - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + metadata: { + job_id: 3, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, { message: { @@ -1813,7 +2215,9 @@ export const data = [ { ip: '[::1]', time: 1603132726413, - groups: { Company: 'Comapny-ABC' }, + groups: { + Company: 'Comapny-ABC', + }, os_name: '', user_id: 'sampleusrRudder3', app_name: 'RudderLabs JavaScript SDK', @@ -1824,11 +2228,15 @@ export const data = [ os_version: '', session_id: -1, app_version: '1.1.5', - user_properties: { Company: 'Comapny-ABC' }, + user_properties: { + Company: 'Comapny-ABC', + }, }, ], api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', - options: { min_id_length: 1 }, + options: { + min_id_length: 1, + }, }, }, type: 'REST', @@ -1836,12 +2244,22 @@ export const data = [ method: 'POST', params: {}, userId: 'my-anonymous-id-new', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://api2.amplitude.com/2/httpapi', }, - metadata: { job_id: 4, userId: 'u1' }, - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + metadata: { + job_id: 4, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, { message: { @@ -1854,7 +2272,9 @@ export const data = [ { ip: '[::1]', time: 1603132726413, - groups: { Company: 'Comapny-ABC' }, + groups: { + Company: 'Comapny-ABC', + }, os_name: '', user_id: 'sampleusrRudder3', app_name: 'RudderLabs JavaScript SDK', @@ -1865,11 +2285,15 @@ export const data = [ os_version: '', session_id: -1, app_version: '1.1.5', - user_properties: { Company: 'Comapny-ABC' }, + user_properties: { + Company: 'Comapny-ABC', + }, }, ], api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', - options: { min_id_length: 1 }, + options: { + min_id_length: 1, + }, }, }, type: 'REST', @@ -1877,12 +2301,22 @@ export const data = [ method: 'POST', params: {}, userId: 'my-anonymous-id-new', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://api2.amplitude.com/2/httpapi', }, - metadata: { job_id: 5, userId: 'u1' }, - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + metadata: { + job_id: 5, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, { message: { @@ -1906,8 +2340,16 @@ export const data = [ version: '1', endpoint: 'https://api2.amplitude.com/groupidentify', }, - metadata: { job_id: 6, userId: 'u1' }, - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + metadata: { + job_id: 6, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, { message: { @@ -1929,8 +2371,16 @@ export const data = [ version: '1', endpoint: 'https://api2.amplitude.com/usermap', }, - metadata: { job_id: 7, userId: 'u1' }, - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + metadata: { + job_id: 7, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, ], }, @@ -1977,7 +2427,9 @@ export const data = [ }, ], api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', - options: { min_id_length: 1 }, + options: { + min_id_length: 1, + }, }, }, type: 'REST', @@ -1985,12 +2437,24 @@ export const data = [ method: 'POST', params: {}, userId: 'my-anonymous-id-new', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://api2.amplitude.com/2/httpapi', }, - metadata: [{ job_id: 1, userId: 'u1' }], - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + metadata: [ + { + job_id: 1, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, { batchedRequest: { @@ -2014,8 +2478,18 @@ export const data = [ version: '1', endpoint: 'https://api2.amplitude.com/groupidentify', }, - metadata: [{ job_id: 6, userId: 'u1' }], - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + metadata: [ + { + job_id: 6, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, { batchedRequest: { @@ -2037,8 +2511,18 @@ export const data = [ version: '1', endpoint: 'https://api2.amplitude.com/usermap', }, - metadata: [{ job_id: 7, userId: 'u1' }], - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + metadata: [ + { + job_id: 7, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, { batchedRequest: { @@ -2061,7 +2545,9 @@ export const data = [ os_version: '', session_id: -1, app_version: '1.1.5', - event_properties: { key: 'val' }, + event_properties: { + key: 'val', + }, }, { ip: '[::1]', @@ -2076,12 +2562,16 @@ export const data = [ os_version: '', session_id: -1, app_version: '1.1.5', - event_properties: { key: 'val' }, + event_properties: { + key: 'val', + }, }, { ip: '[::1]', time: 1603132726413, - groups: { Company: 'Comapny-ABC' }, + groups: { + Company: 'Comapny-ABC', + }, os_name: '', user_id: 'sampleusrRudder3', app_name: 'RudderLabs JavaScript SDK', @@ -2092,12 +2582,16 @@ export const data = [ os_version: '', session_id: -1, app_version: '1.1.5', - user_properties: { Company: 'Comapny-ABC' }, + user_properties: { + Company: 'Comapny-ABC', + }, }, { ip: '[::1]', time: 1603132726413, - groups: { Company: 'Comapny-ABC' }, + groups: { + Company: 'Comapny-ABC', + }, os_name: '', user_id: 'sampleusrRudder3', app_name: 'RudderLabs JavaScript SDK', @@ -2108,7 +2602,9 @@ export const data = [ os_version: '', session_id: -1, app_version: '1.1.5', - user_properties: { Company: 'Comapny-ABC' }, + user_properties: { + Company: 'Comapny-ABC', + }, }, ], api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', @@ -2119,17 +2615,33 @@ export const data = [ method: 'POST', params: {}, userId: 'my-anonymous-id-new', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://api2.amplitude.com/batch', }, metadata: [ - { job_id: 2, userId: 'u1' }, - { job_id: 3, userId: 'u1' }, - { job_id: 4, userId: 'u1' }, - { job_id: 5, userId: 'u1' }, + { + job_id: 2, + }, + { + job_id: 3, + }, + { + job_id: 4, + }, + { + job_id: 5, + }, ], - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, ], }, @@ -2182,7 +2694,9 @@ export const data = [ }, ], api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', - options: { min_id_length: 1 }, + options: { + min_id_length: 1, + }, }, }, type: 'REST', @@ -2190,12 +2704,22 @@ export const data = [ method: 'POST', params: {}, userId: 'my-anonymous-id-new', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://api2.amplitude.com/2/httpapi', }, - metadata: { job_id: 1, userId: 'u1' }, - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + metadata: { + job_id: 1, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, { message: { @@ -2218,11 +2742,15 @@ export const data = [ os_version: '', session_id: -1, app_version: '1.1.5', - event_properties: { key: 'val' }, + event_properties: { + key: 'val', + }, }, ], api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', - options: { min_id_length: 1 }, + options: { + min_id_length: 1, + }, }, }, type: 'REST', @@ -2230,12 +2758,22 @@ export const data = [ method: 'POST', params: {}, userId: 'my-anonymous-id-new', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://api2.amplitude.com/2/httpapi', }, - metadata: { job_id: 2, userId: 'u1' }, - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + metadata: { + job_id: 2, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, { message: { @@ -2258,11 +2796,15 @@ export const data = [ os_version: '', session_id: -1, app_version: '1.1.5', - event_properties: { key: 'val' }, + event_properties: { + key: 'val', + }, }, ], api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', - options: { min_id_length: 1 }, + options: { + min_id_length: 1, + }, }, }, type: 'REST', @@ -2270,12 +2812,22 @@ export const data = [ method: 'POST', params: {}, userId: 'my-anonymous-id-new', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://api2.amplitude.com/2/httpapi', }, - metadata: { job_id: 3, userId: 'u1' }, - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + metadata: { + job_id: 3, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, { message: { @@ -2288,7 +2840,9 @@ export const data = [ { ip: '[::1]', time: 1603132726413, - groups: { Company: 'Comapny-ABC' }, + groups: { + Company: 'Comapny-ABC', + }, os_name: '', user_id: 'sampleusrRudder3', app_name: 'RudderLabs JavaScript SDK', @@ -2299,11 +2853,15 @@ export const data = [ os_version: '', session_id: -1, app_version: '1.1.5', - user_properties: { Company: 'Comapny-ABC' }, + user_properties: { + Company: 'Comapny-ABC', + }, }, ], api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', - options: { min_id_length: 1 }, + options: { + min_id_length: 1, + }, }, }, type: 'REST', @@ -2311,12 +2869,22 @@ export const data = [ method: 'POST', params: {}, userId: 'my-anonymous-id-new', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://api2.amplitude.com/2/httpapi', }, - metadata: { job_id: 4, userId: 'u1' }, - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + metadata: { + job_id: 4, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, { message: { @@ -2329,7 +2897,9 @@ export const data = [ { ip: '[::1]', time: 1603132726413, - groups: { Company: 'Comapny-ABC' }, + groups: { + Company: 'Comapny-ABC', + }, os_name: '', user_id: 'sampleusrRudder3', app_name: 'RudderLabs JavaScript SDK', @@ -2340,11 +2910,15 @@ export const data = [ os_version: '', session_id: -1, app_version: '1.1.5', - user_properties: { Company: 'Comapny-ABC' }, + user_properties: { + Company: 'Comapny-ABC', + }, }, ], api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', - options: { min_id_length: 1 }, + options: { + min_id_length: 1, + }, }, }, type: 'REST', @@ -2352,12 +2926,22 @@ export const data = [ method: 'POST', params: {}, userId: 'my-anonymous-id-new', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://api2.amplitude.com/2/httpapi', }, - metadata: { job_id: 5, userId: 'u1' }, - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + metadata: { + job_id: 5, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, { message: { @@ -2381,8 +2965,16 @@ export const data = [ version: '1', endpoint: 'https://api2.amplitude.com/groupidentify', }, - metadata: { job_id: 6, userId: 'u1' }, - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + metadata: { + job_id: 6, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, { message: { @@ -2404,8 +2996,16 @@ export const data = [ version: '1', endpoint: 'https://api2.amplitude.com/usermap', }, - metadata: { job_id: 7, userId: 'u1' }, - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + metadata: { + job_id: 7, + }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, ], }, @@ -2451,7 +3051,9 @@ export const data = [ }, ], api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', - options: { min_id_length: 1 }, + options: { + min_id_length: 1, + }, }, }, type: 'REST', @@ -2459,12 +3061,24 @@ export const data = [ method: 'POST', params: {}, userId: 'my-anonymous-id-new', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://api2.amplitude.com/2/httpapi', }, - metadata: [{ job_id: 1, userId: 'u1' }], - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + metadata: [ + { + job_id: 1, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, { batchedRequest: { @@ -2488,8 +3102,18 @@ export const data = [ version: '1', endpoint: 'https://api2.amplitude.com/groupidentify', }, - metadata: [{ job_id: 6, userId: 'u1' }], - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + metadata: [ + { + job_id: 6, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, { batchedRequest: { @@ -2511,8 +3135,18 @@ export const data = [ version: '1', endpoint: 'https://api2.amplitude.com/usermap', }, - metadata: [{ job_id: 7, userId: 'u1' }], - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + metadata: [ + { + job_id: 7, + }, + ], + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, { batchedRequest: { @@ -2535,7 +3169,9 @@ export const data = [ os_version: '', session_id: -1, app_version: '1.1.5', - event_properties: { key: 'val' }, + event_properties: { + key: 'val', + }, }, { ip: '[::1]', @@ -2550,12 +3186,16 @@ export const data = [ os_version: '', session_id: -1, app_version: '1.1.5', - event_properties: { key: 'val' }, + event_properties: { + key: 'val', + }, }, { ip: '[::1]', time: 1603132726413, - groups: { Company: 'Comapny-ABC' }, + groups: { + Company: 'Comapny-ABC', + }, os_name: '', user_id: 'sampleusrRudder3', app_name: 'RudderLabs JavaScript SDK', @@ -2566,12 +3206,16 @@ export const data = [ os_version: '', session_id: -1, app_version: '1.1.5', - user_properties: { Company: 'Comapny-ABC' }, + user_properties: { + Company: 'Comapny-ABC', + }, }, { ip: '[::1]', time: 1603132726413, - groups: { Company: 'Comapny-ABC' }, + groups: { + Company: 'Comapny-ABC', + }, os_name: '', user_id: 'sampleusrRudder3', app_name: 'RudderLabs JavaScript SDK', @@ -2582,7 +3226,9 @@ export const data = [ os_version: '', session_id: -1, app_version: '1.1.5', - user_properties: { Company: 'Comapny-ABC' }, + user_properties: { + Company: 'Comapny-ABC', + }, }, ], api_key: '4c7ed7573eb73517ee4c26ed4bde9a85', @@ -2593,17 +3239,33 @@ export const data = [ method: 'POST', params: {}, userId: 'my-anonymous-id-new', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://api2.amplitude.com/batch', }, metadata: [ - { job_id: 2, userId: 'u1' }, - { job_id: 3, userId: 'u1' }, - { job_id: 4, userId: 'u1' }, - { job_id: 5, userId: 'u1' }, + { + job_id: 2, + }, + { + job_id: 3, + }, + { + job_id: 4, + }, + { + job_id: 5, + }, ], - destination: { ID: 'a', url: 'a', Config: { residencyServer: 'standard' } }, + destination: { + ID: 'a', + url: 'a', + Config: { + residencyServer: 'standard', + }, + }, }, ], }, diff --git a/test/integrations/destinations/am/router/data.ts b/test/integrations/destinations/am/router/data.ts index 1b4026c85e..7f2e1d0329 100644 --- a/test/integrations/destinations/am/router/data.ts +++ b/test/integrations/destinations/am/router/data.ts @@ -32,13 +32,21 @@ export const data = [ ip: '0.0.0.0', age: 26, }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', locale: 'en-US', ip: '0.0.0.0', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, page: { path: '/destinations/amplitude', referrer: '', @@ -56,12 +64,20 @@ export const data = [ originalTimestamp: '2019-10-14T09:03:17.562Z', anonymousId: '123456', userId: '123456', - integrations: { All: true }, + integrations: { + All: true, + }, sentAt: '2019-10-14T09:03:22.563Z', }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, destination: { - Config: { apiKey: 'abcde', groupTypeTrait: 'email', groupValueTrait: 'age' }, + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + }, }, }, { @@ -74,13 +90,24 @@ export const data = [ namespace: 'com.rudderlabs.javascript', version: '1.0.0', }, - traits: { email: 'test@rudderstack.com', anonymousId: '12345' }, - library: { name: 'RudderLabs JavaScript SDK', 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 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, page: { path: '/destinations/amplitude', referrer: '', @@ -109,12 +136,20 @@ export const data = [ initial_referrer: 'https://docs.rudderstack.com', initial_referring_domain: 'docs.rudderstack.com', }, - integrations: { All: true }, + integrations: { + All: true, + }, name: 'ApplicationLoaded', sentAt: '2019-10-14T11:15:53.296Z', }, - metadata: { jobId: 2, userId: 'u1' }, - destination: { Config: { apiKey: 'abcde' } }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, }, ], destType: 'am', @@ -134,7 +169,9 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://api2.amplitude.com/2/httpapi', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, params: {}, body: { JSON: { @@ -171,7 +208,9 @@ export const data = [ ip: '0.0.0.0', }, ], - options: { min_id_length: 1 }, + options: { + min_id_length: 1, + }, }, XML: {}, JSON_ARRAY: {}, @@ -181,11 +220,19 @@ export const data = [ userId: '123456', }, ], - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [ + { + jobId: 1, + }, + ], batched: false, statusCode: 200, destination: { - Config: { apiKey: 'abcde', groupTypeTrait: 'email', groupValueTrait: 'age' }, + Config: { + apiKey: 'abcde', + groupTypeTrait: 'email', + groupValueTrait: 'age', + }, }, }, { @@ -195,7 +242,9 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://api2.amplitude.com/2/httpapi', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, params: {}, body: { JSON: { @@ -236,7 +285,9 @@ export const data = [ time: 1571051718299, }, ], - options: { min_id_length: 1 }, + options: { + min_id_length: 1, + }, }, XML: {}, JSON_ARRAY: {}, @@ -246,10 +297,18 @@ export const data = [ userId: '00000000000000000000000000', }, ], - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, - destination: { Config: { apiKey: 'abcde' } }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, }, ], }, diff --git a/test/integrations/destinations/appcues/router/data.ts b/test/integrations/destinations/appcues/router/data.ts index 729aee7699..ddc8dddf57 100644 --- a/test/integrations/destinations/appcues/router/data.ts +++ b/test/integrations/destinations/appcues/router/data.ts @@ -21,9 +21,15 @@ export const data = [ version: '1.1.9', }, campaign: {}, - library: { name: 'RudderLabs JavaScript SDK', version: '1.1.9' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.9', + }, locale: 'en-GB', - os: { name: '', version: '' }, + os: { + name: '', + version: '', + }, page: { path: '/rudder-sdk-js/tests/html/script-test.html', referrer: '', @@ -31,12 +37,16 @@ export const data = [ title: '', url: 'http://localhost:4321/rudder-sdk-js/tests/html/script-test.html', }, - screen: { density: 2 }, + screen: { + density: 2, + }, traits: {}, 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', }, - integrations: { All: true }, + integrations: { + All: true, + }, messageId: '6a5f38c0-4e75-4268-a066-2b73fbcad01f', originalTimestamp: '2021-01-04T08:25:04.780Z', receivedAt: '2021-01-04T13:55:04.799+05:30', @@ -47,8 +57,15 @@ export const data = [ type: 'identify', userId: 'onlyUserId', }, - metadata: { jobId: 1, userId: 'u1' }, - destination: { Config: { accountId: '86086', useNativeSDK: false } }, + metadata: { + jobId: 1, + }, + destination: { + Config: { + accountId: '86086', + useNativeSDK: false, + }, + }, }, { message: { @@ -62,9 +79,15 @@ export const data = [ version: '1.1.9', }, campaign: {}, - library: { name: 'RudderLabs JavaScript SDK', version: '1.1.9' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.9', + }, locale: 'en-GB', - os: { name: '', version: '' }, + os: { + name: '', + version: '', + }, page: { path: '/rudder-sdk-js/tests/html/script-test.html', referrer: '', @@ -72,12 +95,19 @@ export const data = [ title: '', url: 'http://localhost:4321/rudder-sdk-js/tests/html/script-test.html', }, - screen: { density: 2 }, - traits: { 'first name': 'John', 'last name': 'Abraham' }, + screen: { + density: 2, + }, + traits: { + 'first name': 'John', + 'last name': 'Abraham', + }, 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', }, - integrations: { All: true }, + integrations: { + All: true, + }, messageId: '57494c6a-3c62-4b30-83aa-6e821d37ac75', originalTimestamp: '2021-01-04T08:25:04.786Z', receivedAt: '2021-01-04T13:55:04.799+05:30', @@ -88,8 +118,15 @@ export const data = [ type: 'identify', userId: 'userIdWithProperties', }, - metadata: { jobId: 2, userId: 'u1' }, - destination: { Config: { accountId: '86086', useNativeSDK: false } }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + accountId: '86086', + useNativeSDK: false, + }, + }, }, ], destType: 'appcues', @@ -108,20 +145,34 @@ export const data = [ XML: {}, JSON_ARRAY: {}, FORM: {}, - JSON: { request_id: '6a5f38c0-4e75-4268-a066-2b73fbcad01f', profile_update: {} }, + JSON: { + request_id: '6a5f38c0-4e75-4268-a066-2b73fbcad01f', + profile_update: {}, + }, }, type: 'REST', files: {}, method: 'POST', params: {}, - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://api.appcues.com/v1/accounts/86086/users/onlyUserId/activity', }, - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [ + { + jobId: 1, + }, + ], batched: false, statusCode: 200, - destination: { Config: { accountId: '86086', useNativeSDK: false } }, + destination: { + Config: { + accountId: '86086', + useNativeSDK: false, + }, + }, }, { batchedRequest: { @@ -131,22 +182,36 @@ export const data = [ FORM: {}, JSON: { request_id: '57494c6a-3c62-4b30-83aa-6e821d37ac75', - profile_update: { 'last name': 'Abraham', 'first name': 'John' }, + profile_update: { + 'last name': 'Abraham', + 'first name': 'John', + }, }, }, type: 'REST', files: {}, method: 'POST', params: {}, - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://api.appcues.com/v1/accounts/86086/users/userIdWithProperties/activity', }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, - destination: { Config: { accountId: '86086', useNativeSDK: false } }, + destination: { + Config: { + accountId: '86086', + useNativeSDK: false, + }, + }, }, ], }, diff --git a/test/integrations/destinations/attentive_tag/router/data.ts b/test/integrations/destinations/attentive_tag/router/data.ts index 63bd477f0c..c52a6ed2e3 100644 --- a/test/integrations/destinations/attentive_tag/router/data.ts +++ b/test/integrations/destinations/attentive_tag/router/data.ts @@ -10,16 +10,28 @@ export const data = [ body: { input: [ { - destination: { Config: { apiKey: 'dummyApiKey', signUpSourceId: '241654' } }, - metadata: { jobId: 1, userId: 'u1' }, + destination: { + Config: { + apiKey: 'dummyApiKey', + signUpSourceId: '241654', + }, + }, + metadata: { + jobId: 1, + }, message: { anonymousId: '4eb021e9-a2af-4926-ae82-fe996d12f3c5', channel: 'web', context: { locale: 'en-GB', - os: { name: '', version: '' }, + os: { + name: '', + version: '', + }, traits: { - company: { id: 'abc123' }, + company: { + id: 'abc123', + }, createdAt: 'Thu Mar 24 2016 17:46:45 GMT+0000 (UTC)', email: 'test0@gmail.com', phone: '+16465453911', @@ -27,14 +39,26 @@ export const data = [ userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.80 Safari/537.36', externalId: [ - { type: 'clientUsrId', id: 1 }, - { type: 'shopifyId', id: 1 }, - { type: 'klaviyoId', id: 1 }, + { + type: 'clientUsrId', + id: 1, + }, + { + type: 'shopifyId', + id: 1, + }, + { + type: 'klaviyoId', + id: 1, + }, ], }, integrations: { All: true, - attentive_tag: { signUpSourceId: '241654', identifyOperation: 'unsubscribe' }, + attentive_tag: { + signUpSourceId: '241654', + identifyOperation: 'unsubscribe', + }, }, messageId: 'e108eb05-f6cd-4624-ba8c-568f2e2b3f92', receivedAt: '2020-10-16T13:56:14.945+05:30', @@ -64,17 +88,31 @@ export const data = [ }, params: {}, body: { - JSON: { user: { phone: '+16465453911', email: 'test0@gmail.com' } }, + JSON: { + user: { + phone: '+16465453911', + email: 'test0@gmail.com', + }, + }, JSON_ARRAY: {}, XML: {}, FORM: {}, }, files: {}, }, - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [ + { + jobId: 1, + }, + ], batched: false, statusCode: 200, - destination: { Config: { apiKey: 'dummyApiKey', signUpSourceId: '241654' } }, + destination: { + Config: { + apiKey: 'dummyApiKey', + signUpSourceId: '241654', + }, + }, }, ], }, diff --git a/test/integrations/destinations/autopilot/router/data.ts b/test/integrations/destinations/autopilot/router/data.ts index 92117a97c8..cbfe0c4207 100644 --- a/test/integrations/destinations/autopilot/router/data.ts +++ b/test/integrations/destinations/autopilot/router/data.ts @@ -17,18 +17,28 @@ export const data = [ ID: '1afjX4MlAucK57Q0ctTVlD27Tvo', Name: 'AUTOPILOT', DisplayName: 'Autopilot', - Config: { excludeKeys: [], includeKeys: [] }, + Config: { + excludeKeys: [], + includeKeys: [], + }, }, Config: { apiKey: 'dummyApiKey', - customMappings: [{ from: '0001', to: 'Signup' }], + customMappings: [ + { + from: '0001', + to: 'Signup', + }, + ], triggerId: '00XX', }, Enabled: true, Transformations: [], IsProcessorEnabled: true, }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, message: { anonymousId: 'ac7722c2-ccb6-4ae2-baf6-1effe861f4cd', channel: 'web', @@ -39,9 +49,15 @@ export const data = [ namespace: 'com.rudderlabs.javascript', version: '1.1.1-rc.2', }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.1.1-rc.2' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.1-rc.2', + }, locale: 'en-GB', - os: { name: '', version: '' }, + os: { + name: '', + version: '', + }, page: { path: '/tests/html/index4.html', referrer: '', @@ -49,17 +65,25 @@ export const data = [ title: '', url: 'http://localhost/tests/html/index4.html', }, - screen: { density: 2 }, + screen: { + density: 2, + }, userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36', }, - integrations: { All: true }, + integrations: { + All: true, + }, messageId: 'fad9b3fb-5778-4db3-9fb6-7168b554191f', originalTimestamp: '2020-04-17T14:42:44.722Z', receivedAt: '2020-04-17T20:12:44.758+05:30', request_ip: '[::1]:53513', sentAt: '2020-04-17T14:42:44.722Z', - traits: { age: 23, email: 'testmp@rudderstack.com', firstname: 'Test Kafka' }, + traits: { + age: 23, + email: 'testmp@rudderstack.com', + firstname: 'Test Kafka', + }, timestamp: '2020-04-17T20:12:44.758+05:30', type: 'identify', userId: 'user12345', @@ -73,18 +97,28 @@ export const data = [ ID: '1afjX4MlAucK57Q0ctTVlD27Tvo', Name: 'AUTOPILOT', DisplayName: 'Autopilot', - Config: { excludeKeys: [], includeKeys: [] }, + Config: { + excludeKeys: [], + includeKeys: [], + }, }, Config: { apiKey: 'dummyApiKey', - customMappings: [{ from: '0001', to: 'Signup' }], + customMappings: [ + { + from: '0001', + to: 'Signup', + }, + ], triggerId: '00XX', }, Enabled: true, Transformations: [], IsProcessorEnabled: true, }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, message: { anonymousId: 'ac7722c2-ccb6-4ae2-baf6-1effe861f4cd', channel: 'web', @@ -95,9 +129,15 @@ export const data = [ namespace: 'com.rudderlabs.javascript', version: '1.1.1-rc.2', }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.1.1-rc.2' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.1-rc.2', + }, locale: 'en-GB', - os: { name: '', version: '' }, + os: { + name: '', + version: '', + }, page: { path: '/tests/html/index4.html', referrer: '', @@ -105,16 +145,27 @@ export const data = [ title: '', url: 'http://localhost/tests/html/index4.html', }, - screen: { density: 2 }, - traits: { age: 23, email: 'testmp@rudderstack.com', firstname: 'Test Kafka' }, + screen: { + density: 2, + }, + traits: { + age: 23, + email: 'testmp@rudderstack.com', + firstname: 'Test Kafka', + }, userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36', }, event: 'test track with property', - integrations: { All: true }, + integrations: { + All: true, + }, messageId: '37b75e61-9bd2-4fb8-91ed-e3a064905f3a', originalTimestamp: '2020-04-17T14:42:44.724Z', - properties: { test_prop_1: 'test prop', test_prop_2: 1232 }, + properties: { + test_prop_1: 'test prop', + test_prop_2: 1232, + }, receivedAt: '2020-04-17T20:12:44.758+05:30', request_ip: '[::1]:53512', sentAt: '2020-04-17T14:42:44.725Z', @@ -151,7 +202,9 @@ export const data = [ contact: { Email: 'testmp@rudderstack.com', FirstName: 'Test Kafka', - custom: { age: 23 }, + custom: { + age: 23, + }, }, }, XML: {}, @@ -161,7 +214,11 @@ export const data = [ files: {}, userId: 'ac7722c2-ccb6-4ae2-baf6-1effe861f4cd', }, - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [ + { + jobId: 1, + }, + ], batched: false, statusCode: 200, destination: { @@ -171,11 +228,19 @@ export const data = [ ID: '1afjX4MlAucK57Q0ctTVlD27Tvo', Name: 'AUTOPILOT', DisplayName: 'Autopilot', - Config: { excludeKeys: [], includeKeys: [] }, + Config: { + excludeKeys: [], + includeKeys: [], + }, }, Config: { apiKey: 'dummyApiKey', - customMappings: [{ from: '0001', to: 'Signup' }], + customMappings: [ + { + from: '0001', + to: 'Signup', + }, + ], triggerId: '00XX', }, Enabled: true, @@ -197,7 +262,12 @@ export const data = [ }, params: {}, body: { - JSON: { property: { test_prop_1: 'test prop', test_prop_2: 1232 } }, + JSON: { + property: { + test_prop_1: 'test prop', + test_prop_2: 1232, + }, + }, XML: {}, JSON_ARRAY: {}, FORM: {}, @@ -205,7 +275,11 @@ export const data = [ files: {}, userId: 'ac7722c2-ccb6-4ae2-baf6-1effe861f4cd', }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { @@ -215,11 +289,19 @@ export const data = [ ID: '1afjX4MlAucK57Q0ctTVlD27Tvo', Name: 'AUTOPILOT', DisplayName: 'Autopilot', - Config: { excludeKeys: [], includeKeys: [] }, + Config: { + excludeKeys: [], + includeKeys: [], + }, }, Config: { apiKey: 'dummyApiKey', - customMappings: [{ from: '0001', to: 'Signup' }], + customMappings: [ + { + from: '0001', + to: 'Signup', + }, + ], triggerId: '00XX', }, Enabled: true, diff --git a/test/integrations/destinations/blueshift/router/data.ts b/test/integrations/destinations/blueshift/router/data.ts index 7104beb873..7c92ff1d74 100644 --- a/test/integrations/destinations/blueshift/router/data.ts +++ b/test/integrations/destinations/blueshift/router/data.ts @@ -17,7 +17,9 @@ export const data = [ datacenterEU: false, }, }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, message: { context: { app: { @@ -49,7 +51,9 @@ export const data = [ datacenterEU: false, }, }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, message: { context: { ip: '14.5.67.21', @@ -63,8 +67,16 @@ export const data = [ type: 'Android', attTrackingStatus: 3, }, - os: { name: 'Android', version: '9' }, - network: { bluetooth: false, carrier: 'Android', cellular: true, wifi: true }, + os: { + name: 'Android', + version: '9', + }, + network: { + bluetooth: false, + carrier: 'Android', + cellular: true, + wifi: true, + }, address: { city: 'kolkata', country: 'India', @@ -75,7 +87,9 @@ export const data = [ street: 'rajnagar', }, }, - properties: { cookie: '1234abcd-efghijkj-1234kfjadslk-34iu123' }, + properties: { + cookie: '1234abcd-efghijkj-1234kfjadslk-34iu123', + }, messageId: '34abcd-efghijkj-1234kf', type: 'track', event: 'identify', @@ -90,7 +104,9 @@ export const data = [ datacenterEU: false, }, }, - metadata: { jobId: 3, userId: 'u1' }, + metadata: { + jobId: 3, + }, message: { channel: 'web', context: { @@ -100,13 +116,21 @@ 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 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', locale: 'en-US', ip: '0.0.0.0', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, }, messageId: '84e26acc-56a5-4835-8233-591137fca468', session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', @@ -133,7 +157,10 @@ export const data = [ msgemail: true, msgwhatsapp: false, custom_tags: ['Test_User', 'Interested_User', 'DIY_Hobby'], - custom_mappings: { Office: 'Trastkiv', Country: 'Russia' }, + custom_mappings: { + Office: 'Trastkiv', + Country: 'Russia', + }, address: { city: 'kolkata', country: 'India', @@ -142,7 +169,9 @@ export const data = [ street: '', }, }, - integrations: { All: true }, + integrations: { + All: true, + }, sentAt: '2019-10-14T09:03:22.563Z', }, }, @@ -181,7 +210,11 @@ export const data = [ }, files: {}, }, - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [ + { + jobId: 1, + }, + ], batched: false, statusCode: 200, destination: { @@ -226,7 +259,11 @@ export const data = [ version: '1', endpoint: 'https://api.getblueshift.com/api/v1/event', }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { @@ -270,7 +307,10 @@ export const data = [ msgemail: true, msgwhatsapp: false, custom_tags: ['Test_User', 'Interested_User', 'DIY_Hobby'], - custom_mappings: { Office: 'Trastkiv', Country: 'Russia' }, + custom_mappings: { + Office: 'Trastkiv', + Country: 'Russia', + }, address: { city: 'kolkata', country: 'India', @@ -285,7 +325,11 @@ export const data = [ }, files: {}, }, - metadata: [{ jobId: 3, userId: 'u1' }], + metadata: [ + { + jobId: 3, + }, + ], batched: false, statusCode: 200, destination: { diff --git a/test/integrations/destinations/branch/router/data.ts b/test/integrations/destinations/branch/router/data.ts index 6451c463f1..4c87145b7e 100644 --- a/test/integrations/destinations/branch/router/data.ts +++ b/test/integrations/destinations/branch/router/data.ts @@ -11,7 +11,10 @@ export const data = [ input: [ { destination: { - Config: { branchKey: '', useNativeSDK: false }, + Config: { + branchKey: '', + useNativeSDK: false, + }, DestinationDefinition: { DisplayName: 'Branch Metrics', ID: '1WTpBSTiL3iAUHUdW7rHT4sawgU', @@ -22,7 +25,9 @@ export const data = [ Name: 'branch test', Transformations: [], }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, message: { anonymousId: 'sampath', channel: 'web', @@ -34,19 +39,34 @@ export const data = [ version: '1.0.0', }, ip: '0.0.0.0', - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, locale: 'en-US', - os: { name: 'iOS', version: '' }, - screen: { density: 2 }, - traits: { anonymousId: 'sampath', email: 'sampath@gmail.com' }, + os: { + name: 'iOS', + version: '', + }, + screen: { + density: 2, + }, + traits: { + anonymousId: 'sampath', + email: 'sampath@gmail.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', }, event: 'product added', - integrations: { All: true }, + integrations: { + All: true, + }, messageId: 'ea5cfab2-3961-4d8a-8187-3d1858c90a9f', originalTimestamp: '2020-01-17T04:53:51.185Z', - properties: { name: 'sampath' }, + properties: { + name: 'sampath', + }, receivedAt: '2020-01-17T10:23:52.688+05:30', request_ip: '[::1]:64059', sentAt: '2020-01-17T04:53:52.667Z', @@ -57,7 +77,10 @@ export const data = [ }, { destination: { - Config: { branchKey: '', useNativeSDK: false }, + Config: { + branchKey: '', + useNativeSDK: false, + }, DestinationDefinition: { DisplayName: 'Branch Metrics', ID: '1WTpBSTiL3iAUHUdW7rHT4sawgU', @@ -68,7 +91,9 @@ export const data = [ Name: 'branch test', Transformations: [], }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, message: { anonymousId: 'sampath', channel: 'web', @@ -80,15 +105,28 @@ export const data = [ version: '1.0.0', }, ip: '0.0.0.0', - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, locale: 'en-US', - os: { name: 'iOS', version: '' }, - screen: { density: 2 }, + os: { + name: 'iOS', + 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.88 Safari/537.36', }, - integrations: { All: true }, - traits: { anonymousId: 'sampath', email: 'sampath@gmail.com' }, + integrations: { + All: true, + }, + traits: { + anonymousId: 'sampath', + email: 'sampath@gmail.com', + }, messageId: 'ea5cfab2-3961-4d8a-8187-3d1858c90a9f', originalTimestamp: '2020-01-17T04:53:51.185Z', receivedAt: '2020-01-17T10:23:52.688+05:30', @@ -116,13 +154,20 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://api2.branch.io/v2/event/standard', - headers: { 'Content-Type': 'application/json', Accept: 'application/json' }, + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + }, params: {}, body: { JSON: { branch_key: '', name: 'ADD_TO_CART', - content_items: [{ $product_name: 'sampath' }], + content_items: [ + { + $product_name: 'sampath', + }, + ], user_data: { os: 'iOS', os_version: '', @@ -140,11 +185,18 @@ export const data = [ files: {}, userId: 'sampath', }, - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [ + { + jobId: 1, + }, + ], batched: false, statusCode: 200, destination: { - Config: { branchKey: '', useNativeSDK: false }, + Config: { + branchKey: '', + useNativeSDK: false, + }, DestinationDefinition: { DisplayName: 'Branch Metrics', ID: '1WTpBSTiL3iAUHUdW7rHT4sawgU', @@ -162,13 +214,19 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://api2.branch.io/v2/event/custom', - headers: { 'Content-Type': 'application/json', Accept: 'application/json' }, + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + }, params: {}, body: { JSON: { branch_key: '', name: 'sampath', - custom_data: { anonymousId: 'sampath', email: 'sampath@gmail.com' }, + custom_data: { + anonymousId: 'sampath', + email: 'sampath@gmail.com', + }, content_items: [{}], user_data: { os: 'iOS', @@ -187,11 +245,18 @@ export const data = [ files: {}, userId: 'sampath', }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { - Config: { branchKey: '', useNativeSDK: false }, + Config: { + branchKey: '', + useNativeSDK: false, + }, DestinationDefinition: { DisplayName: 'Branch Metrics', ID: '1WTpBSTiL3iAUHUdW7rHT4sawgU', diff --git a/test/integrations/destinations/braze/router/data.ts b/test/integrations/destinations/braze/router/data.ts index 76201bda41..2e3be35b01 100644 --- a/test/integrations/destinations/braze/router/data.ts +++ b/test/integrations/destinations/braze/router/data.ts @@ -27,7 +27,9 @@ export const data = [ Name: 'Braze', Transformations: [], }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, message: { anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', channel: 'web', @@ -39,15 +41,25 @@ export const data = [ version: '1.0.5', }, ip: '0.0.0.0', - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.5' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, locale: 'en-GB', - os: { name: '', version: '' }, - screen: { density: 2 }, + 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 }, + integrations: { + All: true, + }, messageId: 'dd266c67-9199-4a52-ba32-f46ddde67312', originalTimestamp: '2020-01-24T06:29:02.358Z', properties: { @@ -83,7 +95,9 @@ export const data = [ Name: 'Braze', Transformations: [], }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, message: { anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', channel: 'web', @@ -95,10 +109,18 @@ export const data = [ version: '1.0.5', }, ip: '0.0.0.0', - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.5' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, locale: 'en-GB', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, traits: { city: 'Disney', country: 'USA', @@ -108,7 +130,9 @@ 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.117 Safari/537.36', }, - integrations: { All: true }, + 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', @@ -138,11 +162,16 @@ export const data = [ Name: 'Braze', Transformations: [], }, - metadata: { jobId: 3, userId: 'u1' }, + metadata: { + jobId: 3, + }, message: { anonymousId: '56yrtsdfgbgxcb-22b4-401d-aae5-1b994be9a969', groupId: 'c90f0fd2-2a02-4f2f-bf07-7e7d2c2ed2b1', - traits: { phone: '5055077683', subscriptionState: 'subscribed' }, + traits: { + phone: '5055077683', + subscriptionState: 'subscribed', + }, userId: 'user123', type: 'group', }, @@ -166,11 +195,16 @@ export const data = [ Name: 'Braze', Transformations: [], }, - metadata: { jobId: 4, userId: 'u1' }, + metadata: { + jobId: 4, + }, message: { anonymousId: 'dfgdfgdfg-22b4-401d-aae5-1b994be9a969', groupId: '58d0a278-b55b-4f10-b7d2-98d1c5dd4c30', - traits: { phone: '5055077683', subscriptionState: 'subscribed' }, + traits: { + phone: '5055077683', + subscriptionState: 'subscribed', + }, userId: 'user877', type: 'group', }, @@ -194,8 +228,14 @@ export const data = [ Name: 'Braze', Transformations: [], }, - metadata: { jobId: 5, userId: 'u1' }, - message: { type: 'alias', previousId: 'adsfsaf', userId: 'dsafsdf' }, + metadata: { + jobId: 5, + }, + message: { + type: 'alias', + previousId: 'adsfsaf', + userId: 'dsafsdf', + }, }, { destination: { @@ -216,8 +256,14 @@ export const data = [ Name: 'Braze', Transformations: [], }, - metadata: { jobId: 6, userId: 'u1' }, - message: { type: 'alias', previousId: 'adsfsaf2', userId: 'dsafsdf2' }, + metadata: { + jobId: 6, + }, + message: { + type: 'alias', + previousId: 'adsfsaf2', + userId: 'dsafsdf2', + }, }, ], destType: 'braze', @@ -333,12 +379,20 @@ export const data = [ JSON: { merge_updates: [ { - identifier_to_keep: { external_id: 'dsafsdf' }, - identifier_to_merge: { external_id: 'adsfsaf' }, + identifier_to_keep: { + external_id: 'dsafsdf', + }, + identifier_to_merge: { + external_id: 'adsfsaf', + }, }, { - identifier_to_keep: { external_id: 'dsafsdf2' }, - identifier_to_merge: { external_id: 'adsfsaf2' }, + identifier_to_keep: { + external_id: 'dsafsdf2', + }, + identifier_to_merge: { + external_id: 'adsfsaf2', + }, }, ], }, @@ -350,12 +404,24 @@ export const data = [ }, ], metadata: [ - { jobId: 1, userId: 'u1' }, - { jobId: 2, userId: 'u1' }, - { jobId: 3, userId: 'u1' }, - { jobId: 4, userId: 'u1' }, - { jobId: 5, userId: 'u1' }, - { jobId: 6, userId: 'u1' }, + { + jobId: 1, + }, + { + jobId: 2, + }, + { + jobId: 3, + }, + { + jobId: 4, + }, + { + jobId: 5, + }, + { + jobId: 6, + }, ], batched: true, statusCode: 200, @@ -415,7 +481,9 @@ export const data = [ IsProcessorEnabled: true, RevisionID: '2N9Uaf2tWq2QRmatBWQm03Rz6qX', }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, message: { type: 'track', event: 'Sign In Completed', @@ -435,10 +503,17 @@ export const data = [ account_region: 'ON', is_pickup_selected: 'false', has_tradein_attempt: false, - custom_obj_attr: { key1: 'value1', key2: 'value2', key4: 'value4' }, + custom_obj_attr: { + key1: 'value1', + key2: 'value2', + key4: 'value4', + }, custom_arr: [1, 2, 'str1'], }, - library: { name: 'RudderLabs JavaScript SDK', version: '2.9.5' }, + 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', @@ -485,7 +560,9 @@ export const data = [ IsProcessorEnabled: true, RevisionID: '2N9Uaf2tWq2QRmatBWQm03Rz6qX', }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, message: { type: 'track', event: 'Sign In Completed', @@ -505,10 +582,17 @@ export const data = [ account_region: 'ON', is_pickup_selected: 'true', has_tradein_attempt: false, - custom_obj_attr: { key1: 'value1', key2: 'value2', key4: 'value4' }, + custom_obj_attr: { + key1: 'value1', + key2: 'value2', + key4: 'value4', + }, custom_arr: ['1', '2', 'str1'], }, - library: { name: 'RudderLabs JavaScript SDK', version: '2.9.5' }, + 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', @@ -555,7 +639,9 @@ export const data = [ IsProcessorEnabled: true, RevisionID: '2N9Uaf2tWq2QRmatBWQm03Rz6qX', }, - metadata: { jobId: 3, userId: 'u1' }, + metadata: { + jobId: 3, + }, message: { anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', channel: 'web', @@ -567,10 +653,18 @@ export const data = [ version: '1.0.5', }, ip: '0.0.0.0', - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.5' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, locale: 'en-GB', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, traits: { city: 'Disney', country: 'USA', @@ -580,7 +674,9 @@ 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.117 Safari/537.36', }, - integrations: { All: true }, + integrations: { + All: true, + }, messageId: '2536eda4-d638-4c93-8014-8ffe3f083214', type: 'identify', userId: 'user@50', @@ -609,7 +705,9 @@ export const data = [ IsProcessorEnabled: true, RevisionID: '2N9Uaf2tWq2QRmatBWQm03Rz6qX', }, - metadata: { jobId: 4, userId: 'u1' }, + metadata: { + jobId: 4, + }, message: { anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', channel: 'web', @@ -621,10 +719,18 @@ export const data = [ version: '1.0.5', }, ip: '0.0.0.0', - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.5' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, locale: 'en-GB', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, traits: { city: 'Disney', country: 'USA', @@ -634,7 +740,9 @@ 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.117 Safari/537.36', }, - integrations: { All: true }, + integrations: { + All: true, + }, messageId: '2536eda4-d638-4c93-8014-8ffe3f083214', type: 'identify', userId: 'user@50', @@ -673,7 +781,11 @@ export const data = [ subscribe_once: true, pwa: true, external_id: 'braze_test_user', - custom_obj_attr: { key1: 'value1', key2: 'value2', key4: 'value4' }, + custom_obj_attr: { + key1: 'value1', + key2: 'value2', + key4: 'value4', + }, }, { last_name: 'Miranda 2', @@ -730,9 +842,15 @@ export const data = [ }, ], metadata: [ - { jobId: 1, userId: 'u1' }, - { jobId: 2, userId: 'u1' }, - { jobId: 3, userId: 'u1' }, + { + jobId: 1, + }, + { + jobId: 2, + }, + { + jobId: 3, + }, ], batched: true, statusCode: 200, @@ -771,7 +889,11 @@ export const data = [ }, statusCode: 400, batched: false, - metadata: [{ jobId: 4, userId: 'u1' }], + metadata: [ + { + jobId: 4, + }, + ], destination: { ID: '2N9UakqKF0D35wfzSeofIxPdL8X', Name: 'Braze-Test', diff --git a/test/integrations/destinations/campaign_manager/router/data.ts b/test/integrations/destinations/campaign_manager/router/data.ts index 5b4e5bcce4..2ab1813cf8 100644 --- a/test/integrations/destinations/campaign_manager/router/data.ts +++ b/test/integrations/destinations/campaign_manager/router/data.ts @@ -17,7 +17,6 @@ export const data = [ developer_token: 'ijkl91011', }, jobId: 1, - userId: 'u1', }, destination: { Config: { @@ -57,13 +56,21 @@ export const data = [ postalCode: 'EC3M', streetAddress: '71 Cherry Court SOUTHAMPTON SO53 5PD UK', }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', locale: 'en-US', ip: '0.0.0.0', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, }, event: 'Promotion Clicked', originalTimestamp: '2022-11-17T00:22:02.903+05:30', @@ -84,7 +91,9 @@ export const data = [ }, type: 'track', anonymousId: 'randomId', - integrations: { All: true }, + integrations: { + All: true, + }, name: 'ApplicationLoaded', sentAt: '2022-11-17T00:22:02.903+05:30', }, @@ -97,7 +106,6 @@ export const data = [ developer_token: 'ijkl91011', }, jobId: 2, - userId: 'u1', }, destination: { Config: { @@ -137,13 +145,21 @@ export const data = [ postalCode: 'EC3M', streetAddress: '71 Cherry Court SOUTHAMPTON SO53 5PD UK', }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', locale: 'en-US', ip: '0.0.0.0', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, }, event: 'Promotion Clicked', type: 'track', @@ -164,7 +180,9 @@ export const data = [ requestType: 'batchupdate', }, anonymousId: 'randomId', - integrations: { All: true }, + integrations: { + All: true, + }, name: 'ApplicationLoaded', sentAt: '2022-11-17T00:22:02.903+05:30', }, @@ -177,7 +195,6 @@ export const data = [ developer_token: 'ijkl91011', }, jobId: 3, - userId: 'u1', }, destination: { Config: { @@ -217,13 +234,21 @@ export const data = [ postalCode: 'EC3M', streetAddress: '71 Cherry Court SOUTHAMPTON SO53 5PD UK', }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', locale: 'en-US', ip: '0.0.0.0', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, }, event: 'Promotion Clicked', type: 'track', @@ -247,7 +272,9 @@ export const data = [ requestType: 'randomValue', }, anonymousId: 'randomId', - integrations: { All: true }, + integrations: { + All: true, + }, name: 'ApplicationLoaded', sentAt: '2022-11-17T00:22:02.903+05:30', }, @@ -314,7 +341,6 @@ export const data = [ refresh_token: 'efgh5678', }, jobId: 1, - userId: 'u1', }, ], batched: true, @@ -378,7 +404,6 @@ export const data = [ refresh_token: 'efgh5678', }, jobId: 2, - userId: 'u1', }, ], batched: true, @@ -414,7 +439,6 @@ export const data = [ refresh_token: 'efgh5678', }, jobId: 3, - userId: 'u1', }, ], statusCode: 400, @@ -450,7 +474,6 @@ export const data = [ developer_token: 'ijkl91011', }, jobId: 4, - userId: 'u1', }, destination: { Config: { @@ -479,7 +502,9 @@ export const data = [ }, type: 'track', anonymousId: 'randomId', - integrations: { All: true }, + integrations: { + All: true, + }, name: 'ApplicationLoaded', sentAt: '2022-11-17T00:22:02.903+05:30', }, @@ -492,7 +517,6 @@ export const data = [ developer_token: 'ijkl91011', }, jobId: 5, - userId: 'u1', }, destination: { Config: { @@ -521,7 +545,9 @@ export const data = [ requestType: 'batchinsert', }, anonymousId: 'randomId', - integrations: { All: true }, + integrations: { + All: true, + }, name: 'ApplicationLoaded', sentAt: '2022-11-17T00:22:02.903+05:30', }, @@ -534,7 +560,6 @@ export const data = [ developer_token: 'ijkl91011', }, jobId: 6, - userId: 'u1', }, destination: { Config: { @@ -563,7 +588,9 @@ export const data = [ requestType: 'batchinsert', }, anonymousId: 'randomId', - integrations: { All: true }, + integrations: { + All: true, + }, name: 'ApplicationLoaded', sentAt: '2022-11-17T00:22:02.903+05:30', }, @@ -650,7 +677,6 @@ export const data = [ developer_token: 'ijkl91011', }, jobId: 4, - userId: 'u1', }, { secret: { @@ -659,7 +685,6 @@ export const data = [ developer_token: 'ijkl91011', }, jobId: 5, - userId: 'u1', }, { secret: { @@ -668,7 +693,6 @@ export const data = [ developer_token: 'ijkl91011', }, jobId: 6, - userId: 'u1', }, ], batched: true, @@ -706,7 +730,6 @@ export const data = [ developer_token: 'ijkl91011', }, jobId: 4, - userId: 'u1', }, destination: { Config: { @@ -735,7 +758,9 @@ export const data = [ }, type: 'track', anonymousId: 'randomId', - integrations: { All: true }, + integrations: { + All: true, + }, name: 'ApplicationLoaded', sentAt: '2022-11-17T00:22:02.903+05:30', }, @@ -748,7 +773,6 @@ export const data = [ developer_token: 'ijkl91011', }, jobId: 5, - userId: 'u1', }, destination: { Config: { @@ -777,7 +801,9 @@ export const data = [ requestType: 'batchupdate', }, anonymousId: 'randomId', - integrations: { All: true }, + integrations: { + All: true, + }, name: 'ApplicationLoaded', sentAt: '2022-11-17T00:22:02.903+05:30', }, @@ -790,7 +816,6 @@ export const data = [ developer_token: 'ijkl91011', }, jobId: 6, - userId: 'u1', }, destination: { Config: { @@ -819,7 +844,9 @@ export const data = [ requestType: 'batchinsert', }, anonymousId: 'randomId', - integrations: { All: true }, + integrations: { + All: true, + }, name: 'ApplicationLoaded', sentAt: '2022-11-17T00:22:02.903+05:30', }, @@ -889,7 +916,6 @@ export const data = [ developer_token: 'ijkl91011', }, jobId: 4, - userId: 'u1', }, { secret: { @@ -898,7 +924,6 @@ export const data = [ developer_token: 'ijkl91011', }, jobId: 5, - userId: 'u1', }, ], batched: true, @@ -958,7 +983,6 @@ export const data = [ developer_token: 'ijkl91011', }, jobId: 6, - userId: 'u1', }, ], batched: true, @@ -996,7 +1020,6 @@ export const data = [ developer_token: 'ijkl91011', }, jobId: 4, - userId: 'u1', }, destination: { Config: { @@ -1024,7 +1047,9 @@ export const data = [ }, type: 'track', anonymousId: 'randomId', - integrations: { All: true }, + integrations: { + All: true, + }, name: 'ApplicationLoaded', sentAt: '2022-11-17T00:22:02.903+05:30', }, @@ -1037,7 +1062,6 @@ export const data = [ developer_token: 'ijkl91011', }, jobId: 5, - userId: 'u1', }, destination: { Config: { @@ -1065,7 +1089,9 @@ export const data = [ requestType: 'batchupdate', }, anonymousId: 'randomId', - integrations: { All: true }, + integrations: { + All: true, + }, name: 'ApplicationLoaded', sentAt: '2022-11-17T00:22:02.903+05:30', }, @@ -1078,7 +1104,6 @@ export const data = [ developer_token: 'ijkl91011', }, jobId: 6, - userId: 'u1', }, destination: { Config: { @@ -1099,6 +1124,7 @@ export const data = [ floodlightConfigurationId: '213123123', floodlightActivityId: '456543345245', value: 7, + ordinal: '1', quantity: '455678', limitAdTracking: true, @@ -1106,7 +1132,9 @@ export const data = [ requestType: 'batchinsert', }, anonymousId: 'randomId', - integrations: { All: true }, + integrations: { + All: true, + }, name: 'ApplicationLoaded', sentAt: '2022-11-17T00:22:02.903+05:30', }, @@ -1131,7 +1159,6 @@ export const data = [ developer_token: 'ijkl91011', }, jobId: 4, - userId: 'u1', }, ], batched: false, @@ -1165,7 +1192,6 @@ export const data = [ developer_token: 'ijkl91011', }, jobId: 5, - userId: 'u1', }, ], batched: false, @@ -1199,7 +1225,6 @@ export const data = [ developer_token: 'ijkl91011', }, jobId: 6, - userId: 'u1', }, ], batched: false, diff --git a/test/integrations/destinations/candu/router/data.ts b/test/integrations/destinations/candu/router/data.ts index e6c7d96a15..8aa6441881 100644 --- a/test/integrations/destinations/candu/router/data.ts +++ b/test/integrations/destinations/candu/router/data.ts @@ -18,7 +18,9 @@ export const data = [ Name: 'CANDU', DisplayName: 'Candu', Config: { - destConfig: { defaultConfig: ['apiKey'] }, + destConfig: { + defaultConfig: ['apiKey'], + }, excludeKeys: [], includeKeys: [ 'apiKey', @@ -45,12 +47,16 @@ export const data = [ }, ResponseRules: {}, }, - Config: { apiKey: 'FXLkLUEhGJyvmY4' }, + Config: { + apiKey: 'FXLkLUEhGJyvmY4', + }, Enabled: true, Transformations: [], IsProcessorEnabled: true, }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, message: { anonymousId: 'a1b2c3d4e5f6g7h8i9j10', channel: 'mobile', @@ -71,21 +77,32 @@ export const data = [ attTrackingStatus: 3, }, ip: '0.0.0.0', - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, locale: 'en-US', - os: { name: 'watchos' }, - screen: { density: 2 }, + os: { + name: 'watchos', + }, + screen: { + density: 2, + }, traits: { email: 'sampath@gmail.com', name: 'Joker', Gender: 'male', - foo: { foo: 'bar' }, + foo: { + foo: 'bar', + }, }, userAgent: 'Mozilla/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 added', - integrations: { All: true }, + integrations: { + All: true, + }, messageId: 'ea5cfab2-3961-4d8a-8187-3d1858c90a9f', originalTimestamp: '2020-01-17T04:53:51.185Z', receivedAt: '2020-01-17T10:23:52.688+05:30', @@ -139,7 +156,11 @@ export const data = [ }, files: {}, }, - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [ + { + jobId: 1, + }, + ], batched: false, statusCode: 200, destination: { diff --git a/test/integrations/destinations/clevertap/dataDelivery/data.ts b/test/integrations/destinations/clevertap/dataDelivery/data.ts index 8032dd50c8..bc8866823e 100644 --- a/test/integrations/destinations/clevertap/dataDelivery/data.ts +++ b/test/integrations/destinations/clevertap/dataDelivery/data.ts @@ -1,230 +1,227 @@ export const data = [ { - name: 'clevertap', - description: 'Test 0', - feature: 'dataDelivery', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - 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', + "name": "clevertap", + "description": "Test 0", + "feature": "dataDelivery", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "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: [ + "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":""}', + "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', - }, - ], + "identity": "anon_id" + } + ] }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - params: { - destination: 'clevertap', + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} }, + "files": {}, + "params": { + "destination": "clevertap" + } }, - method: 'POST', - }, + "method": "POST" + } }, - output: { - response: { - status: 200, - body: { - output: { - status: 200, - message: 'Request Processed Successfully', - destinationResponse: { - response: { - status: 'success', - processed: 1, - unprocessed: [], + "output": { + "response": { + "status": 200, + "body": { + "output": { + "status": 200, + "message": "Request Processed Successfully", + "destinationResponse": { + "response": { + "status": "success", + "processed": 1, + "unprocessed": [] }, - status: 200, - }, - }, - }, - }, - }, + "status": 200 + } + } + } + } + } }, { - name: 'clevertap', - description: 'Test 1', - feature: 'dataDelivery', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - body: { - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - JSON: { - d: [ + "name": "clevertap", + "description": "Test 1", + "feature": "dataDelivery", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "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', + "identity": "anon-id-new", + "type": "event", + "evtName": "Web Page Viewed: Rudder", + "evtData": { + "title": "Home", + "path": "/" + } + } + ] + } }, - version: '1', - endpoint: 'https://api.clevertap.com/1/upload/test2', - params: { - destination: 'clevertap', + "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" + } }, - method: 'POST', - }, + "method": "POST" + } }, - output: { - response: { - status: 401, - body: { - output: { - status: 401, - message: 'Request failed with status: 401', - destinationResponse: { - response: { - status: 'fail', - error: 'Invalid Credentials', - code: 401, + "output": { + "response": { + "status": 401, + "body": { + "output": { + "status": 401, + "message": "Request failed with status: 401", + "destinationResponse": { + "response": { + "status": "fail", + "error": "Invalid Credentials", + "code": 401 }, - status: 401, + "status": 401 }, - statTags: { - destType: 'CLEVERTAP', - errorCategory: 'network', - destinationId: 'Non-determininable', - workspaceId: 'Non-determininable', - errorType: 'aborted', - feature: 'dataDelivery', - implementation: 'native', - module: 'destination', - }, - }, - }, - }, - }, + "statTags": { + "destType": "CLEVERTAP", + "errorCategory": "network", + "destinationId": "Non-determininable", + "workspaceId": "Non-determininable", + "errorType": "aborted", + "feature": "dataDelivery", + "implementation": "native", + "module": "destination" + } + } + } + } + } }, { - name: 'clevertap', - description: 'Test 2', - feature: 'dataDelivery', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - body: { - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - JSON: { - d: [ + "name": "clevertap", + "description": "Test 2", + "feature": "dataDelivery", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "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', + "identity": "anon-id-new", + "type": "event", + "evtData": { + "title": "Home", + "path": "/" + } + } + ] + } }, - version: '1', - endpoint: 'https://api.clevertap.com/1/upload/test3', - params: { - destination: 'clevertap', + "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" + } }, - method: 'POST', - }, + "method": "POST" + } }, - output: { - response: { - status: 400, - body: { - output: { - status: 400, - message: 'Request failed with status: 200', - destinationResponse: { - response: { - status: 'fail', - processed: 0, - unprocessed: [], + "output": { + "response": { + "status": 400, + "body": { + "output": { + "status": 400, + "message": "Request failed with status: 200", + "destinationResponse": { + "response": { + "status": "fail", + "processed": 0, + "unprocessed": [] }, - status: 200, + "status": 200 }, - statTags: { - destType: 'CLEVERTAP', - errorCategory: 'network', - destinationId: 'Non-determininable', - workspaceId: 'Non-determininable', - errorType: 'aborted', - feature: 'dataDelivery', - implementation: 'native', - module: 'destination', - }, - }, - }, - }, - }, - }, -]; + "statTags": { + "destType": "CLEVERTAP", + "errorCategory": "network", + "destinationId": "Non-determininable", + "workspaceId": "Non-determininable", + "errorType": "aborted", + "feature": "dataDelivery", + "implementation": "native", + "module": "destination" + } + } + } + } + } + } +] \ No newline at end of file diff --git a/test/integrations/destinations/clevertap/network.ts b/test/integrations/destinations/clevertap/network.ts index 57a647e684..c4eb23ee39 100644 --- a/test/integrations/destinations/clevertap/network.ts +++ b/test/integrations/destinations/clevertap/network.ts @@ -65,8 +65,7 @@ const dataDeliveryMocksData = [ method: 'POST', }, httpRes: { - data: { status: 'fail', error: 'Invalid Credentials', code: 401 }, - status: 401, + data: { status: 'fail', error: 'Invalid Credentials', code: 401 }, status: 401 }, }, { diff --git a/test/integrations/destinations/clevertap/router/data.ts b/test/integrations/destinations/clevertap/router/data.ts index 4f1723a7da..2d6ec1dcf0 100644 --- a/test/integrations/destinations/clevertap/router/data.ts +++ b/test/integrations/destinations/clevertap/router/data.ts @@ -18,7 +18,9 @@ export const data = [ enableObjectIdMapping: true, }, }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, message: { channel: 'web', context: { @@ -28,13 +30,21 @@ 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 (Macintosh; Intel Mac OS X 10_14_5) 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 }, + os: { + name: 'Android', + version: '', + }, + screen: { + density: 2, + }, device: { id: 'f54bb572361c4fd1', name: 'whyred', @@ -67,7 +77,10 @@ export const data = [ msgemail: true, msgwhatsapp: false, custom_tags: ['Test_User', 'Interested_User', 'DIY_Hobby'], - custom_mappings: { Office: 'Trastkiv', Country: 'Russia' }, + custom_mappings: { + Office: 'Trastkiv', + Country: 'Russia', + }, address: { city: 'kolkata', country: 'India', @@ -76,7 +89,9 @@ export const data = [ street: '', }, }, - integrations: { All: true }, + integrations: { + All: true, + }, sentAt: '2019-10-14T09:03:22.563Z', }, }, @@ -89,10 +104,15 @@ export const data = [ enableObjectIdMapping: true, }, }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, message: { event: 'Random', - properties: { country_region: 'India', test: 'abc' }, + properties: { + country_region: 'India', + test: 'abc', + }, receivedAt: '2021-08-20T12:49:07.691Z', rudderId: '138c4214-b537-4f77-9dea-9abde70b5147', type: 'track', @@ -107,13 +127,23 @@ export const data = [ trackAnonymous: true, }, }, - metadata: { jobId: 3, userId: 'u1' }, + 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' } }, + properties: { + title: 'Home', + path: '/', + }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, timestamp: '2020-02-02T00:23:09.544Z', }, }, @@ -179,7 +209,10 @@ export const data = [ }, { evtName: 'Random', - evtData: { country_region: 'India', test: 'abc' }, + evtData: { + country_region: 'India', + test: 'abc', + }, type: 'event', objectId: 'cd3a4439-7df0-4475-acb9-6659c7c4dfe3', }, @@ -192,8 +225,12 @@ export const data = [ files: {}, }, metadata: [ - { jobId: 1, userId: 'u1' }, - { jobId: 2, userId: 'u1' }, + { + jobId: 1, + }, + { + jobId: 2, + }, ], batched: false, statusCode: 200, @@ -207,7 +244,11 @@ export const data = [ }, }, { - metadata: [{ jobId: 3, userId: 'u1' }], + metadata: [ + { + jobId: 3, + }, + ], batched: false, statusCode: 400, error: 'Message type not supported', diff --git a/test/integrations/destinations/clickup/network.ts b/test/integrations/destinations/clickup/network.ts index 2cb7cde34f..1a26209923 100644 --- a/test/integrations/destinations/clickup/network.ts +++ b/test/integrations/destinations/clickup/network.ts @@ -1,247 +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', + { + 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 + } + ] }, - 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', + status: 200 + }, }, - httpRes: { - data: { - fields: [], - }, - 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 index 686bf670e2..296f0fb8e1 100644 --- a/test/integrations/destinations/clickup/processor/data.ts +++ b/test/integrations/destinations/clickup/processor/data.ts @@ -1,818 +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, - }, - ], - }, - }, - }, -]; + { + "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 index b77cb90b47..8888024b4f 100644 --- a/test/integrations/destinations/clickup/router/data.ts +++ b/test/integrations/destinations/clickup/router/data.ts @@ -1,303 +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, userId: 'u1' }, - 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, userId: 'u1' }, - 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, userId: 'u1' }, - 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, userId: 'u1' }, - 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, userId: 'u1' }], - statusCode: 200, - }, - { - batched: false, - batchedRequest: { + { + name: 'clickup', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { body: { - FORM: {}, - JSON: { assignees: [61205104, 61217234, 61228575], name: 'Transformer Testing' }, - JSON_ARRAY: {}, - XML: {}, + 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', }, - 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, userId: 'u1' }], - statusCode: 200, }, - { - batched: false, - batchedRequest: { + }, + output: { + response: { + status: 200, 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 }, + 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 }, - }, - { 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, userId: 'u1' }], - statusCode: 200, - }, - { - destination: { - Config: { - apiToken: 'pk_123', - listId: 'correctListId123', - keyToCustomFieldName: [{ from: 'location', to: 'Location' }], + { + "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 + } + ] + , }, - ID: 'clickup-1234', - }, - batched: false, - error: 'Invalid value specified for latitude. Latitude must be in range "[-90, 90]"', - metadata: [{ jobId: 4, userId: 'u1' }], - statTags: { - destType: 'CLICKUP', - errorCategory: 'dataValidation', - errorType: 'instrumentation', - feature: 'router', - implementation: 'native', - module: 'destination', - }, - statusCode: 400, }, - ], }, - }, }, - }, ]; diff --git a/test/integrations/destinations/courier/router/data.ts b/test/integrations/destinations/courier/router/data.ts index 268504b903..a3a3237197 100644 --- a/test/integrations/destinations/courier/router/data.ts +++ b/test/integrations/destinations/courier/router/data.ts @@ -15,14 +15,28 @@ export const data = [ channel: 'web', event: 'Product Added', userId: 'test123', - properties: { price: 999, quantity: 1 }, - context: { traits: { firstName: 'John', age: 27 } }, + properties: { + price: 999, + quantity: 1, + }, + context: { + traits: { + firstName: 'John', + age: 27, + }, + }, rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', }, - destination: { Config: { apiKey: 'dummyApiKey' } }, - metadata: { jobId: 1, userId: 'u1' }, + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + }, + metadata: { + jobId: 1, + }, }, { message: { @@ -45,7 +59,9 @@ export const data = [ trackNamedPages: true, }, }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, }, ], destType: 'courier', @@ -76,8 +92,16 @@ export const data = [ channel: 'web', event: 'Product Added', userId: 'test123', - properties: { price: 999, quantity: 1 }, - context: { traits: { firstName: 'John', age: 27 } }, + properties: { + price: 999, + quantity: 1, + }, + context: { + traits: { + firstName: 'John', + age: 27, + }, + }, rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', @@ -88,14 +112,26 @@ export const data = [ }, files: {}, }, - destination: { Config: { apiKey: 'dummyApiKey' } }, - metadata: [{ jobId: 1, userId: 'u1' }], + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + }, + metadata: [ + { + jobId: 1, + }, + ], statusCode: 200, }, { batched: false, error: 'apiKey is required', - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], statTags: { destType: 'COURIER', errorCategory: 'dataValidation', diff --git a/test/integrations/destinations/criteo_audience/dataDelivery/data.ts b/test/integrations/destinations/criteo_audience/dataDelivery/data.ts index fb5b689a96..bc3af8f22d 100644 --- a/test/integrations/destinations/criteo_audience/dataDelivery/data.ts +++ b/test/integrations/destinations/criteo_audience/dataDelivery/data.ts @@ -1,508 +1,530 @@ export const data = [ { - name: 'criteo_audience', - description: 'Test 0', - feature: 'dataDelivery', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - version: '1', - type: 'REST', - method: 'PATCH', - endpoint: 'https://api.criteo.com/2022-10/audiences/34894/contactlist', - headers: { - Authorization: 'Bearer success_access_token', - 'Content-Type': 'application/json', - Accept: 'application/json', + "name": "criteo_audience", + "description": "Test 0", + "feature": "dataDelivery", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "version": "1", + "type": "REST", + "method": "PATCH", + "endpoint": "https://api.criteo.com/2022-10/audiences/34894/contactlist", + "headers": { + "Authorization": "Bearer success_access_token", + "Content-Type": "application/json", + "Accept": "application/json" }, - body: { - JSON: { - data: { - type: 'ContactlistAmendment', - attributes: { - operation: 'remove', - identifierType: 'gum', - identifiers: ['sample_gum3'], - internalIdentifiers: false, - gumCallerId: '329739', - }, - }, - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - params: { - destination: 'criteo_audience', - }, - }, - method: 'POST', - }, - }, - output: { - response: { - status: 200, - body: { - output: { - status: 200, - message: 'Request Processed Successfully', - destinationResponse: { - response: '', - status: 200, + "body": { + "JSON": { + "data": { + "type": "ContactlistAmendment", + "attributes": { + "operation": "remove", + "identifierType": "gum", + "identifiers": [ + "sample_gum3" + ], + "internalIdentifiers": false, + "gumCallerId": "329739" + } + } }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} }, + "files": {}, + "params": { + "destination": "criteo_audience" + } }, - }, + "method": "POST" + } }, + "output": { + "response": { + "status": 200, + "body": { + "output": { + "status": 200, + "message": "Request Processed Successfully", + "destinationResponse": { + "response": "", + "status": 200 + } + } + } + } + } }, { - name: 'criteo_audience', - description: 'Test 1', - feature: 'dataDelivery', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - version: '1', - type: 'REST', - method: 'PATCH', - endpoint: 'https://api.criteo.com/2022-10/audiences/3485/contactlist', - headers: { - Authorization: 'Bearer success_access_token', - 'Content-Type': 'application/json', - Accept: 'application/json', + "name": "criteo_audience", + "description": "Test 1", + "feature": "dataDelivery", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "version": "1", + "type": "REST", + "method": "PATCH", + "endpoint": "https://api.criteo.com/2022-10/audiences/3485/contactlist", + "headers": { + "Authorization": "Bearer success_access_token", + "Content-Type": "application/json", + "Accept": "application/json" }, - body: { - JSON: { - data: { - type: 'ContactlistAmendment', - attributes: { - operation: 'add', - identifierType: 'madid', - identifiers: ['sample_madid', 'sample_madid_1', 'sample_madid_2'], - internalIdentifiers: false, - }, - }, + "body": { + "JSON": { + "data": { + "type": "ContactlistAmendment", + "attributes": { + "operation": "add", + "identifierType": "madid", + "identifiers": [ + "sample_madid", + "sample_madid_1", + "sample_madid_2" + ], + "internalIdentifiers": false + } + } }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - params: { - destination: 'criteo_audience', + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} }, + "files": {}, + "params": { + "destination": "criteo_audience" + } }, - method: 'POST', - }, + "method": "POST" + } }, - output: { - response: { - status: 401, - body: { - output: { - status: 401, - authErrorCategory: 'REFRESH_TOKEN', - destinationResponse: { - errors: [ + "output": { + "response": { + "status": 401, + "body": { + "output": { + "status": 401, + "authErrorCategory": "REFRESH_TOKEN", + "destinationResponse": { + "errors": [ { - traceIdentifier: '80a1a0ba3981b04da847d05700752c77', - type: 'authorization', - code: 'authorization-token-expired', - instance: '/2022-10/audiences/123/contactlist', - title: 'The authorization token has expired', - }, - ], + "traceIdentifier": "80a1a0ba3981b04da847d05700752c77", + "type": "authorization", + "code": "authorization-token-expired", + "instance": "/2022-10/audiences/123/contactlist", + "title": "The authorization token has expired" + } + ] }, - message: - 'The authorization token has expired during criteo_audience response transformation', - statTags: { - destType: 'CRITEO_AUDIENCE', - errorCategory: 'network', - destinationId: 'Non-determininable', - workspaceId: 'Non-determininable', - errorType: 'aborted', - feature: 'dataDelivery', - implementation: 'native', - module: 'destination', - }, - }, - }, - }, - }, + "message": "The authorization token has expired during criteo_audience response transformation", + "statTags": { + "destType": "CRITEO_AUDIENCE", + "errorCategory": "network", + "destinationId": "Non-determininable", + "workspaceId": "Non-determininable", + "errorType": "aborted", + "feature": "dataDelivery", + "implementation": "native", + "module": "destination" + } + } + } + } + } }, { - name: 'criteo_audience', - description: 'Test 2', - feature: 'dataDelivery', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - version: '1', - type: 'REST', - method: 'PATCH', - endpoint: 'https://api.criteo.com/2022-10/audiences/34895/contactlist', - headers: { - Authorization: 'Bearer success_access_token', - 'Content-Type': 'application/json', - Accept: 'application/json', + "name": "criteo_audience", + "description": "Test 2", + "feature": "dataDelivery", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "version": "1", + "type": "REST", + "method": "PATCH", + "endpoint": "https://api.criteo.com/2022-10/audiences/34895/contactlist", + "headers": { + "Authorization": "Bearer success_access_token", + "Content-Type": "application/json", + "Accept": "application/json" }, - body: { - JSON: { - data: { - type: 'ContactlistAmendment', - attributes: { - operation: 'add', - identifierType: 'madid', - identifiers: ['sample_madid', 'sample_madid_1', 'sample_madid_2'], - internalIdentifiers: false, - }, - }, + "body": { + "JSON": { + "data": { + "type": "ContactlistAmendment", + "attributes": { + "operation": "add", + "identifierType": "madid", + "identifiers": [ + "sample_madid", + "sample_madid_1", + "sample_madid_2" + ], + "internalIdentifiers": false + } + } }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - params: { - destination: 'criteo_audience', + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} }, + "files": {}, + "params": { + "destination": "criteo_audience" + } }, - method: 'POST', - }, + "method": "POST" + } }, - output: { - response: { - status: 401, - body: { - output: { - status: 401, - authErrorCategory: 'REFRESH_TOKEN', - destinationResponse: { - errors: [ + "output": { + "response": { + "status": 401, + "body": { + "output": { + "status": 401, + "authErrorCategory": "REFRESH_TOKEN", + "destinationResponse": { + "errors": [ { - traceIdentifier: '80a1a0ba3981b04da847d05700752c77', - type: 'authorization', - code: 'authorization-token-invalid', - instance: '/2022-10/audiences/123/contactlist', - title: 'The authorization header is invalid', - }, - ], - }, - message: - 'The authorization header is invalid during criteo_audience response transformation', - statTags: { - destType: 'CRITEO_AUDIENCE', - errorCategory: 'network', - destinationId: 'Non-determininable', - workspaceId: 'Non-determininable', - errorType: 'aborted', - feature: 'dataDelivery', - implementation: 'native', - module: 'destination', + "traceIdentifier": "80a1a0ba3981b04da847d05700752c77", + "type": "authorization", + "code": "authorization-token-invalid", + "instance": "/2022-10/audiences/123/contactlist", + "title": "The authorization header is invalid" + } + ] }, - }, - }, - }, - }, + "message": "The authorization header is invalid during criteo_audience response transformation", + "statTags": { + "destType": "CRITEO_AUDIENCE", + "errorCategory": "network", + "destinationId": "Non-determininable", + "workspaceId": "Non-determininable", + "errorType": "aborted", + "feature": "dataDelivery", + "implementation": "native", + "module": "destination" + } + } + } + } + } }, { - name: 'criteo_audience', - description: 'Test 3', - feature: 'dataDelivery', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - version: '1', - type: 'REST', - method: 'PATCH', - endpoint: 'https://api.criteo.com/2022-10/audiences/34896/contactlist', - headers: { - Authorization: 'Bearer success_access_token', - 'Content-Type': 'application/json', - Accept: 'application/json', + "name": "criteo_audience", + "description": "Test 3", + "feature": "dataDelivery", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "version": "1", + "type": "REST", + "method": "PATCH", + "endpoint": "https://api.criteo.com/2022-10/audiences/34896/contactlist", + "headers": { + "Authorization": "Bearer success_access_token", + "Content-Type": "application/json", + "Accept": "application/json" }, - body: { - JSON: { - data: { - type: 'ContactlistAmendment', - attributes: { - operation: 'add', - identifierType: 'madid', - identifiers: ['sample_madid', 'sample_madid_1', 'sample_madid_2'], - internalIdentifiers: false, - }, - }, + "body": { + "JSON": { + "data": { + "type": "ContactlistAmendment", + "attributes": { + "operation": "add", + "identifierType": "madid", + "identifiers": [ + "sample_madid", + "sample_madid_1", + "sample_madid_2" + ], + "internalIdentifiers": false + } + } }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - params: { - destination: 'criteo_audience', + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} }, + "files": {}, + "params": { + "destination": "criteo_audience" + } }, - method: 'POST', - }, + "method": "POST" + } }, - output: { - response: { - status: 400, - body: { - output: { - message: 'AudienceId is Invalid. Please Provide Valid AudienceId', - destinationResponse: { - response: { - errors: [ + "output": { + "response": { + "status": 400, + "body": { + "output": { + "message": "AudienceId is Invalid. Please Provide Valid AudienceId", + "destinationResponse": { + "response": { + "errors": [ { - code: 'audience-invalid', - traceIdentifier: '80a1a0ba3981b04da847d05700752c77', - type: 'authorization', - }, - ], + "code": "audience-invalid", + "traceIdentifier": "80a1a0ba3981b04da847d05700752c77", + "type": "authorization" + } + ] }, - status: 404, + "status": 404 }, - statTags: { - destType: 'CRITEO_AUDIENCE', - errorCategory: 'network', - destinationId: 'Non-determininable', - workspaceId: 'Non-determininable', - errorType: 'aborted', - feature: 'dataDelivery', - implementation: 'native', - meta: 'instrumentation', - module: 'destination', + "statTags": { + "destType": "CRITEO_AUDIENCE", + "errorCategory": "network", + "destinationId": "Non-determininable", + "workspaceId": "Non-determininable", + "errorType": "aborted", + "feature": "dataDelivery", + "implementation": "native", + "meta": "instrumentation", + "module": "destination" }, - status: 400, - }, - }, - }, - }, + "status": 400 + } + } + } + } }, { - name: 'criteo_audience', - description: 'Test 4', - feature: 'dataDelivery', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - version: '1', - type: 'REST', - method: 'PATCH', - endpoint: 'https://api.criteo.com/2022-10/audiences/34897/contactlist', - headers: { - Authorization: 'Bearer success_access_token', - 'Content-Type': 'application/json', - Accept: 'application/json', + "name": "criteo_audience", + "description": "Test 4", + "feature": "dataDelivery", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "version": "1", + "type": "REST", + "method": "PATCH", + "endpoint": "https://api.criteo.com/2022-10/audiences/34897/contactlist", + "headers": { + "Authorization": "Bearer success_access_token", + "Content-Type": "application/json", + "Accept": "application/json" }, - body: { - JSON: { - data: { - type: 'ContactlistAmendment', - attributes: { - operation: 'add', - identifierType: 'madid', - identifiers: ['sample_madid', 'sample_madid_1', 'sample_madid_2'], - internalIdentifiers: false, - }, - }, + "body": { + "JSON": { + "data": { + "type": "ContactlistAmendment", + "attributes": { + "operation": "add", + "identifierType": "madid", + "identifiers": [ + "sample_madid", + "sample_madid_1", + "sample_madid_2" + ], + "internalIdentifiers": false + } + } }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - params: { - destination: 'criteo_audience', + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} }, + "files": {}, + "params": { + "destination": "criteo_audience" + } }, - method: 'POST', - }, + "method": "POST" + } }, - output: { - response: { - status: 500, - body: { - output: { - destinationResponse: { - response: { - errors: [ + "output": { + "response": { + "status": 500, + "body": { + "output": { + "destinationResponse": { + "response": { + "errors": [ { - code: 'audience-invalid', - traceIdentifier: '80a1a0ba3981b04da847d05700752c77', - type: 'authorization', - }, - ], + "code": "audience-invalid", + "traceIdentifier": "80a1a0ba3981b04da847d05700752c77", + "type": "authorization" + } + ] }, - status: 503, + "status": 503 }, - message: 'Request Failed: during criteo_audience response transformation (Retryable)', - statTags: { - destType: 'CRITEO_AUDIENCE', - errorCategory: 'network', - destinationId: 'Non-determininable', - workspaceId: 'Non-determininable', - feature: 'dataDelivery', - implementation: 'native', - errorType: 'retryable', - module: 'destination', + "message": "Request Failed: during criteo_audience response transformation (Retryable)", + "statTags": { + "destType": "CRITEO_AUDIENCE", + "errorCategory": "network", + "destinationId": "Non-determininable", + "workspaceId": "Non-determininable", + "feature": "dataDelivery", + "implementation": "native", + "errorType": "retryable", + "module": "destination" }, - status: 500, - }, - }, - }, - }, + "status": 500 + } + } + } + } }, { - name: 'criteo_audience', - description: 'Test 5', - feature: 'dataDelivery', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - version: '1', - type: 'REST', - method: 'PATCH', - endpoint: 'https://api.criteo.com/2022-10/audiences/34898/contactlist', - headers: { - Authorization: 'Bearer success_access_token', - 'Content-Type': 'application/json', - Accept: 'application/json', + "name": "criteo_audience", + "description": "Test 5", + "feature": "dataDelivery", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "version": "1", + "type": "REST", + "method": "PATCH", + "endpoint": "https://api.criteo.com/2022-10/audiences/34898/contactlist", + "headers": { + "Authorization": "Bearer success_access_token", + "Content-Type": "application/json", + "Accept": "application/json" }, - body: { - JSON: { - data: { - type: 'ContactlistAmendment', - attributes: { - operation: 'add', - identifierType: 'madid', - identifiers: ['sample_madid', 'sample_madid_1', 'sample_madid_2'], - internalIdentifiers: false, - }, - }, + "body": { + "JSON": { + "data": { + "type": "ContactlistAmendment", + "attributes": { + "operation": "add", + "identifierType": "madid", + "identifiers": [ + "sample_madid", + "sample_madid_1", + "sample_madid_2" + ], + "internalIdentifiers": false + } + } }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - params: { - destination: 'criteo_audience', + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} }, + "files": {}, + "params": { + "destination": "criteo_audience" + } }, - method: 'POST', - }, + "method": "POST" + } }, - output: { - response: { - status: 429, - body: { - output: { - destinationResponse: { - response: {}, - status: 429, + "output": { + "response": { + "status": 429, + "body": { + "output": { + "destinationResponse": { + "response": {}, + "status": 429 }, - message: - 'Request Failed: during criteo_audience response transformation - due to Request Limit exceeded, (Throttled)', - statTags: { - destType: 'CRITEO_AUDIENCE', - errorCategory: 'network', - destinationId: 'Non-determininable', - workspaceId: 'Non-determininable', - errorType: 'throttled', - feature: 'dataDelivery', - implementation: 'native', - module: 'destination', + "message": "Request Failed: during criteo_audience response transformation - due to Request Limit exceeded, (Throttled)", + "statTags": { + "destType": "CRITEO_AUDIENCE", + "errorCategory": "network", + "destinationId": "Non-determininable", + "workspaceId": "Non-determininable", + "errorType": "throttled", + "feature": "dataDelivery", + "implementation": "native", + "module": "destination" }, - status: 429, - }, - }, - }, - }, + "status": 429 + } + } + } + } }, { - name: 'criteo_audience', - description: 'Test 6', - feature: 'dataDelivery', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - version: '1', - type: 'REST', - method: 'PATCH', - endpoint: 'https://api.criteo.com/2022-10/audiences/34899/contactlist', - headers: { - Authorization: 'Bearer success_access_token', - 'Content-Type': 'application/json', - Accept: 'application/json', + "name": "criteo_audience", + "description": "Test 6", + "feature": "dataDelivery", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "version": "1", + "type": "REST", + "method": "PATCH", + "endpoint": "https://api.criteo.com/2022-10/audiences/34899/contactlist", + "headers": { + "Authorization": "Bearer success_access_token", + "Content-Type": "application/json", + "Accept": "application/json" }, - body: { - JSON: { - data: { - type: 'ContactlistAmendment', - attributes: { - operation: 'add', - identifierType: 'madid', - identifiers: ['sample_madid', 'sample_madid_1', 'sample_madid_2'], - internalIdentifiers: false, - }, - }, + "body": { + "JSON": { + "data": { + "type": "ContactlistAmendment", + "attributes": { + "operation": "add", + "identifierType": "madid", + "identifiers": [ + "sample_madid", + "sample_madid_1", + "sample_madid_2" + ], + "internalIdentifiers": false + } + } }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - params: { - destination: 'criteo_audience', + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} }, + "files": {}, + "params": { + "destination": "criteo_audience" + } }, - method: 'POST', - }, + "method": "POST" + } }, - output: { - response: { - status: 400, - body: { - output: { - destinationResponse: { - response: { - message: 'unknown error', + "output": { + "response": { + "status": 400, + "body": { + "output": { + "destinationResponse": { + "response": { + "message": "unknown error" }, - status: 410, + "status": 410 }, - message: - 'Request Failed: during criteo_audience response transformation with status "410" due to "{"message":"unknown error"}", (Aborted) ', - statTags: { - destType: 'CRITEO_AUDIENCE', - errorCategory: 'network', - destinationId: 'Non-determininable', - workspaceId: 'Non-determininable', - errorType: 'aborted', - feature: 'dataDelivery', - implementation: 'native', - module: 'destination', + "message": "Request Failed: during criteo_audience response transformation with status \"410\" due to \"{\"message\":\"unknown error\"}\", (Aborted) ", + "statTags": { + "destType": "CRITEO_AUDIENCE", + "errorCategory": "network", + "destinationId": "Non-determininable", + "workspaceId": "Non-determininable", + "errorType": "aborted", + "feature": "dataDelivery", + "implementation": "native", + "module": "destination" }, - status: 400, - }, - }, - }, - }, - }, -]; + "status": 400 + } + } + } + } + } +] \ No newline at end of file diff --git a/test/integrations/destinations/criteo_audience/router/data.ts b/test/integrations/destinations/criteo_audience/router/data.ts index 89f0b917a8..a91c112663 100644 --- a/test/integrations/destinations/criteo_audience/router/data.ts +++ b/test/integrations/destinations/criteo_audience/router/data.ts @@ -19,7 +19,12 @@ export const data = [ }, ID: 'iwehr83843', }, - metadata: { secret: { accessToken: 'success_access_token' }, jobId: 1, userId: 'u1' }, + metadata: { + secret: { + accessToken: 'success_access_token', + }, + jobId: 1, + }, message: { userId: 'user 1', type: 'audiencelist', @@ -47,7 +52,12 @@ export const data = [ ], }, }, - context: { ip: '14.5.67.21', library: { name: 'http' } }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, timestamp: '2020-02-02T00:23:09.544Z', }, }, @@ -61,7 +71,12 @@ export const data = [ }, ID: 'iwehr83843', }, - metadata: { secret: { accessToken: 'success_access_token' }, jobId: 2, userId: 'u1' }, + metadata: { + secret: { + accessToken: 'success_access_token', + }, + jobId: 2, + }, message: { userId: 'user 1', type: 'audiencelist', @@ -97,7 +112,9 @@ export const data = [ ], }, }, - context: { ip: '14.5.67.21' }, + context: { + ip: '14.5.67.21', + }, timestamp: '2020-02-02T00:23:09.544Z', }, }, @@ -145,7 +162,12 @@ export const data = [ }, ], metadata: [ - { jobId: 1, secret: { accessToken: 'success_access_token' }, userId: 'u1' }, + { + jobId: 1, + secret: { + accessToken: 'success_access_token', + }, + }, ], batched: false, statusCode: 200, @@ -221,7 +243,12 @@ export const data = [ }, ], metadata: [ - { jobId: 2, secret: { accessToken: 'success_access_token' }, userId: 'u1' }, + { + jobId: 2, + secret: { + accessToken: 'success_access_token', + }, + }, ], batched: false, statusCode: 200, diff --git a/test/integrations/destinations/custify/network.ts b/test/integrations/destinations/custify/network.ts index 146fcfef30..4af6545f9f 100644 --- a/test/integrations/destinations/custify/network.ts +++ b/test/integrations/destinations/custify/network.ts @@ -1,36 +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', + { + httpReq: { + url: 'https://api.custify.com/company', + method: 'POST', }, - }, - status: 200, - }, - }, + 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 index b5bd8bd753..f3a3448b86 100644 --- a/test/integrations/destinations/custify/processor/data.ts +++ b/test/integrations/destinations/custify/processor/data.ts @@ -1,672 +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, - }, - ], - }, - }, - }, -]; + { + "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 index a88f36fc69..12639192f8 100644 --- a/test/integrations/destinations/custify/router/data.ts +++ b/test/integrations/destinations/custify/router/data.ts @@ -1,201 +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, userId: 'u1' }, - 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, userId: 'u1' }, - 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: {}, + { + name: 'custify', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { 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: {}, + 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', }, - files: {}, - userId: 'user_111', - }, - metadata: [{ jobId: 1, userId: 'u1' }], - 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: {}, + }, + }, + output: { + response: { + status: 200, 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: {}, + 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" + } + } + ], }, - files: {}, - userId: 'user_1234', - }, - metadata: [{ jobId: 2, userId: 'u1' }], - batched: false, - statusCode: 200, - destination: { - Config: { apiKeyToken: 'pk_123', listId: 'correctListId123' }, - ID: 'custify-1234', - }, }, - ], }, - }, }, - }, ]; diff --git a/test/integrations/destinations/customerio/router/data.ts b/test/integrations/destinations/customerio/router/data.ts index 1275147710..9a34377714 100644 --- a/test/integrations/destinations/customerio/router/data.ts +++ b/test/integrations/destinations/customerio/router/data.ts @@ -32,21 +32,34 @@ export const data = [ ip: '0.0.0.0', age: 26, }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', locale: 'en-US', ip: '0.0.0.0', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + user_properties: { + prop1: 'val1', + prop2: 'val2', }, - 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 }, + integrations: { + All: true, + }, traits: { anonymousId: 'anon-id', email: 'test@gmail.com', @@ -61,7 +74,9 @@ export const data = [ }, sentAt: '2019-10-14T09:03:22.563Z', }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, destination: { Config: { datacenterEU: false, @@ -80,14 +95,25 @@ export const data = [ namespace: 'com.rudderlabs.javascript', version: '1.0.0', }, - traits: { email: 'test@rudderstack.com', anonymousId: '12345' }, - library: { name: 'RudderLabs JavaScript SDK', 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 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, }, type: 'page', messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', @@ -101,11 +127,15 @@ export const data = [ title: 'Test Page', url: 'www.rudderlabs.com', }, - integrations: { All: true }, + integrations: { + All: true, + }, name: 'ApplicationLoaded', sentAt: '2019-10-14T11:15:53.296Z', }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, destination: { Config: { datacenterEU: false, @@ -125,15 +155,25 @@ export const data = [ version: '1.1.0-beta.2', }, ip: '0.0.0.0', - library: { name: 'RudderLabs JavaScript SDK', version: '1.1.0-beta.2' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.0-beta.2', + }, locale: 'en-GB', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36', }, groupId: 'group@1', - integrations: { All: true }, + integrations: { + All: true, + }, traits: { domainNames: 'rudderstack.com', email: 'help@rudderstack.com', @@ -143,7 +183,9 @@ export const data = [ type: 'group', userId: 'user@1', }, - metadata: { jobId: 3, userId: 'u1' }, + metadata: { + jobId: 3, + }, destination: { Config: { datacenterEU: false, @@ -163,15 +205,25 @@ export const data = [ version: '1.1.0-beta.2', }, ip: '0.0.0.0', - library: { name: 'RudderLabs JavaScript SDK', version: '1.1.0-beta.2' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.0-beta.2', + }, locale: 'en-GB', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36', }, groupId: 'group@1', - integrations: { All: true }, + integrations: { + All: true, + }, traits: { domainNames: 'rudderstack.com', email: 'help@rudderstack.com', @@ -181,7 +233,9 @@ export const data = [ type: 'group', userId: 'user@1', }, - metadata: { jobId: 4, userId: 'u1' }, + metadata: { + jobId: 4, + }, destination: { Config: { datacenterEU: false, @@ -207,7 +261,9 @@ export const data = [ type: 'REST', method: 'PUT', endpoint: 'https://track.customer.io/api/v1/customers/123456', - headers: { Authorization: 'Basic NDZiZTU0NzY4ZTdkNDlhYjI2Mjg6ZHVtbXlBcGlLZXk=' }, + headers: { + Authorization: 'Basic NDZiZTU0NzY4ZTdkNDlhYjI2Mjg6ZHVtbXlBcGlLZXk=', + }, params: {}, body: { JSON: { @@ -231,7 +287,11 @@ export const data = [ userId: '123456', statusCode: 200, }, - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [ + { + jobId: 1, + }, + ], batched: false, statusCode: 200, destination: { @@ -248,7 +308,9 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://track.customer.io/api/v1/customers/12345/events', - headers: { Authorization: 'Basic NDZiZTU0NzY4ZTdkNDlhYjI2Mjg6ZHVtbXlBcGlLZXk=' }, + headers: { + Authorization: 'Basic NDZiZTU0NzY4ZTdkNDlhYjI2Mjg6ZHVtbXlBcGlLZXk=', + }, params: {}, body: { JSON: { @@ -271,7 +333,11 @@ export const data = [ userId: '12345', statusCode: 200, }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { @@ -306,8 +372,17 @@ export const data = [ email: 'help@rudderstack.com', domainNames: 'rudderstack.com', }, - identifiers: { object_id: 'group@1', object_type_id: '1' }, - cio_relationships: [{ identifiers: { id: 'user@1' } }], + identifiers: { + object_id: 'group@1', + object_type_id: '1', + }, + cio_relationships: [ + { + identifiers: { + id: 'user@1', + }, + }, + ], }, { type: 'object', @@ -317,8 +392,17 @@ export const data = [ email: 'help@rudderstack.com', domainNames: 'rudderstack.com', }, - identifiers: { object_id: 'group@1', object_type_id: '1' }, - cio_relationships: [{ identifiers: { id: 'user@1' } }], + identifiers: { + object_id: 'group@1', + object_type_id: '1', + }, + cio_relationships: [ + { + identifiers: { + id: 'user@1', + }, + }, + ], }, ], }, @@ -327,8 +411,12 @@ export const data = [ files: {}, }, metadata: [ - { jobId: 3, userId: 'u1' }, - { jobId: 4, userId: 'u1' }, + { + jobId: 3, + }, + { + jobId: 4, + }, ], batched: false, statusCode: 200, diff --git a/test/integrations/destinations/delighted/network.ts b/test/integrations/destinations/delighted/network.ts index d9896a25e8..15b0a414e6 100644 --- a/test/integrations/destinations/delighted/network.ts +++ b/test/integrations/destinations/delighted/network.ts @@ -1,30 +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', - }, + { + 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 + }, }, - 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, - }, - }, + { + 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 index 7a5ad7de9d..1bf6a28354 100644 --- a/test/integrations/destinations/delighted/processor/data.ts +++ b/test/integrations/destinations/delighted/processor/data.ts @@ -1,947 +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, - }, - ], - }, - }, - }, -]; + { + "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 index b9e9882383..115ac7b05e 100644 --- a/test/integrations/destinations/delighted/router/data.ts +++ b/test/integrations/destinations/delighted/router/data.ts @@ -1,177 +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, userId: 'u1' }, - message: { - channel: 'web', - context: { - app: { - build: '1.0.0', - name: 'RudderLabs JavaScript SDK', - namespace: 'com.rudderlabs.javascript', - version: '1.0.0', - }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, 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, userId: 'u1' }, - message: { - channel: 'web', - context: { - app: { - build: '1.0.0', - name: 'RudderLabs JavaScript SDK', - namespace: 'com.rudderlabs.javascript', - version: '1.0.0', - }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, 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: { + { + name: 'delighted', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { 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', - }, + 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', }, - 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, userId: 'u1' }], - batched: false, - statusCode: 200, - destination: { - Config: { - apiKey: 'dummyApiKey', - channel: 'email', - delay: 0, - eventNamesSettings: [{ event: '' }], - }, - }, }, - { - batchedRequest: { + }, + output: { + response: { + status: 200, 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, userId: 'u1' }], - batched: false, - statusCode: 200, - destination: { - Config: { - apiKey: 'dummyApiKey', - channel: 'email', - delay: 0, - eventNamesSettings: [{ event: '' }], + 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/discord/router/data.ts b/test/integrations/destinations/discord/router/data.ts index 5518df8dcf..55861635b0 100644 --- a/test/integrations/destinations/discord/router/data.ts +++ b/test/integrations/destinations/discord/router/data.ts @@ -17,7 +17,10 @@ export const data = [ ID: '1ZQUiJVMlmF7lfsdfXg7KXQnlLV', Name: 'DISCORD', DisplayName: 'Discord', - Config: { excludeKeys: [], includeKeys: [] }, + Config: { + excludeKeys: [], + includeKeys: [], + }, }, Config: { eventChannelSettings: [], @@ -40,9 +43,15 @@ export const data = [ namespace: 'com.rudderlabs.javascript', version: '1.1.1-rc.1', }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.1.1-rc.1' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.1-rc.1', + }, locale: 'en-US', - os: { name: '', version: '' }, + os: { + name: '', + version: '', + }, page: { path: '/tests/html/script-test.html', referrer: 'http://localhost:1111/tests/html/', @@ -50,7 +59,9 @@ export const data = [ title: '', url: 'http://localhost:1111/tests/html/script-test.html', }, - screen: { density: 1.7999999523162842 }, + screen: { + density: 1.7999999523162842, + }, traits: { country: 'India', email: 'name@domain.com', @@ -60,7 +71,9 @@ export const data = [ 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 }, + integrations: { + All: true, + }, messageId: '9ecc0183-89ed-48bd-87eb-b2d8e1ca6780', originalTimestamp: '2020-03-23T03:46:30.916Z', properties: { @@ -77,7 +90,9 @@ export const data = [ type: 'page', userId: '12345', }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, }, { destination: { @@ -87,16 +102,25 @@ export const data = [ ID: '1ZQUiJVMlmF7lfsdfXg7KXQnlLV', Name: 'DISCORD', DisplayName: 'Discord', - Config: { excludeKeys: [], includeKeys: [] }, + Config: { + excludeKeys: [], + includeKeys: [], + }, }, Config: { eventChannelSettings: [], eventTemplateSettings: [], webhookUrl: 'https://abcd.com/efgh/89078/979868/98678', whitelistedTraitsSettings: [ - { trait: 'country' }, - { trait: 'email' }, - { trait: 'name' }, + { + trait: 'country', + }, + { + trait: 'email', + }, + { + trait: 'name', + }, ], }, Enabled: true, @@ -107,7 +131,9 @@ export const data = [ anonymousId: '12345', channel: 'web', context: { - screen: { density: 1.7999999523162842 }, + screen: { + density: 1.7999999523162842, + }, traits: { country: 'India', email: 'name@domain.com', @@ -123,7 +149,9 @@ export const data = [ hiji: 'hulala-1', name: 'my-name-1', }, - integrations: { All: true }, + 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', @@ -140,7 +168,6 @@ export const data = [ jobId: 123, messageId: '4aaecff2-a513-4bbf-9824-c471f4ac9777', sourceId: '1YhwKyDcKstudlGxkeN5p2wgsrp', - userId: 'u1', }, }, { @@ -151,7 +178,10 @@ export const data = [ ID: '1ZQUiJVMlmF7lfsdfXg7KXQnlLV', Name: 'DISCORD', DisplayName: 'Discord', - Config: { excludeKeys: [], includeKeys: [] }, + Config: { + excludeKeys: [], + includeKeys: [], + }, }, Config: { eventTemplateSettings: [ @@ -169,7 +199,14 @@ export const data = [ ], IdentifyTemplate: 'identified {{name}} with {{traits}}', webhookUrl: 'https://abcd.com/efgh/89078/979868/98678', - whitelistedTraitsSettings: [{ trait: 'hiji' }, { trait: '' }], + whitelistedTraitsSettings: [ + { + trait: 'hiji', + }, + { + trait: '', + }, + ], }, Enabled: true, Transformations: [], @@ -189,7 +226,9 @@ export const data = [ '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 }, + integrations: { + All: true, + }, messageId: '8b8d5937-09bc-49dc-a35e-8cd6370575f8', originalTimestamp: '2020-03-23T03:46:30.922Z', properties: { @@ -213,7 +252,6 @@ export const data = [ jobId: 129, messageId: '8b8d5937-09bc-49dc-a35e-8cd6370575f8', sourceId: '1YhwKyDcKstudlGxkeN5p2wgsrp', - userId: 'u1', }, }, ], @@ -235,7 +273,10 @@ export const data = [ ID: '1ZQUiJVMlmF7lfsdfXg7KXQnlLV', Name: 'DISCORD', DisplayName: 'Discord', - Config: { excludeKeys: [], includeKeys: [] }, + Config: { + excludeKeys: [], + includeKeys: [], + }, }, Config: { eventChannelSettings: [], @@ -248,7 +289,11 @@ export const data = [ Transformations: [], IsProcessorEnabled: true, }, - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [ + { + jobId: 1, + }, + ], statTags: { destType: 'DISCORD', feature: 'router', @@ -267,7 +312,9 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://abcd.com/efgh/89078/979868/98678', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, params: {}, body: { JSON: { @@ -287,16 +334,25 @@ export const data = [ ID: '1ZQUiJVMlmF7lfsdfXg7KXQnlLV', Name: 'DISCORD', DisplayName: 'Discord', - Config: { excludeKeys: [], includeKeys: [] }, + Config: { + excludeKeys: [], + includeKeys: [], + }, }, Config: { eventChannelSettings: [], eventTemplateSettings: [], webhookUrl: 'https://abcd.com/efgh/89078/979868/98678', whitelistedTraitsSettings: [ - { trait: 'country' }, - { trait: 'email' }, - { trait: 'name' }, + { + trait: 'country', + }, + { + trait: 'email', + }, + { + trait: 'name', + }, ], }, Enabled: true, @@ -311,7 +367,6 @@ export const data = [ jobId: 123, messageId: '4aaecff2-a513-4bbf-9824-c471f4ac9777', sourceId: '1YhwKyDcKstudlGxkeN5p2wgsrp', - userId: 'u1', }, ], batched: false, @@ -323,7 +378,9 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://abcd.com/efgh/89078/979868/98678', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, params: {}, body: { JSON: { @@ -342,7 +399,10 @@ export const data = [ ID: '1ZQUiJVMlmF7lfsdfXg7KXQnlLV', Name: 'DISCORD', DisplayName: 'Discord', - Config: { excludeKeys: [], includeKeys: [] }, + Config: { + excludeKeys: [], + includeKeys: [], + }, }, Config: { eventTemplateSettings: [ @@ -360,7 +420,14 @@ export const data = [ ], IdentifyTemplate: 'identified {{name}} with {{traits}}', webhookUrl: 'https://abcd.com/efgh/89078/979868/98678', - whitelistedTraitsSettings: [{ trait: 'hiji' }, { trait: '' }], + whitelistedTraitsSettings: [ + { + trait: 'hiji', + }, + { + trait: '', + }, + ], }, Enabled: true, Transformations: [], @@ -374,7 +441,6 @@ export const data = [ jobId: 129, messageId: '8b8d5937-09bc-49dc-a35e-8cd6370575f8', sourceId: '1YhwKyDcKstudlGxkeN5p2wgsrp', - userId: 'u1', }, ], batched: false, diff --git a/test/integrations/destinations/drip/processor/data.ts b/test/integrations/destinations/drip/processor/data.ts index 1874f932fa..17cf37d198 100644 --- a/test/integrations/destinations/drip/processor/data.ts +++ b/test/integrations/destinations/drip/processor/data.ts @@ -1,1498 +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, - }, - ], - }, - }, - }, -]; + { + "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 index 44aac7dd1a..d13c73a0d1 100644 --- a/test/integrations/destinations/drip/router/data.ts +++ b/test/integrations/destinations/drip/router/data.ts @@ -1,189 +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, userId: 'u1' }, - message: { - channel: 'web', - context: { - app: { - build: '1.0.0', - name: 'RudderLabs JavaScript SDK', - namespace: 'com.rudderlabs.javascript', - version: '1.0.0', - }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, 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, userId: 'u1' }, - message: { - channel: 'web', - context: { - app: { - build: '1.0.0', - name: 'RudderLabs JavaScript SDK', - namespace: 'com.rudderlabs.javascript', - version: '1.0.0', - }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, 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: { + { + name: 'drip', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { 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' }, - }, + 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', }, - 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, userId: 'u1' }], - batched: false, - statusCode: 200, - destination: { - Config: { - apiKey: 'dummyApiKey', - accountId: '1809802', - campaignId: '', - enableUserCreation: true, - }, - }, }, - { - batchedRequest: { + }, + output: { + response: { + status: 200, body: { - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - JSON: { - events: [ - { - email: 'user1@gmail.com', - properties: { field1: 'val1' }, - action: 'testing', - occurred_at: '2019-10-14T09:03:17.562Z', - }, + 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 + } + } + } ], - }, - }, - 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, userId: 'u1' }], - batched: false, - statusCode: 200, - destination: { - Config: { - apiKey: 'dummyApiKey', - accountId: '1809802', - campaignId: '915194776', - enableUserCreation: true, }, - }, }, - ], }, - }, }, - }, ]; diff --git a/test/integrations/destinations/engage/router/data.ts b/test/integrations/destinations/engage/router/data.ts index 248deff04d..d6a66b5e98 100644 --- a/test/integrations/destinations/engage/router/data.ts +++ b/test/integrations/destinations/engage/router/data.ts @@ -12,8 +12,19 @@ export const data = [ { message: { groupId: '17', - context: { externalId: [{ type: 'engageId', id: '246' }] }, - traits: { lastName: 'garwal', type: 'Segments', operation: 'remove' }, + context: { + externalId: [ + { + type: 'engageId', + id: '246', + }, + ], + }, + traits: { + lastName: 'garwal', + type: 'Segments', + operation: 'remove', + }, type: 'group', }, destination: { @@ -21,12 +32,18 @@ export const data = [ publicKey: '49ur490rjfo34gi04y38r9go', privateKey: 'n89g389yr389fgbef0u2rff', listIds: [ - { listId: '9834trg3rgy3g08oi9893rgfb' }, - { listId: 'f39487tyh49go3h093gh2if2f2' }, + { + listId: '9834trg3rgy3g08oi9893rgfb', + }, + { + listId: 'f39487tyh49go3h093gh2if2f2', + }, ], }, }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, }, ], destType: 'engage', @@ -51,7 +68,14 @@ export const data = [ 'Basic NDl1cjQ5MHJqZm8zNGdpMDR5MzhyOWdvOm44OWczODl5cjM4OWZnYmVmMHUycmZm', }, params: {}, - body: { JSON: { subscribed: true }, JSON_ARRAY: {}, XML: {}, FORM: {} }, + body: { + JSON: { + subscribed: true, + }, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, files: {}, }, destination: { @@ -59,12 +83,20 @@ export const data = [ publicKey: '49ur490rjfo34gi04y38r9go', privateKey: 'n89g389yr389fgbef0u2rff', listIds: [ - { listId: '9834trg3rgy3g08oi9893rgfb' }, - { listId: 'f39487tyh49go3h093gh2if2f2' }, + { + listId: '9834trg3rgy3g08oi9893rgfb', + }, + { + listId: 'f39487tyh49go3h093gh2if2f2', + }, ], }, }, - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [ + { + jobId: 1, + }, + ], batched: false, statusCode: 200, }, @@ -88,8 +120,14 @@ export const data = [ userId: '1', context: { externalId: [ - { type: 'engageListId', id: '100c983ry8934hf3094yfh348gf1' }, - { type: 'engageListId', id: '4r40hfio3rbfln' }, + { + type: 'engageListId', + id: '100c983ry8934hf3094yfh348gf1', + }, + { + type: 'engageListId', + id: '4r40hfio3rbfln', + }, ], }, originalTimestamp: '2020-09-28T19:53:31.900Z', @@ -98,7 +136,14 @@ export const data = [ lastName: 'Rudderlabs', email: 'Test@r.com', hasPurchased: 'yes', - address: { Home: { city: 'iudcb' }, Office: { abc: 'jbc' } }, + address: { + Home: { + city: 'iudcb', + }, + Office: { + abc: 'jbc', + }, + }, state: 'Delhi', title: 'Mr', }, @@ -110,12 +155,18 @@ export const data = [ publicKey: '49ur490rjfo34gi04y38r9go', privateKey: 'n89g389yr389fgbef0u2rff', listIds: [ - { listId: '9834trg3rgy3g08oi9893rgfb' }, - { listId: 'f39487tyh49go3h093gh2if2f2' }, + { + listId: '9834trg3rgy3g08oi9893rgfb', + }, + { + listId: 'f39487tyh49go3h093gh2if2f2', + }, ], }, }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, }, ], destType: 'engage', @@ -166,12 +217,20 @@ export const data = [ publicKey: '49ur490rjfo34gi04y38r9go', privateKey: 'n89g389yr389fgbef0u2rff', listIds: [ - { listId: '9834trg3rgy3g08oi9893rgfb' }, - { listId: 'f39487tyh49go3h093gh2if2f2' }, + { + listId: '9834trg3rgy3g08oi9893rgfb', + }, + { + listId: 'f39487tyh49go3h093gh2if2f2', + }, ], }, }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, }, @@ -194,7 +253,11 @@ export const data = [ message: { anonymousId: 'user123', groupId: '17', - traits: { lastName: 'garwal', operation: 'remove', email: 'abc@xyz.com' }, + traits: { + lastName: 'garwal', + operation: 'remove', + email: 'abc@xyz.com', + }, type: 'group', }, destination: { @@ -202,12 +265,18 @@ export const data = [ publicKey: '49ur490rjfo34gi04y38r9go', privateKey: 'n89g389yr389fgbef0u2rff', listIds: [ - { listId: '9834trg3rgy3g08oi9893rgfb' }, - { listId: 'f39487tyh49go3h093gh2if2f2' }, + { + listId: '9834trg3rgy3g08oi9893rgfb', + }, + { + listId: 'f39487tyh49go3h093gh2if2f2', + }, ], }, }, - metadata: { jobId: 3, userId: 'u1' }, + metadata: { + jobId: 3, + }, }, ], destType: 'engage', @@ -221,14 +290,22 @@ export const data = [ body: { output: [ { - metadata: [{ jobId: 3, userId: 'u1' }], + metadata: [ + { + jobId: 3, + }, + ], destination: { Config: { publicKey: '49ur490rjfo34gi04y38r9go', privateKey: 'n89g389yr389fgbef0u2rff', listIds: [ - { listId: '9834trg3rgy3g08oi9893rgfb' }, - { listId: 'f39487tyh49go3h093gh2if2f2' }, + { + listId: '9834trg3rgy3g08oi9893rgfb', + }, + { + listId: 'f39487tyh49go3h093gh2if2f2', + }, ], }, }, diff --git a/test/integrations/destinations/facebook_conversions/router/data.ts b/test/integrations/destinations/facebook_conversions/router/data.ts index 3660f0b258..1c7f316538 100644 --- a/test/integrations/destinations/facebook_conversions/router/data.ts +++ b/test/integrations/destinations/facebook_conversions/router/data.ts @@ -1,3 +1,4 @@ +import { defaultMockFns } from '../mocks'; export const data = [ { name: 'facebook_conversions', @@ -10,7 +11,9 @@ export const data = [ body: { input: [ { - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, message: { anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', channel: 'web', @@ -21,39 +24,74 @@ export const data = [ model: 'Redmi 6', name: 'xiaomi', }, - network: { carrier: 'Banglalink' }, - os: { name: 'android', version: '8.1.0' }, - screen: { height: '100', density: 50 }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + screen: { + height: '100', + density: 50, + }, traits: { email: ' aBc@gmail.com ', - address: { zip: 1234 }, + address: { + zip: 1234, + }, anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', }, }, event: 'spin_result', - integrations: { All: true }, + integrations: { + All: true, + }, message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', - properties: { revenue: 400, additional_bet_index: 0 }, + 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 }], + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], accessToken: '09876', datasetId: 'dummyID', - eventsToEvents: [{ from: '', to: '' }], - eventCustomProperties: [{ eventCustomProperties: '' }], + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], removeExternalId: true, - whitelistPiiProperties: [{ whitelistPiiProperties: '' }], + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], actionSource: 'website', }, Enabled: true, }, }, { - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, message: { anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', channel: 'web', @@ -64,32 +102,65 @@ export const data = [ model: 'Redmi 6', name: 'xiaomi', }, - network: { carrier: 'Banglalink' }, - os: { name: 'android', version: '8.1.0' }, - screen: { height: '100', density: 50 }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + screen: { + height: '100', + density: 50, + }, traits: { email: ' aBc@gmail.com ', - address: { zip: 1234 }, + address: { + zip: 1234, + }, anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', }, }, event: 'products searched', - integrations: { All: true }, + integrations: { + All: true, + }, message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', - properties: { revenue: 400, additional_bet_index: 0 }, + 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 }], + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], accessToken: '09876', datasetId: 'dummyID', - eventsToEvents: [{ from: '', to: '' }], - eventCustomProperties: [{ eventCustomProperties: '' }], + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], removeExternalId: true, - whitelistPiiProperties: [{ whitelistPiiProperties: '' }], + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], actionSource: 'website', }, Enabled: true, @@ -126,19 +197,41 @@ export const data = [ }, files: {}, }, - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [ + { + jobId: 1, + }, + ], batched: false, statusCode: 200, destination: { Config: { limitedDataUsage: true, - blacklistPiiProperties: [{ blacklistPiiProperties: '', blacklistPiiHash: false }], + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], accessToken: '09876', datasetId: 'dummyID', - eventsToEvents: [{ from: '', to: '' }], - eventCustomProperties: [{ eventCustomProperties: '' }], + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], removeExternalId: true, - whitelistPiiProperties: [{ whitelistPiiProperties: '' }], + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], actionSource: 'website', }, Enabled: true, @@ -164,19 +257,41 @@ export const data = [ }, files: {}, }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { Config: { limitedDataUsage: true, - blacklistPiiProperties: [{ blacklistPiiProperties: '', blacklistPiiHash: false }], + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], accessToken: '09876', datasetId: 'dummyID', - eventsToEvents: [{ from: '', to: '' }], - eventCustomProperties: [{ eventCustomProperties: '' }], + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], removeExternalId: true, - whitelistPiiProperties: [{ whitelistPiiProperties: '' }], + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], actionSource: 'website', }, Enabled: true, @@ -186,5 +301,6 @@ export const data = [ }, }, }, + mockFns: defaultMockFns, }, ]; diff --git a/test/integrations/destinations/facebook_offline_conversions/router/data.ts b/test/integrations/destinations/facebook_offline_conversions/router/data.ts index c91113fcae..7bf984a029 100644 --- a/test/integrations/destinations/facebook_offline_conversions/router/data.ts +++ b/test/integrations/destinations/facebook_offline_conversions/router/data.ts @@ -19,13 +19,23 @@ export const data = [ namespace: 'com.rudderlabs.javascript', version: '1.1.2', }, - traits: { abc: '1234' }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.1.2' }, + traits: { + abc: '1234', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.2', + }, userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36', locale: 'en-GB', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, page: { path: '/tests/html/ecomm_test.html', referrer: 'http://0.0.0.0:1112/tests/html/', @@ -47,34 +57,90 @@ export const data = [ coupon: 'APPARELSALE', currency: 'GBP', products: [ - { id: 'product-bacon-jam', category: 'Merch', brand: '' }, - { id: 'product-t-shirt', category: 'Merch', brand: 'Levis' }, - { id: 'offer-t-shirt', category: 'Merch', brand: 'Levis' }, + { + id: 'product-bacon-jam', + category: 'Merch', + brand: '', + }, + { + id: 'product-t-shirt', + category: 'Merch', + brand: 'Levis', + }, + { + id: 'offer-t-shirt', + category: 'Merch', + brand: 'Levis', + }, ], }, }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, destination: { Config: { accessToken: 'ABC...', valueFieldIdentifier: 'properties.price', eventsToStandard: [ - { from: 'Product Searched', to: 'Search' }, - { to: 'ViewContent', from: 'Product Viewed' }, - { to: 'AddToCart', from: 'Cart Checkout' }, - { to: 'AddPaymentInfo', from: 'Card Details Added' }, - { to: 'Lead', from: 'Order Completed' }, - { to: 'CompleteRegistration', from: 'Signup' }, - { to: 'AddToWishlist', from: 'Button Clicked' }, + { + from: 'Product Searched', + to: 'Search', + }, + { + to: 'ViewContent', + from: 'Product Viewed', + }, + { + to: 'AddToCart', + from: 'Cart Checkout', + }, + { + to: 'AddPaymentInfo', + from: 'Card Details Added', + }, + { + to: 'Lead', + from: 'Order Completed', + }, + { + to: 'CompleteRegistration', + from: 'Signup', + }, + { + to: 'AddToWishlist', + from: 'Button Clicked', + }, ], eventsToIds: [ - { from: 'Search', to: '582603376981640' }, - { from: 'Search', to: '506289934669334' }, - { from: 'ViewContent', to: '1166826033904512' }, - { from: 'AddToCart', to: '1148872185708962' }, - { from: 'CompleteRegistration', to: '597443908839411' }, - { from: 'Lead', to: '1024592094903800' }, - { from: 'AddToWishlist', to: '506289934669334' }, + { + from: 'Search', + to: '582603376981640', + }, + { + from: 'Search', + to: '506289934669334', + }, + { + from: 'ViewContent', + to: '1166826033904512', + }, + { + from: 'AddToCart', + to: '1148872185708962', + }, + { + from: 'CompleteRegistration', + to: '597443908839411', + }, + { + from: 'Lead', + to: '1024592094903800', + }, + { + from: 'AddToWishlist', + to: '506289934669334', + }, ], isHashRequired: true, }, @@ -90,13 +156,23 @@ export const data = [ namespace: 'com.rudderlabs.javascript', version: '1.1.2', }, - traits: { abc: '1234' }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.1.2' }, + traits: { + abc: '1234', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.2', + }, userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36', locale: 'en-GB', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, page: { path: '/tests/html/ecomm_test.html', referrer: 'http://0.0.0.0:1112/tests/html/', @@ -118,33 +194,86 @@ export const data = [ coupon: 'APPARELSALE', currency: 'GBP', products: [ - { id: 'product-bacon-jam', category: 'Merch', brand: '' }, - { id: 'product-t-shirt', category: 'Merch', brand: 'Levis' }, - { id: 'offer-t-shirt', category: 'Merch', brand: 'Levis' }, + { + id: 'product-bacon-jam', + category: 'Merch', + brand: '', + }, + { + id: 'product-t-shirt', + category: 'Merch', + brand: 'Levis', + }, + { + id: 'offer-t-shirt', + category: 'Merch', + brand: 'Levis', + }, ], }, }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, destination: { Config: { accessToken: 'ABC...', valueFieldIdentifier: 'properties.price', eventsToStandard: [ - { from: 'Product Searched', to: 'Search' }, - { to: 'ViewContent', from: 'Product Viewed' }, - { to: 'AddToCart', from: 'Cart Checkout' }, - { to: 'AddPaymentInfo', from: 'Card Details Added' }, - { to: 'Lead', from: 'Order Completed' }, - { to: 'CompleteRegistration', from: 'Signup' }, - { to: 'AddToWishlist', from: 'Button Clicked' }, + { + from: 'Product Searched', + to: 'Search', + }, + { + to: 'ViewContent', + from: 'Product Viewed', + }, + { + to: 'AddToCart', + from: 'Cart Checkout', + }, + { + to: 'AddPaymentInfo', + from: 'Card Details Added', + }, + { + to: 'Lead', + from: 'Order Completed', + }, + { + to: 'CompleteRegistration', + from: 'Signup', + }, + { + to: 'AddToWishlist', + from: 'Button Clicked', + }, ], eventsToIds: [ - { from: 'Search', to: '582603376981640' }, - { from: 'Search', to: '506289934669334' }, - { from: 'ViewContent', to: '1166826033904512' }, - { from: 'AddToCart', to: '1148872185708962' }, - { from: 'CompleteRegistration', to: '597443908839411' }, - { from: 'Lead', to: '1024592094903800' }, + { + from: 'Search', + to: '582603376981640', + }, + { + from: 'Search', + to: '506289934669334', + }, + { + from: 'ViewContent', + to: '1166826033904512', + }, + { + from: 'AddToCart', + to: '1148872185708962', + }, + { + from: 'CompleteRegistration', + to: '597443908839411', + }, + { + from: 'Lead', + to: '1024592094903800', + }, ], isHashRequired: true, }, @@ -165,7 +294,9 @@ export const data = [ birthday: '2005-01-01T23:28:56.782Z', firstName: 'test', lastName: 'rudderstack', - initial: { firstName: 'rudderlabs' }, + initial: { + firstName: 'rudderlabs', + }, address: { city: 'kalkata', state: 'west bangal', @@ -175,12 +306,20 @@ export const data = [ phone: '9886775586', gender: 'male', }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.1.2' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.2', + }, userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36', locale: 'en-GB', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, page: { path: '/tests/html/ecomm_test.html', referrer: 'http://0.0.0.0:1112/tests/html/', @@ -188,7 +327,9 @@ export const data = [ title: 'Fb Offline Conversion Ecommerce Test', url: 'http://0.0.0.0:1112/tests/html/ecomm_test.html', }, - device: { advertisingId: 'apple@123' }, + device: { + advertisingId: 'apple@123', + }, }, type: 'track', messageId: '9116b734-7e6b-4497-ab51-c16744d4487e', @@ -204,33 +345,86 @@ export const data = [ coupon: 'APPARELSALE', currency: 'IND', products: [ - { id: 'product-bacon-jam', category: 'Merch', brand: '' }, - { id: 'product-t-shirt', category: 'Merch', brand: 'Levis' }, - { id: 'offer-t-shirt', category: 'Merch', brand: 'Levis' }, + { + id: 'product-bacon-jam', + category: 'Merch', + brand: '', + }, + { + id: 'product-t-shirt', + category: 'Merch', + brand: 'Levis', + }, + { + id: 'offer-t-shirt', + category: 'Merch', + brand: 'Levis', + }, ], }, }, - metadata: { jobId: 3, userId: 'u1' }, + metadata: { + jobId: 3, + }, destination: { Config: { accessToken: 'ABC...', valueFieldIdentifier: 'properties.price', eventsToStandard: [ - { from: 'Product Searched', to: 'Search' }, - { to: 'ViewContent', from: 'Product Searched' }, - { to: 'AddToCart', from: 'Cart Checkout' }, - { to: 'AddPaymentInfo', from: 'Card Details Added' }, - { to: 'Lead', from: 'Order Completed' }, - { to: 'CompleteRegistration', from: 'Signup' }, - { to: 'AddToWishlist', from: 'Button Clicked' }, + { + from: 'Product Searched', + to: 'Search', + }, + { + to: 'ViewContent', + from: 'Product Searched', + }, + { + to: 'AddToCart', + from: 'Cart Checkout', + }, + { + to: 'AddPaymentInfo', + from: 'Card Details Added', + }, + { + to: 'Lead', + from: 'Order Completed', + }, + { + to: 'CompleteRegistration', + from: 'Signup', + }, + { + to: 'AddToWishlist', + from: 'Button Clicked', + }, ], eventsToIds: [ - { from: 'Search', to: '582603376981640' }, - { from: 'Search', to: '506289934669334' }, - { from: 'ViewContent', to: '1166826033904512' }, - { from: 'AddToCart', to: '1148872185708962' }, - { from: 'CompleteRegistration', to: '597443908839411' }, - { from: 'Lead', to: '1024592094903800' }, + { + from: 'Search', + to: '582603376981640', + }, + { + from: 'Search', + to: '506289934669334', + }, + { + from: 'ViewContent', + to: '1166826033904512', + }, + { + from: 'AddToCart', + to: '1148872185708962', + }, + { + from: 'CompleteRegistration', + to: '597443908839411', + }, + { + from: 'Lead', + to: '1024592094903800', + }, ], isHashRequired: true, }, @@ -249,7 +443,11 @@ export const data = [ output: [ { error: 'Please Map Your Standard Events With Event Set Ids', - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [ + { + jobId: 1, + }, + ], batched: false, statTags: { destType: 'FACEBOOK_OFFLINE_CONVERSIONS', @@ -265,22 +463,64 @@ export const data = [ accessToken: 'ABC...', valueFieldIdentifier: 'properties.price', eventsToStandard: [ - { from: 'Product Searched', to: 'Search' }, - { to: 'ViewContent', from: 'Product Viewed' }, - { to: 'AddToCart', from: 'Cart Checkout' }, - { to: 'AddPaymentInfo', from: 'Card Details Added' }, - { to: 'Lead', from: 'Order Completed' }, - { to: 'CompleteRegistration', from: 'Signup' }, - { to: 'AddToWishlist', from: 'Button Clicked' }, + { + from: 'Product Searched', + to: 'Search', + }, + { + to: 'ViewContent', + from: 'Product Viewed', + }, + { + to: 'AddToCart', + from: 'Cart Checkout', + }, + { + to: 'AddPaymentInfo', + from: 'Card Details Added', + }, + { + to: 'Lead', + from: 'Order Completed', + }, + { + to: 'CompleteRegistration', + from: 'Signup', + }, + { + to: 'AddToWishlist', + from: 'Button Clicked', + }, ], eventsToIds: [ - { from: 'Search', to: '582603376981640' }, - { from: 'Search', to: '506289934669334' }, - { from: 'ViewContent', to: '1166826033904512' }, - { from: 'AddToCart', to: '1148872185708962' }, - { from: 'CompleteRegistration', to: '597443908839411' }, - { from: 'Lead', to: '1024592094903800' }, - { from: 'AddToWishlist', to: '506289934669334' }, + { + from: 'Search', + to: '582603376981640', + }, + { + from: 'Search', + to: '506289934669334', + }, + { + from: 'ViewContent', + to: '1166826033904512', + }, + { + from: 'AddToCart', + to: '1148872185708962', + }, + { + from: 'CompleteRegistration', + to: '597443908839411', + }, + { + from: 'Lead', + to: '1024592094903800', + }, + { + from: 'AddToWishlist', + to: '506289934669334', + }, ], isHashRequired: true, }, @@ -288,7 +528,11 @@ export const data = [ }, { error: 'Please Map Your Standard Events With Event Set Ids', - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], statTags: { destType: 'FACEBOOK_OFFLINE_CONVERSIONS', errorCategory: 'dataValidation', @@ -304,31 +548,79 @@ export const data = [ accessToken: 'ABC...', valueFieldIdentifier: 'properties.price', eventsToStandard: [ - { from: 'Product Searched', to: 'Search' }, - { to: 'ViewContent', from: 'Product Viewed' }, - { to: 'AddToCart', from: 'Cart Checkout' }, - { to: 'AddPaymentInfo', from: 'Card Details Added' }, - { to: 'Lead', from: 'Order Completed' }, - { to: 'CompleteRegistration', from: 'Signup' }, - { to: 'AddToWishlist', from: 'Button Clicked' }, + { + from: 'Product Searched', + to: 'Search', + }, + { + to: 'ViewContent', + from: 'Product Viewed', + }, + { + to: 'AddToCart', + from: 'Cart Checkout', + }, + { + to: 'AddPaymentInfo', + from: 'Card Details Added', + }, + { + to: 'Lead', + from: 'Order Completed', + }, + { + to: 'CompleteRegistration', + from: 'Signup', + }, + { + to: 'AddToWishlist', + from: 'Button Clicked', + }, ], eventsToIds: [ - { from: 'Search', to: '582603376981640' }, - { from: 'Search', to: '506289934669334' }, - { from: 'ViewContent', to: '1166826033904512' }, - { from: 'AddToCart', to: '1148872185708962' }, - { from: 'CompleteRegistration', to: '597443908839411' }, - { from: 'Lead', to: '1024592094903800' }, + { + from: 'Search', + to: '582603376981640', + }, + { + from: 'Search', + to: '506289934669334', + }, + { + from: 'ViewContent', + to: '1166826033904512', + }, + { + from: 'AddToCart', + to: '1148872185708962', + }, + { + from: 'CompleteRegistration', + to: '597443908839411', + }, + { + from: 'Lead', + to: '1024592094903800', + }, ], isHashRequired: true, }, }, }, { - metadata: [{ jobId: 3, userId: 'u1' }], + metadata: [ + { + jobId: 3, + }, + ], batchedRequest: [ { - body: { FORM: {}, JSON: {}, JSON_ARRAY: {}, XML: {} }, + body: { + FORM: {}, + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + }, endpoint: 'https://graph.facebook.com/v16.0/1148872185708962/events?upload_tag=test campaign&data=%5B%7B%22match_keys%22%3A%7B%22doby%22%3A%22f388bc7cd953b951ffdf8e06275d94946dc52f03ed96536497fbe534469d38d6%22%2C%22dobm%22%3A%22f388bc7cd953b951ffdf8e06275d94946dc52f03ed96536497fbe534469d38d6%22%2C%22dobd%22%3A%22f388bc7cd953b951ffdf8e06275d94946dc52f03ed96536497fbe534469d38d6%22%2C%22extern_id%22%3A%22user%401%22%2C%22email%22%3A%5B%221c5e54849f5c711ce38fa60716fbbe44bff478f9ca250897b39cdfc2438cd1bd%22%5D%2C%22phone%22%3A%5B%2274a39482392f83119041d571d5dace439d315faea8214fe8e815c00261b80615%22%5D%2C%22gen%22%3A%220d248e82c62c9386878327d491c762a002152d42ab2c391a31c44d9f62675ddf%22%2C%22ln%22%3A%227fb35d4777487797615cfa7c57724a47ba99152485600ccdb98e3871a6d05b21%22%2C%22fn%22%3A%229f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08%22%2C%22ct%22%3A%22375aba919c30870659093b7ddcf6045ff7a8624dd4dba49ced8981bd4d0666e0%22%2C%22zip%22%3A%5B%228d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92%22%5D%2C%22madid%22%3A%22c20fa16907343eef642d10f0bdb81bf629e6aaf6c906f26eabda079ca9e5ab67%22%2C%22client_user_agent%22%3A%22Mozilla%2F5.0%20(Macintosh%3B%20Intel%20Mac%20OS%20X%2010_15_3)%20AppleWebKit%2F537.36%20(KHTML%2C%20like%20Gecko)%20Chrome%2F83.0.4103.97%20Safari%2F537.36%22%7D%2C%22event_time%22%3A1663761919%2C%22currency%22%3A%22IND%22%2C%22value%22%3A100%2C%22order_id%22%3A%22485893487985894998%22%2C%22contents%22%3A%5B%7B%22id%22%3A%22product-bacon-jam%22%2C%22quantity%22%3A1%2C%22brand%22%3A%22%22%2C%22category%22%3A%22Merch%22%7D%2C%7B%22id%22%3A%22product-t-shirt%22%2C%22quantity%22%3A1%2C%22brand%22%3A%22Levis%22%2C%22category%22%3A%22Merch%22%7D%2C%7B%22id%22%3A%22offer-t-shirt%22%2C%22quantity%22%3A1%2C%22brand%22%3A%22Levis%22%2C%22category%22%3A%22Merch%22%7D%5D%2C%22custom_data%22%3A%7B%22extern_id%22%3A%22user%401%22%2C%22event_name%22%3A%22Cart%20Checkout%22%2C%22event_time%22%3A1663761919%2C%22currency%22%3A%22IND%22%2C%22value%22%3A100%2C%22email%22%3A%221c5e54849f5c711ce38fa60716fbbe44bff478f9ca250897b39cdfc2438cd1bd%22%2C%22phone%22%3A%2274a39482392f83119041d571d5dace439d315faea8214fe8e815c00261b80615%22%2C%22gen%22%3A%220d248e82c62c9386878327d491c762a002152d42ab2c391a31c44d9f62675ddf%22%2C%22ln%22%3A%227fb35d4777487797615cfa7c57724a47ba99152485600ccdb98e3871a6d05b21%22%2C%22fn%22%3A%229f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08%22%2C%22ct%22%3A%22375aba919c30870659093b7ddcf6045ff7a8624dd4dba49ced8981bd4d0666e0%22%2C%22zip%22%3A%228d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92%22%2C%22madid%22%3A%22c20fa16907343eef642d10f0bdb81bf629e6aaf6c906f26eabda079ca9e5ab67%22%2C%22contents%22%3A%5B%7B%22id%22%3A%22product-bacon-jam%22%2C%22category%22%3A%22Merch%22%2C%22brand%22%3A%22%22%7D%2C%7B%22id%22%3A%22product-t-shirt%22%2C%22category%22%3A%22Merch%22%2C%22brand%22%3A%22Levis%22%7D%2C%7B%22id%22%3A%22offer-t-shirt%22%2C%22category%22%3A%22Merch%22%2C%22brand%22%3A%22Levis%22%7D%5D%2C%22order_id%22%3A%22485893487985894998%22%2C%22upload_tag%22%3A%22test%20campaign%22%2C%22client_user_agent%22%3A%22Mozilla%2F5.0%20(Macintosh%3B%20Intel%20Mac%20OS%20X%2010_15_3)%20AppleWebKit%2F537.36%20(KHTML%2C%20like%20Gecko)%20Chrome%2F83.0.4103.97%20Safari%2F537.36%22%2C%22event_source_url%22%3A%22http%3A%2F%2F0.0.0.0%3A1112%2Ftests%2Fhtml%2Fecomm_test.html%22%2C%22shipping%22%3A4%2C%22coupon%22%3A%22APPARELSALE%22%7D%2C%22event_source_url%22%3A%22http%3A%2F%2F0.0.0.0%3A1112%2Ftests%2Fhtml%2Fecomm_test.html%22%2C%22event_name%22%3A%22AddToCart%22%2C%22content_type%22%3A%22product%22%7D%5D&access_token=ABC...', files: {}, @@ -346,21 +638,60 @@ export const data = [ accessToken: 'ABC...', valueFieldIdentifier: 'properties.price', eventsToStandard: [ - { from: 'Product Searched', to: 'Search' }, - { to: 'ViewContent', from: 'Product Searched' }, - { to: 'AddToCart', from: 'Cart Checkout' }, - { to: 'AddPaymentInfo', from: 'Card Details Added' }, - { to: 'Lead', from: 'Order Completed' }, - { to: 'CompleteRegistration', from: 'Signup' }, - { to: 'AddToWishlist', from: 'Button Clicked' }, + { + from: 'Product Searched', + to: 'Search', + }, + { + to: 'ViewContent', + from: 'Product Searched', + }, + { + to: 'AddToCart', + from: 'Cart Checkout', + }, + { + to: 'AddPaymentInfo', + from: 'Card Details Added', + }, + { + to: 'Lead', + from: 'Order Completed', + }, + { + to: 'CompleteRegistration', + from: 'Signup', + }, + { + to: 'AddToWishlist', + from: 'Button Clicked', + }, ], eventsToIds: [ - { from: 'Search', to: '582603376981640' }, - { from: 'Search', to: '506289934669334' }, - { from: 'ViewContent', to: '1166826033904512' }, - { from: 'AddToCart', to: '1148872185708962' }, - { from: 'CompleteRegistration', to: '597443908839411' }, - { from: 'Lead', to: '1024592094903800' }, + { + from: 'Search', + to: '582603376981640', + }, + { + from: 'Search', + to: '506289934669334', + }, + { + from: 'ViewContent', + to: '1166826033904512', + }, + { + from: 'AddToCart', + to: '1148872185708962', + }, + { + from: 'CompleteRegistration', + to: '597443908839411', + }, + { + from: 'Lead', + to: '1024592094903800', + }, ], isHashRequired: true, }, diff --git a/test/integrations/destinations/facebook_pixel/router/data.ts b/test/integrations/destinations/facebook_pixel/router/data.ts index 82da40c742..ee2f6968b1 100644 --- a/test/integrations/destinations/facebook_pixel/router/data.ts +++ b/test/integrations/destinations/facebook_pixel/router/data.ts @@ -1,3 +1,10 @@ +import { VERSION } from '../../../../../src/v0/destinations/facebook_pixel/config'; + +export const mockFns = (_) => { + // @ts-ignore + jest.useFakeTimers().setSystemTime(new Date('2023-10-15')); +}; + export const data = [ { name: 'facebook_pixel', @@ -12,7 +19,11 @@ export const data = [ { message: { anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - destination_props: { Fb: { app_id: 'RudderFbApp' } }, + destination_props: { + Fb: { + app_id: 'RudderFbApp', + }, + }, context: { device: { id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', @@ -20,34 +31,67 @@ export const data = [ model: 'Redmi 6', name: 'xiaomi', }, - network: { carrier: 'Banglalink' }, - os: { name: 'android', version: '8.1.0' }, - screen: { height: '100', density: 50 }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + screen: { + height: '100', + density: 50, + }, traits: { email: 'abc@gmail.com', anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', }, }, event: 'spin_result', - integrations: { All: true }, + integrations: { + All: true, + }, message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', - properties: { revenue: 400, additional_bet_index: 0 }, + properties: { + revenue: 400, + additional_bet_index: 0, + }, timestamp: '2023-10-14T15:46:51.693229+05:30', type: 'track', }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, destination: { Config: { limitedDataUsage: true, - blacklistPiiProperties: [{ blacklistPiiProperties: '', blacklistPiiHash: false }], + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], removeExternalId: true, accessToken: '09876', pixelId: 'dummyPixelId', - eventsToEvents: [{ from: '', to: '' }], - eventCustomProperties: [{ eventCustomProperties: '' }], + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], valueFieldIdentifier: '', advancedMapping: false, - whitelistPiiProperties: [{ whitelistPiiProperties: '' }], + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], }, Enabled: true, }, @@ -70,34 +114,67 @@ 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 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', locale: 'en-US', ip: '0.0.0.0', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + }, + properties: { + plan: 'standard plan', + name: 'rudder test', }, - properties: { plan: 'standard plan', name: 'rudder test' }, type: 'identify', messageId: '84e26acc-56a5-4835-8233-591137fca468', originalTimestamp: '2023-10-14T00:00:00.693229+05:30', anonymousId: '00000000000000000000000000', userId: '123456', - integrations: { All: true }, + integrations: { + All: true, + }, sentAt: '2019-10-14T09:03:22.563Z', }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, destination: { Config: { - blacklistPiiProperties: [{ blacklistPiiProperties: '', blacklistPiiHash: false }], + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], accessToken: '09876', pixelId: 'dummyPixelId', - eventsToEvents: [{ from: '', to: '' }], - eventCustomProperties: [{ eventCustomProperties: '' }], + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], valueFieldIdentifier: '', advancedMapping: true, - whitelistPiiProperties: [{ whitelistPiiProperties: '' }], + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], }, Enabled: true, }, @@ -118,7 +195,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v18.0/dummyPixelId/events?access_token=09876', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=09876`, headers: {}, params: {}, body: { @@ -133,21 +210,43 @@ export const data = [ }, files: {}, }, - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [ + { + jobId: 1, + }, + ], batched: false, statusCode: 200, destination: { Config: { limitedDataUsage: true, - blacklistPiiProperties: [{ blacklistPiiProperties: '', blacklistPiiHash: false }], + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], removeExternalId: true, accessToken: '09876', pixelId: 'dummyPixelId', - eventsToEvents: [{ from: '', to: '' }], - eventCustomProperties: [{ eventCustomProperties: '' }], + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], valueFieldIdentifier: '', advancedMapping: false, - whitelistPiiProperties: [{ whitelistPiiProperties: '' }], + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], }, Enabled: true, }, @@ -157,7 +256,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v18.0/dummyPixelId/events?access_token=09876', + endpoint: `https://graph.facebook.com/${VERSION}/dummyPixelId/events?access_token=09876`, headers: {}, params: {}, body: { @@ -172,19 +271,41 @@ export const data = [ }, files: {}, }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { Config: { - blacklistPiiProperties: [{ blacklistPiiProperties: '', blacklistPiiHash: false }], + blacklistPiiProperties: [ + { + blacklistPiiProperties: '', + blacklistPiiHash: false, + }, + ], accessToken: '09876', pixelId: 'dummyPixelId', - eventsToEvents: [{ from: '', to: '' }], - eventCustomProperties: [{ eventCustomProperties: '' }], + eventsToEvents: [ + { + from: '', + to: '', + }, + ], + eventCustomProperties: [ + { + eventCustomProperties: '', + }, + ], valueFieldIdentifier: '', advancedMapping: true, - whitelistPiiProperties: [{ whitelistPiiProperties: '' }], + whitelistPiiProperties: [ + { + whitelistPiiProperties: '', + }, + ], }, Enabled: true, }, @@ -194,4 +315,4 @@ export const data = [ }, }, }, -]; +].map((d) => ({ ...d, mockFns })); diff --git a/test/integrations/destinations/fb/router/data.ts b/test/integrations/destinations/fb/router/data.ts index d5872c78cd..4daefad141 100644 --- a/test/integrations/destinations/fb/router/data.ts +++ b/test/integrations/destinations/fb/router/data.ts @@ -12,7 +12,11 @@ export const data = [ { message: { anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - destination_props: { Fb: { app_id: 'RudderFbApp' } }, + destination_props: { + Fb: { + app_id: 'RudderFbApp', + }, + }, context: { device: { id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', @@ -21,16 +25,28 @@ export const data = [ name: 'xiaomi', type: 'Android', }, - network: { carrier: 'Banglalink' }, - os: { name: 'android', version: '8.1.0' }, - screen: { height: '100', density: 50 }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + screen: { + height: '100', + density: 50, + }, traits: { email: 'abc@gmail.com', anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', }, }, event: 'spin_result', - integrations: { AM: true, All: false, GA: true }, + integrations: { + AM: true, + All: false, + GA: true, + }, message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', properties: { revenue: 400, @@ -70,7 +86,17 @@ export const data = [ userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', versionSessionCount: 2, win_amount: 0, - products: [{ product_id: 123 }, { product_id: 345 }, { product_id: 567 }], + products: [ + { + product_id: 123, + }, + { + product_id: 345, + }, + { + product_id: 567, + }, + ], }, timestamp: '2019-09-01T15:46:51.693229+05:30', type: 'track', @@ -95,13 +121,23 @@ export const data = [ versionSessionCount: 2, }, }, - metadata: { jobId: 2, userId: 'u1' }, - destination: { Config: { appID: 'RudderFbApp' } }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + appID: 'RudderFbApp', + }, + }, }, { message: { anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - destination_props: { Fb: { app_id: 'RudderFbApp' } }, + destination_props: { + Fb: { + app_id: 'RudderFbApp', + }, + }, context: { device: { id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', @@ -110,16 +146,28 @@ export const data = [ name: 'xiaomi', type: 'Android', }, - network: { carrier: 'Banglalink' }, - os: { name: 'android', version: '8.1.0' }, - screen: { height: '100', density: 50 }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, + screen: { + height: '100', + density: 50, + }, traits: { email: 'abc@gmail.com', anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', }, }, event: 'spin_result', - integrations: { AM: true, All: false, GA: true }, + integrations: { + AM: true, + All: false, + GA: true, + }, message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', properties: { revenue: 400, @@ -160,7 +208,17 @@ export const data = [ userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', versionSessionCount: 2, win_amount: 0, - products: [{ product_id: 123 }, { product_id: 345 }, { product_id: 567 }], + products: [ + { + product_id: 123, + }, + { + product_id: 345, + }, + { + product_id: 567, + }, + ], }, timestamp: '2019-09-01T15:46:51.693229+05:30', type: 'track', @@ -185,8 +243,14 @@ export const data = [ versionSessionCount: 2, }, }, - metadata: { jobId: 3, userId: 'u1' }, - destination: { Config: { appID: 'RudderFbApp' } }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + appID: 'RudderFbApp', + }, + }, }, ], destType: 'fb', @@ -199,7 +263,11 @@ export const data = [ body: { output: [ { - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], statTags: { errorCategory: 'dataValidation', errorType: 'instrumentation', @@ -208,14 +276,26 @@ export const data = [ implementation: 'native', module: 'destination', }, - destination: { Config: { appID: 'RudderFbApp' } }, + destination: { + Config: { + appID: 'RudderFbApp', + }, + }, batched: false, statusCode: 400, error: 'If properties.revenue is present, properties.currency is required.', }, { - metadata: [{ jobId: 3, userId: 'u1' }], - destination: { Config: { appID: 'RudderFbApp' } }, + metadata: [ + { + jobId: 2, + }, + ], + destination: { + Config: { + appID: 'RudderFbApp', + }, + }, statTags: { errorCategory: 'dataValidation', errorType: 'instrumentation', diff --git a/test/integrations/destinations/fb_custom_audience/router/data.ts b/test/integrations/destinations/fb_custom_audience/router/data.ts index 33a7cde08f..fd099fe33c 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', @@ -49,10 +51,17 @@ export const data = [ ], }, }, - context: { ip: '14.5.67.21', library: { name: 'http' } }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, timestamp: '2020-02-02T00:23:09.544Z', }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, destination: { Config: { accessToken: 'ABC', @@ -122,10 +131,17 @@ export const data = [ ], }, }, - context: { ip: '14.5.67.21', library: { name: 'http' } }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, timestamp: '2020-02-02T00:23:09.544Z', }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, destination: { Config: { accessToken: 'ABC', @@ -155,7 +171,9 @@ export const data = [ IsProcessorEnabled: true, }, libraries: [], - request: { query: {} }, + request: { + query: {}, + }, }, ], destType: 'fb_custom_audience', @@ -173,13 +191,16 @@ export const data = [ version: '1', type: 'REST', method: 'DELETE', - endpoint: 'https://graph.facebook.com/v18.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: {}, params: { access_token: 'ABC', payload: { is_raw: true, - data_source: { type: 'UNKNOWN', sub_type: 'ANYTHING' }, + data_source: { + type: 'UNKNOWN', + sub_type: 'ANYTHING', + }, schema: [ 'EMAIL', 'DOBM', @@ -210,20 +231,28 @@ export const data = [ ], }, }, - body: { JSON: {}, JSON_ARRAY: {}, XML: {}, FORM: {} }, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, files: {}, }, { version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v18.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: {}, params: { access_token: 'ABC', payload: { is_raw: true, - data_source: { type: 'UNKNOWN', sub_type: 'ANYTHING' }, + data_source: { + type: 'UNKNOWN', + sub_type: 'ANYTHING', + }, schema: [ 'EMAIL', 'DOBM', @@ -254,11 +283,20 @@ export const data = [ ], }, }, - body: { JSON: {}, JSON_ARRAY: {}, XML: {}, FORM: {} }, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, files: {}, }, ], - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [ + { + jobId: 1, + }, + ], batched: false, statusCode: 200, destination: { @@ -296,13 +334,15 @@ export const data = [ version: '1', type: 'REST', method: 'DELETE', - endpoint: 'https://graph.facebook.com/v18.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: {}, params: { access_token: 'ABC', payload: { is_raw: true, - data_source: { sub_type: 'ANYTHING' }, + data_source: { + sub_type: 'ANYTHING', + }, schema: [ 'EMAIL', 'DOBM', @@ -333,20 +373,27 @@ export const data = [ ], }, }, - body: { JSON: {}, JSON_ARRAY: {}, XML: {}, FORM: {} }, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, files: {}, }, { version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v18.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: {}, params: { access_token: 'ABC', payload: { is_raw: true, - data_source: { sub_type: 'ANYTHING' }, + data_source: { + sub_type: 'ANYTHING', + }, schema: [ 'EMAIL', 'DOBM', @@ -377,11 +424,20 @@ export const data = [ ], }, }, - body: { JSON: {}, JSON_ARRAY: {}, XML: {}, FORM: {} }, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, files: {}, }, ], - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { @@ -438,7 +494,10 @@ export const data = [ context: { destinationFields: 'EMAIL, FN', externalId: [ - { type: 'FB_CUSTOM_AUDIENCE-23848494844100489', identifierType: 'EMAIL' }, + { + type: 'FB_CUSTOM_AUDIENCE-23848494844100489', + identifierType: 'EMAIL', + }, ], mappedToDestination: 'true', sources: { @@ -453,16 +512,46 @@ export const data = [ properties: { listData: { add: [ - { EMAIL: 'dede@gmail.com', FN: 'vishwa' }, - { EMAIL: 'fchsjjn@gmail.com', FN: 'hskks' }, - { EMAIL: 'fghjnbjk@gmail.com', FN: 'ghfry' }, - { EMAIL: 'gvhjkk@gmail.com', FN: 'hbcwqe' }, - { EMAIL: 'qsdwert@egf.com', FN: 'dsfds' }, - { EMAIL: 'ascscxsaca@com', FN: 'scadscdvcda' }, - { EMAIL: 'abc@gmail.com', FN: 'subscribed' }, - { EMAIL: 'ddwnkl@gmail.com', FN: 'subscribed' }, - { EMAIL: 'subscribed@eewrfrd.com', FN: 'pending' }, - { EMAIL: 'acsdvdf@ddfvf.com', FN: 'pending' }, + { + EMAIL: 'dede@gmail.com', + FN: 'vishwa', + }, + { + EMAIL: 'fchsjjn@gmail.com', + FN: 'hskks', + }, + { + EMAIL: 'fghjnbjk@gmail.com', + FN: 'ghfry', + }, + { + EMAIL: 'gvhjkk@gmail.com', + FN: 'hbcwqe', + }, + { + EMAIL: 'qsdwert@egf.com', + FN: 'dsfds', + }, + { + EMAIL: 'ascscxsaca@com', + FN: 'scadscdvcda', + }, + { + EMAIL: 'abc@gmail.com', + FN: 'subscribed', + }, + { + EMAIL: 'ddwnkl@gmail.com', + FN: 'subscribed', + }, + { + EMAIL: 'subscribed@eewrfrd.com', + FN: 'pending', + }, + { + EMAIL: 'acsdvdf@ddfvf.com', + FN: 'pending', + }, ], }, }, @@ -501,7 +590,9 @@ export const data = [ isConnectionEnabled: true, isProcessorEnabled: true, }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, }, { message: { @@ -512,7 +603,10 @@ export const data = [ event: 'Add_Audience', context: { externalId: [ - { type: 'FB_CUSTOM_AUDIENCE-23848494844100489', identifierType: 'EMAIL' }, + { + type: 'FB_CUSTOM_AUDIENCE-23848494844100489', + identifierType: 'EMAIL', + }, ], mappedToDestination: 'true', sources: { @@ -527,16 +621,46 @@ export const data = [ properties: { listData: { add: [ - { EMAIL: 'dede@gmail.com', FN: 'vishwa' }, - { EMAIL: 'fchsjjn@gmail.com', FN: 'hskks' }, - { EMAIL: 'fghjnbjk@gmail.com', FN: 'ghfry' }, - { EMAIL: 'gvhjkk@gmail.com', FN: 'hbcwqe' }, - { EMAIL: 'qsdwert@egf.com', FN: 'dsfds' }, - { EMAIL: 'ascscxsaca@com', FN: 'scadscdvcda' }, - { EMAIL: 'abc@gmail.com', FN: 'subscribed' }, - { EMAIL: 'ddwnkl@gmail.com', FN: 'subscribed' }, - { EMAIL: 'subscribed@eewrfrd.com', FN: 'pending' }, - { EMAIL: 'acsdvdf@ddfvf.com', FN: 'pending' }, + { + EMAIL: 'dede@gmail.com', + FN: 'vishwa', + }, + { + EMAIL: 'fchsjjn@gmail.com', + FN: 'hskks', + }, + { + EMAIL: 'fghjnbjk@gmail.com', + FN: 'ghfry', + }, + { + EMAIL: 'gvhjkk@gmail.com', + FN: 'hbcwqe', + }, + { + EMAIL: 'qsdwert@egf.com', + FN: 'dsfds', + }, + { + EMAIL: 'ascscxsaca@com', + FN: 'scadscdvcda', + }, + { + EMAIL: 'abc@gmail.com', + FN: 'subscribed', + }, + { + EMAIL: 'ddwnkl@gmail.com', + FN: 'subscribed', + }, + { + EMAIL: 'subscribed@eewrfrd.com', + FN: 'pending', + }, + { + EMAIL: 'acsdvdf@ddfvf.com', + FN: 'pending', + }, ], }, }, @@ -575,7 +699,9 @@ export const data = [ isConnectionEnabled: true, isProcessorEnabled: true, }, - metadata: { jobId: 3, userId: 'u1' }, + metadata: { + jobId: 2, + }, }, { message: { @@ -587,7 +713,12 @@ export const data = [ context: { destinationFields: 'EMAIL, DOBM, DOBD, DOBY, PHONE, GEN, FI, MADID, ZIP, ST, COUNTRY', - externalId: [{ type: 'FB_CUSTOM_AUDIENCE-aud1', identifierType: 'EMAIL' }], + externalId: [ + { + type: 'FB_CUSTOM_AUDIENCE-aud1', + identifierType: 'EMAIL', + }, + ], mappedToDestination: 'true', sources: { job_run_id: 'cgiiurt8um7k7n5dq480', @@ -26599,7 +26730,9 @@ export const data = [ isConnectionEnabled: true, isProcessorEnabled: true, }, - metadata: { jobId: 4, userId: 'u1' }, + metadata: { + jobId: 2, + }, }, ], destType: 'fb_custom_audience', @@ -26617,7 +26750,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v18.0/23848494844100489/users', + endpoint: getEndPoint('23848494844100489'), headers: {}, params: { access_token: 'ABC', @@ -26637,11 +26770,20 @@ export const data = [ ], }, }, - body: { JSON: {}, JSON_ARRAY: {}, XML: {}, FORM: {} }, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, files: {}, }, ], - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { @@ -26712,7 +26854,11 @@ export const data = [ }, error: 'context.destinationFields is required property for events mapped to destination ', - metadata: [{ jobId: 3, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 400, statTags: { @@ -26730,7 +26876,7 @@ export const data = [ version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v18.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: {}, params: { access_token: 'ABC', @@ -33253,14 +33399,19 @@ export const data = [ ], }, }, - body: { JSON: {}, XML: {}, JSON_ARRAY: {}, FORM: {} }, + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, files: {}, }, { version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v18.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: {}, params: { access_token: 'ABC', @@ -39783,14 +39934,19 @@ export const data = [ ], }, }, - body: { JSON: {}, XML: {}, JSON_ARRAY: {}, FORM: {} }, + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, files: {}, }, { version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v18.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: {}, params: { access_token: 'ABC', @@ -46287,14 +46443,19 @@ export const data = [ ], }, }, - body: { JSON: {}, XML: {}, JSON_ARRAY: {}, FORM: {} }, + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, files: {}, }, { version: '1', type: 'REST', method: 'POST', - endpoint: 'https://graph.facebook.com/v18.0/aud1/users', + endpoint: getEndPoint('aud1'), headers: {}, params: { access_token: 'ABC', @@ -52791,11 +52952,20 @@ export const data = [ ], }, }, - body: { JSON: {}, XML: {}, JSON_ARRAY: {}, FORM: {} }, + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, files: {}, }, ], - metadata: [{ jobId: 4, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { diff --git a/test/integrations/destinations/freshmarketer/network.ts b/test/integrations/destinations/freshmarketer/network.ts index 9d661f2686..51f1a0c115 100644 --- a/test/integrations/destinations/freshmarketer/network.ts +++ b/test/integrations/destinations/freshmarketer/network.ts @@ -1,495 +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', + { + httpReq: { + url: 'https://domain-rudder.myfreshworks.com/crm/sales/api/sales_accounts/upsert', + method: 'POST' }, - }, - 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, + 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" + } }, - ], - 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 }, - }, - 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, + { + 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 + } + ] + } }, - ], - 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 }, - }, - 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, + { + 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 }, - }, - status: 200, }, - }, - { - httpReq: { - url: 'https://domain-rudder.myfreshworks.com/crm/sales/api/selector/lifecycle_stages', - method: 'GET', + { + 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 + }, }, - 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, + { + 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 index ed920faef0..2af5728f9c 100644 --- a/test/integrations/destinations/freshmarketer/processor/data.ts +++ b/test/integrations/destinations/freshmarketer/processor/data.ts @@ -1,3147 +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, - }, - ], - }, - }, - }, -]; + { + "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 index 03690b6e27..bffb361ba5 100644 --- a/test/integrations/destinations/freshmarketer/router/data.ts +++ b/test/integrations/destinations/freshmarketer/router/data.ts @@ -1,304 +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, userId: 'u1' }, - 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, userId: 'u1' }, - 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, userId: 'u1' }, - 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: {}, + { + name: 'freshmarketer', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { 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, userId: 'u1' }], - batched: false, - statusCode: 200, - destination: { - Config: { - apiKey: 'dummyApiKey', - domain: 'rudderstack-476952domain3105.myfreshworks.com', + 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', }, - }, - }, - { - 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, userId: 'u1' }], - batched: false, - statusCode: 200, - destination: { - Config: { - apiKey: 'dummyApiKey', - domain: 'rudderstack-476952domain3105.myfreshworks.com', - }, - }, }, - { - batchedRequest: { + }, + output: { + response: { + status: 200, body: { - XML: {}, - FORM: {}, - JSON: { - contact: { - sales_accounts: [ + output: [ { - id: 70003771198, - name: 'div-quer', - avatar: null, - partial: true, - website: null, - is_primary: true, - last_contacted: null, - record_type_id: '71010794477', + "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" + } + } }, { - id: 70003825177, - name: 'BisleriGroup', - avatar: null, - partial: true, - website: null, - is_primary: false, - last_contacted: null, - record_type_id: '71010794477', + "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" + } + } }, - { 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', + { + "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" + } + } + } + ], }, - version: '1', - endpoint: 'https://domain-rudder.myfreshworks.com/crm/sales/api/contacts/upsert', - }, - metadata: [{ jobId: 3, userId: 'u1' }], - 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 index 9d661f2686..f6043b265f 100644 --- a/test/integrations/destinations/freshsales/network.ts +++ b/test/integrations/destinations/freshsales/network.ts @@ -1,495 +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', + { + httpReq: { + url: 'https://domain-rudder.myfreshworks.com/crm/sales/api/sales_accounts/upsert', + method: 'POST' }, - }, - 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, + 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" + } }, - ], - 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 }, - }, - 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, + { + 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 + } + ] + } }, - ], - 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 }, - }, - 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, + { + 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 }, - }, - status: 200, }, - }, - { - httpReq: { - url: 'https://domain-rudder.myfreshworks.com/crm/sales/api/selector/lifecycle_stages', - method: 'GET', + { + 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 + }, }, - 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, + { + 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 index eca3b88d9d..e3e6a4176a 100644 --- a/test/integrations/destinations/freshsales/processor/data.ts +++ b/test/integrations/destinations/freshsales/processor/data.ts @@ -1,2688 +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, - }, - ], - }, - }, - }, -]; + { + "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 index 8548d337b3..12cbacf576 100644 --- a/test/integrations/destinations/freshsales/router/data.ts +++ b/test/integrations/destinations/freshsales/router/data.ts @@ -1,175 +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', + { + 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": {} + } ], - transformAt: 'processor', - transformAtV1: 'processor', - }, - ResponseRules: {}, - }, - Config: { - apiKey: 'hrkjfergeferf', - domain: 'rudderstack-479541159204968909.myfreshworks.com', + destType: 'freshsales', }, - Enabled: true, - Transformations: [], - IsProcessorEnabled: true, - RevisionID: '2E3xCLWeb83vOGDh0mkN4Auei3i', - }, - metadata: { userId: 'u1' }, + method: 'POST', }, - ], - 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: {}, + output: { + response: { + status: 200, 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: [{ userId: 'u1' }], - 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', + 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" + } + } ], - 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/ga/processor/data.ts b/test/integrations/destinations/ga/processor/data.ts index 43a222e025..aa468b5038 100644 --- a/test/integrations/destinations/ga/processor/data.ts +++ b/test/integrations/destinations/ga/processor/data.ts @@ -1,10034 +1,9979 @@ export const mockFns = (_) => { - // @ts-ignore - jest.useFakeTimers().setSystemTime(new Date('2023-09-29')); + // @ts-ignore + jest + .useFakeTimers() + .setSystemTime(new Date('2023-09-29')); }; export const data = [ - { - name: 'ga', - description: 'Test 0', - 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, - an: 'Test App name', - ul: 'Test ul', - }, - 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: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'name', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'name', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ea: 'action1', - ec: 'All', - ni: 1, - ul: 'Test ul', - an: 'Test App name', - cm1: 'test@rudderstack.com', - v: '1', - t: 'event', - tid: 'UA-165994240-1', - ds: 'web', - npa: 1, - aip: 1, - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - uid: '123456', - cid: '123456', - uip: '0.0.0.0', - qt: 124901802438, - }, - body: { - JSON: {}, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '123456', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - description: 'Test 1', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - channel: 'web', - context: { - traits: { - name: 'Rudder Test', - }, - app: { - build: '1.0.0', - name: 'RudderLabs JavaScript SDK', - namespace: 'com.rudderlabs.javascript', - version: '1.0.0', - }, - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.0.0', - }, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - locale: 'en-US', - ip: '0.0.0.0', - os: { - name: '', - version: '', - }, - screen: { - density: 2, - }, - }, - properties: { - plan: 'standard plan', - name: 'rudder test', - }, - type: 'identify', - messageId: '84e26acc-56a5-4835-8233-591137fca468', - originalTimestamp: '2019-10-14T11:15:18.299Z', - anonymousId: '00000000000000000000000000', - userId: '123456', - integrations: { - All: true, - }, - sentAt: '2019-10-14T09:03:22.563Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'name', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'name', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ea: 'action1', - ec: 'Rudder Test', - cd1: 'Rudder Test', - cg2: 'Rudder Test', - v: '1', - t: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - uid: '123456', - cid: '00000000000000000000000000', - ni: 1, - uip: '0.0.0.0', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - ul: 'en-US', - qt: 124893881701, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - 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: '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', - 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: 'q', - search: '', - title: 'a', - url: 'https://www.example.com/abc', - }, - integrations: { - All: true, - }, - name: 'ApplicationLoaded', - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - v: '1', - t: 'pageview', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - uip: '0.0.0.0', - ul: 'en-US', - dh: 'www.example.com', - dl: 'https://www.example.com/abc', - dp: '%2Fabc', - dr: 'q', - dt: 'a', - qt: 124893881701, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - 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', - }, - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'test track event GA3', - properties: { - category: 'test-category', - 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-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ec: 'test-category', - ni: 1, - v: '1', - el: 'event', - t: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - ea: 'test track event GA3', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - ul: 'en-US', - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - 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: { - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'order completed', - properties: { - order_id: 'rudderstackorder1', - total: 99.99, - shipping: 13.99, - tax: 20.99, - currency: 'INR', - products: [ - { - quantity: 1, - price: 24.75, - name: 'my product', - sku: 'p-298', - }, - { - quantity: 3, - price: 24.75, - name: 'other product', - sku: 'p-299', - }, - ], - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - pa: 'purchase', - tr: 99.99, - ev: 100, - pr1id: 'p-298', - pr1cd1: 'my product', - pr1nm: 'my product', - pr1pr: 24.75, - pr2id: 'p-299', - pr2cd1: 'other product', - pr2nm: 'other product', - pr2pr: 24.75, - ea: 'order completed', - ec: 'EnhancedEcommerce', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - ti: 'rudderstackorder1', - ts: 13.99, - tt: 20.99, - cu: 'INR', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - ni: 1, - pr1qt: 1, - pr2qt: 3, - ul: 'en-US', - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - 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: '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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'product added', - properties: { - currency: 'CAD', - quantity: 1, - price: 24.75, - name: 'my product 1', - category: 'cat 1', - sku: 'p-298', - testDimension: true, - testMetric: true, - position: 4.5, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ea: 'product added', - ec: 'cat 1', - pa: 'add', - pr1cd1: 'my product 1', - pr1id: 'p-298', - cd1: 'my product 1', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - pr1nm: 'my product 1', - pr1ca: 'cat 1', - cu: 'CAD', - pr1ps: 4.5, - pr1pr: 24.75, - pr1qt: 1, - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - ni: 1, - ul: 'en-US', - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - 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: '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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'product removed', - properties: { - currency: 'CAD', - quantity: 1, - price: 24.75, - name: 'my product 1', - category: 'cat 1', - sku: 'p-298', - testDimension: true, - testMetric: true, - position: 4.5, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ea: 'product removed', - ec: 'cat 1', - pa: 'remove', - pr1cd1: 'my product 1', - pr1id: 'p-298', - cd1: 'my product 1', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - pr1nm: 'my product 1', - pr1ca: 'cat 1', - cu: 'CAD', - pr1ps: 4.5, - pr1pr: 24.75, - pr1qt: 1, - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - ul: 'en-US', - ni: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - 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: '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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'product viewed', - properties: { - currency: 'CAD', - quantity: 1, - price: 24.75, - name: 'my product 1', - category: 'cat 1', - sku: 'p-298', - testDimension: true, - testMetric: true, - position: 4.5, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ea: 'product viewed', - ec: 'cat 1', - pa: 'detail', - pr1cd1: 'my product 1', - pr1id: 'p-298', - cd1: 'my product 1', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - pr1nm: 'my product 1', - pr1ca: 'cat 1', - cu: 'CAD', - pr1ps: 4.5, - pr1pr: 24.75, - pr1qt: 1, - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - ul: 'en-US', - ni: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - 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', - }, - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.0.0', - }, - userAgent: - 'Mozilla/5.0 (Macintosh; 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: '2019-10-14T11:15:18.299Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'product removed', - properties: { - currency: 'CAD', - quantity: 1, - price: 24.75, - name: 'my product 1', - category: 'cat 1', - sku: 'p-298', - testDimension: true, - testMetric: true, - position: 4.5, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ea: 'product removed', - ec: 'cat 1', - pa: 'remove', - pr1cd1: 'my product 1', - pr1id: 'p-298', - cd1: 'my product 1', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - pr1nm: 'my product 1', - pr1ca: 'cat 1', - cu: 'CAD', - pr1ps: 4.5, - pr1pr: 24.75, - pr1qt: 1, - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - ul: 'en-US', - ni: 1, - qt: 124893881701, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - 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', - }, - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.0.0', - }, - userAgent: - 'Mozilla/5.0 (Macintosh; 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'product viewed', - properties: { - currency: 'CAD', - quantity: 1, - price: 24.75, - name: 'my product 1', - category: 'cat 1', - sku: 'p-298', - testDimension: true, - testMetric: true, - position: 4.5, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ea: 'product viewed', - ec: 'cat 1', - pa: 'detail', - pr1cd1: 'my product 1', - pr1id: 'p-298', - cd1: 'my product 1', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - pr1nm: 'my product 1', - pr1ca: 'cat 1', - cu: 'CAD', - pr1ps: 4.5, - pr1pr: 24.75, - pr1qt: 1, - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - ul: 'en-US', - ni: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - 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', - }, - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.0.0', - }, - userAgent: - 'Mozilla/5.0 (Macintosh; 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'product list filtered', - properties: { - category: 'cat 1', - list_id: '1234', - filters: [ - { - type: 'department', - value: 'beauty', - }, - { - type: 'price', - value: 'under', - }, - ], - sorts: [ - { - type: 'price', - value: 'desc', - }, - ], - products: [ - { - product_id: '507f1f77bcf86cd799439011', - productDimension: 'My Product Dimension', - productMetric: 'My Product Metric', - }, - ], - testDimension: true, - testMetric: true, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ea: 'product list filtered', - ec: 'cat 1', - pa: 'detail', - il1pi1id: '507f1f77bcf86cd799439011', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - il1nm: '1234', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - cid: '00000000000000000000000000', - uid: '12345', - il1pi1qt: 1, - il1pi1va: 'department:beauty,price:under::price:desc', - ul: 'en-US', - ni: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - 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: { - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'product list viewed', - properties: { - category: 'cat 1', - list_id: '1234', - filters: [ - { - type: 'department', - value: 'beauty', - }, - { - type: 'price', - value: 'under', - }, - ], - sorts: [ - { - type: 'price', - value: 'desc', - }, - ], - products: [ - { - product_id: '507f1f77bcf86cd799439011', - productDimension: 'My Product Dimension', - productMetric: 'My Product Metric', - position: 10, - }, - { - product_id: '507f1f77bcf86cdef799439011', - productDimension: 'My Product Dimension1', - productMetric: 'My Product Metric1', - position: -10, - }, - ], - testDimension: true, - testMetric: true, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ea: 'product list viewed', - ec: 'cat 1', - pa: 'detail', - il1pi1id: '507f1f77bcf86cd799439011', - il1pi1ps: 10, - il1pi2id: '507f1f77bcf86cdef799439011', - il1pi2ps: -10, - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - il1nm: '1234', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - cid: '00000000000000000000000000', - uid: '12345', - il1pi1qt: 1, - il1pi1va: 'department:beauty,price:under::price:desc', - il1pi2qt: 1, - il1pi2va: 'department:beauty,price:under::price:desc', - ul: 'en-US', - ni: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - 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', - }, - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'product clicked', - properties: { - currency: 'CAD', - quantity: 1, - price: 24.75, - name: 'my product', - category: 'cat 1', - sku: 'p-298', - list: 'search results', - testDimension: true, - testMetric: true, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ea: 'product clicked', - ec: 'cat 1', - pa: 'click', - pr1cd1: 'my product', - pr1id: 'p-298', - cd1: 'my product', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - pr1nm: 'my product', - pr1ca: 'cat 1', - cu: 'CAD', - pr1pr: 24.75, - pr1qt: 1, - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - pal: 'search results', - ul: 'en-US', - ni: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - description: 'Test 13', - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'promotion viewed', - properties: { - currency: 'CAD', - promotion_id: 'PROMO_1234', - name: 'my product', - creative: 'summer_banner2', - position: 'banner_slot1', - testDimension: true, - testMetric: true, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ea: 'promotion viewed', - ec: 'EnhancedEcommerce', - cu: 'CAD', - promoa: 'view', - pa: 'view', - cd1: 'my product', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - promo1id: 'PROMO_1234', - promo1cr: 'summer_banner2', - promo1ps: 'banner_slot1', - promo1nm: 'my product', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - ul: 'en-US', - ni: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - 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: { - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'promotion clicked', - properties: { - currency: 'CAD', - promotion_id: 'PROMO_1234', - name: 'my product', - creative: 'summer_banner2', - position: 'banner_slot1', - testDimension: true, - testMetric: true, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ea: 'promotion clicked', - ec: 'EnhancedEcommerce', - cu: 'CAD', - promoa: 'promo_click', - pa: 'promo_click', - cd1: 'my product', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - promo1id: 'PROMO_1234', - promo1cr: 'summer_banner2', - promo1ps: 'banner_slot1', - promo1nm: 'my product', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - ul: 'en-US', - ni: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - description: 'Test 15', - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'checkout started', - properties: { - currency: 'CAD', - products: [ - { - quantity: 1, - price: 24.75, - name: 'my product', - sku: 'p-298', - }, - { - quantity: 1, - price: 24.75, - name: 'my product 2', - sku: 'p-299', - }, - ], - step: 1, - paymentMethod: 'Visa', - testDimension: true, - testMetric: true, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - pa: 'checkout', - pr1id: 'p-298', - pr1cd1: 'my product', - pr1nm: 'my product', - pr1pr: 24.75, - pr2id: 'p-299', - pr2cd1: 'my product 2', - pr2nm: 'my product 2', - pr2pr: 24.75, - ea: 'checkout started', - ec: 'EnhancedEcommerce', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - cu: 'CAD', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - cos: 1, - pr1qt: 1, - pr2qt: 1, - ul: 'en-US', - ni: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - 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.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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'order updated', - properties: { - currency: 'CAD', - products: [ - { - quantity: 1, - price: 24.75, - name: 'my product', - sku: 'p-298', - }, - { - quantity: 1, - price: 24.75, - name: 'my product 2', - sku: 'p-299', - }, - ], - step: 1, - paymentMethod: 'Visa', - testDimension: true, - testMetric: true, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - pa: 'checkout', - pr1id: 'p-298', - pr1cd1: 'my product', - pr1nm: 'my product', - pr1pr: 24.75, - pr2id: 'p-299', - pr2cd1: 'my product 2', - pr2nm: 'my product 2', - pr2pr: 24.75, - ea: 'order updated', - ec: 'EnhancedEcommerce', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - cu: 'CAD', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - cos: 1, - pr1qt: 1, - pr2qt: 1, - ul: 'en-US', - ni: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - 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.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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'checkout step viewed', - properties: { - currency: 'CAD', - step: 1, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - pa: 'checkout', - ea: 'checkout step viewed', - ec: 'EnhancedEcommerce', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - cos: 1, - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - ul: 'en-US', - ni: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - description: 'Test 18', - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'checkout step completed', - properties: { - currency: 'CAD', - step: 1, - paymentMethod: 'Visa', - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - pa: 'checkout_option', - ea: 'checkout step completed', - ec: 'EnhancedEcommerce', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - cos: 1, - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - ul: 'en-US', - ni: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - 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.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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'order refunded', - properties: { - products: [ - { - quantity: 1, - sku: 'p-298', - }, - { - quantity: 1, - sku: 'p-299', - }, - ], - testDimension: true, - testMetric: true, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ni: 1, - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - ea: 'order refunded', - ec: 'EnhancedEcommerce', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - pa: 'refund', - pr1id: 'p-298', - pr1qt: 1, - pr2id: 'p-299', - ul: 'en-US', - pr2qt: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - 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.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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'order starterefundedd', - properties: { - products: [ - { - quantity: 1, - sku: 'p-298', - }, - { - quantity: 1, - sku: 'p-299', - }, - ], - testDimension: true, - testMetric: true, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ul: 'en-US', - ec: 'All', - ni: 1, - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - ea: 'order starterefundedd', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - description: 'Test 21', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - channel: 'web', - context: { - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'order starterefundedd', - properties: { - products: [ - { - quantity: 1, - sku: 'p-298', - }, - { - quantity: 1, - sku: 'p-299', - }, - ], - testDimension: true, - testMetric: true, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ul: 'en-US', - ec: 'All', - ni: 1, - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - ea: 'order starterefundedd', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - description: 'Test 22', - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'order starterefundedd', - properties: { - products: [ - { - quantity: 1, - sku: 'p-298', - }, - { - quantity: 1, - sku: 'p-299', - }, - ], - testDimension: true, - testMetric: true, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ul: 'en-US', - ec: 'All', - ni: 1, - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - aip: 1, - cid: '00000000000000000000000000', - ea: 'order starterefundedd', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - description: 'Test 23', - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'order starterefundedd', - properties: { - products: [ - { - quantity: 1, - sku: 'p-298', - }, - { - quantity: 1, - sku: 'p-299', - }, - ], - testDimension: true, - testMetric: true, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ul: 'en-US', - ec: 'All', - ni: 1, - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - cid: '00000000000000000000000000', - ea: 'order starterefundedd', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - description: 'Test 24', - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'order starterefundedd', - properties: { - products: [ - { - quantity: 1, - sku: 'p-298', - }, - { - quantity: 1, - sku: 'p-299', - }, - ], - testDimension: true, - testMetric: true, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ul: 'en-US', - ec: 'All', - ni: 1, - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - ea: 'order starterefundedd', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - description: 'Test 25', - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'linkid test', - properties: { - linkid: 'abc123', - testDimension: true, - testMetric: true, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ul: 'en-US', - ec: 'All', - ni: 1, - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - linkid: 'abc123', - cid: '00000000000000000000000000', - ea: 'linkid test', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - description: 'Test 26', - 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, - }, - campaign: { - name: 'sampleName', - source: 'sampleSource', - medium: 'sampleMedium', - content: 'sampleContent', - term: 'sampleTerm', - }, - }, - type: 'track', - messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', - originalTimestamp: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'campaign test', - properties: { - testDimension: true, - testMetric: true, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ul: 'en-US', - ec: 'All', - ni: 1, - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - cn: 'sampleName', - cs: 'sampleSource', - cm: 'sampleMedium', - cc: 'sampleContent', - ck: 'sampleTerm', - cid: '00000000000000000000000000', - ea: 'campaign test', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - description: 'Test 27', - 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, - }, - campaign: { - name: 'sampleName', - source: 'sampleSource', - medium: 'sampleMedium', - content: 'sampleContent', - term: 'sampleTerm', - }, - }, - type: 'track', - messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', - originalTimestamp: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - event: 'campaign test', - properties: { - testDimension: true, - testMetric: true, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ul: 'en-US', - ec: 'All', - ni: 1, - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - cn: 'sampleName', - cs: 'sampleSource', - cm: 'sampleMedium', - cc: 'sampleContent', - ck: 'sampleTerm', - cid: '00000000000000000000000000', - ea: 'campaign test', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - description: 'Test 28', - 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, - }, - campaign: { - name: 'sampleName', - source: 'sampleSource', - medium: 'sampleMedium', - content: 'sampleContent', - term: 'sampleTerm', - }, - }, - type: 'track', - messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', - originalTimestamp: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - event: 'campaign test', - properties: { - testDimension: true, - testMetric: true, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ul: 'en-US', - ec: 'All', - ni: 1, - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - cn: 'sampleName', - cs: 'sampleSource', - cm: 'sampleMedium', - cc: 'sampleContent', - ck: 'sampleTerm', - cid: '00000000000000000000000000', - ea: 'campaign test', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - description: 'Test 29', - 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.2', - }, - traits: { - abc: '1234', - }, - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.1.2', - }, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36', - locale: 'en-GB', - os: { - name: '', - version: '', - }, - screen: { - density: 2, - }, - page: { - path: '/tests/html/ecomm_test.html', - referrer: 'http://0.0.0.0:1112/tests/html/', - search: '', - title: 'GA Ecommerce Test', - url: 'http://0.0.0.0:1112/tests/html/ecomm_test.html', - }, - }, - type: 'identify', - messageId: 'bc8a6af8-37fd-46a9-9592-ea29a256435f', - originalTimestamp: '2020-06-22T11:30:32.493Z', - anonymousId: '38e169a1-3234-46f7-9ceb-c1a6a69005fe', - userId: '123', - integrations: { - All: true, - }, - sentAt: '2020-06-22T11:30:32.494Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ea: 'User Enriched', - dt: 'GA Ecommerce Test', - ec: 'All', - v: '1', - t: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.1.2', - aiid: 'com.rudderlabs.javascript', - npa: 1, - uid: '123', - cid: '38e169a1-3234-46f7-9ceb-c1a6a69005fe', - ni: 1, - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36', - ul: 'en-GB', - qt: 103120167507, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '38e169a1-3234-46f7-9ceb-c1a6a69005fe', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - description: 'Test 30', - 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', - 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', - integrations: { - All: true, - }, - name: 'ApplicationLoaded', - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - v: '1', - t: 'pageview', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - ul: 'en-US', - uip: '0.0.0.0', - qt: 124893881701, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - description: 'Test 31', - 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', - 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: '?xyz=1', - title: '', - url: 'https://www.example.com/abc', - }, - integrations: { - All: true, - }, - name: 'ApplicationLoaded', - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - v: '1', - t: 'pageview', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - ul: 'en-US', - uip: '0.0.0.0', - dh: 'www.example.com', - dl: 'https://www.example.com/abc', - dp: '%2Fabc%3Fxyz%3D1', - qt: 124893881701, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - description: 'Test 32', - 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', - ip: '0.0.0.0', - os: { - name: '', - version: '', - }, - screen: { - density: 2, - }, - }, - type: 'track', - messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', - originalTimestamp: '2019-10-14T11:15:18.299Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - integrations: { - All: true, - }, - event: 'sample event', - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ec: 'All', - ni: 1, - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - ea: 'sample event', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - ul: 'en-US', - uip: '0.0.0.0', - qt: 124893881701, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - description: 'Test 33', - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'Order Refunded', - properties: { - order_id: 'rudderstackorder1', - total: 99.99, - shipping: 13.99, - tax: 20.99, - currency: 'INR', - products: [ - { - quantity: 1, - price: 24.75, - name: 'my product', - sku: 'p-298', - }, - { - quantity: 3, - price: 24.75, - name: 'other product', - sku: 'p-299', - }, - ], - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - pa: 'refund', - ev: 100, - pr1id: 'p-298', - pr1cd1: 'my product', - pr1nm: 'my product', - pr1pr: 24.75, - pr1qt: 1, - pr2id: 'p-299', - pr2cd1: 'other product', - pr2nm: 'other product', - pr2pr: 24.75, - pr2qt: 3, - ea: 'Order Refunded', - ec: 'EnhancedEcommerce', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - cid: '00000000000000000000000000', - ti: 'rudderstackorder1', - uid: '12345', - ul: 'en-US', - ni: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - description: 'Test 34', - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'Order Refunded', - properties: { - order_id: 'rudderstackorder1', - total: 99.99, - shipping: 13.99, - tax: 20.99, - currency: 'INR', - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ev: 100, - pa: 'refund', - ti: 'rudderstackorder1', - ea: 'Order Refunded', - ec: 'EnhancedEcommerce', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - cid: '00000000000000000000000000', - uid: '12345', - ul: 'en-US', - ni: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - description: 'Test 35', - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'Order Refunded', - properties: { - order_id: 'rudderstackorder1', - total: 99.99, - shipping: 13.99, - tax: 20.99, - currency: 'INR', - products: [], - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ev: 100, - pa: 'refund', - ti: 'rudderstackorder1', - ea: 'Order Refunded', - ec: 'EnhancedEcommerce', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - cid: '00000000000000000000000000', - uid: '12345', - ul: 'en-US', - ni: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - description: 'Test 36', - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'Order Refunded', - properties: { - order_id: 'rudderstackorder1', - total: 99.99, - shipping: 13.99, - tax: 20.99, - currency: 'INR', - products: [ - { - quantity: 1, - price: 24.75, - name: 'my product', - sku: 'p-298', - product_id: '1', - }, - { - quantity: 3, - price: 24.75, - name: 'other product', - sku: 'p-299', - product_id: '2', - }, - ], - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ev: 100, - pa: 'refund', - pr1id: '1', - pr1cd1: 'my product', - pr1nm: 'my product', - pr1pr: 24.75, - pr1qt: 1, - pr2id: '2', - pr2cd1: 'other product', - pr2nm: 'other product', - pr2pr: 24.75, - pr2qt: 3, - ea: 'Order Refunded', - ec: 'EnhancedEcommerce', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - cid: '00000000000000000000000000', - ti: 'rudderstackorder1', - uid: '12345', - ul: 'en-US', - ni: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - description: 'Test 37', - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'Cart Shared', - properties: { - order_id: 'rudderstackorder1', - total: 99.99, - shipping: 13.99, - tax: 20.99, - currency: 'INR', - products: [ - { - quantity: 1, - price: 24.75, - name: 'my product', - sku: 'p-298', - product_id: '1', - }, - { - quantity: 3, - price: 24.75, - name: 'other product', - sku: 'p-299', - product_id: '2', - }, - ], - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ev: 100, - ea: 'Cart Shared', - ec: 'All', - ni: 1, - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - st: ' 1 2', - ul: 'en-US', - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - description: 'Test 38', - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'Product Shared', - properties: { - product_id: 'rudderstackorder1', - total: 99.99, - shipping: 13.99, - tax: 20.99, - currency: 'INR', - url: 'https://www.example.com/abc', - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ev: 100, - ea: 'Product Shared', - ec: 'All', - ni: 1, - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - st: 'https://www.example.com/abc', - dh: 'www.example.com', - dl: 'https://www.example.com/abc', - dp: '%2Fabc', - ul: 'en-US', - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - description: 'Test 39', - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'Product List Clicked', - properties: { - list_id: 'Sample Product List', - category: 'Sample Product List', - products: [ - { - quantity: 1, - price: 24.75, - name: 'my product', - sku: 'p-298', - product_id: '1', - }, - { - quantity: 3, - price: 24.75, - name: 'other product', - sku: 'p-299', - product_id: '2', - }, - ], - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ea: 'Product List Clicked', - ec: 'Sample Product List', - pa: 'click', - il1pi1id: '1', - pr1cd1: 'my product', - il1pi1nm: 'my product', - il1pi1pr: 24.75, - il1pi2id: '2', - pr2cd1: 'other product', - il1pi2nm: 'other product', - il1pi2pr: 24.75, - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - il1nm: 'Sample Product List', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - cid: '00000000000000000000000000', - uid: '12345', - ni: 1, - il1pi2qt: 3, - il1pi1qt: 1, - ul: 'en-US', - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - description: 'Test 40', - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'Product List Clicked', - properties: { - list_id: 'Sample Product List', - category: 'Sample Product List', - products: [ - { - quantity: 1, - price: 24.75, - name: 'my product', - sku: 'p-298', - }, - { - quantity: 3, - price: 24.75, - name: 'other product', - sku: 'p-299', - }, - ], - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ea: 'Product List Clicked', - ec: 'Sample Product List', - pa: 'click', - il1pi1id: 'p-298', - pr1cd1: 'my product', - il1pi1nm: 'my product', - il1pi1pr: 24.75, - il1pi2id: 'p-299', - pr2cd1: 'other product', - il1pi2nm: 'other product', - il1pi2pr: 24.75, - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - il1nm: 'Sample Product List', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - cid: '00000000000000000000000000', - uid: '12345', - ul: 'en-US', - il1pi2qt: 3, - il1pi1qt: 1, - ni: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - description: 'Test 41', - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'Product List Clicked', - properties: { - list_id: 'Sample Product List', - category: 'Sample Product List', - products: [], - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ni: 1, - ea: 'Product List Clicked', - ec: 'Sample Product List', - pa: 'click', - el: 'event', - v: '1', - t: 'event', - tid: 'UA-165994240-1', - ds: 'web', - npa: 1, - aip: 1, - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - ul: 'en-US', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - il1nm: 'Sample Product List', - uid: '12345', - cid: '00000000000000000000000000', - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - 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', - }, - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'Order Cancelled', - properties: { - order_id: 'rudderstackorder1', - total: 99.99, - shipping: 13.99, - tax: 20.99, - currency: 'INR', - products: [ - { - quantity: 1, - price: 24.75, - name: 'my product', - sku: 'p-298', - product_id: '1', - }, - { - quantity: 3, - price: 24.75, - name: 'other product', - sku: 'p-299', - product_id: '2', - }, - ], - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - pa: 'refund', - ev: 100, - tr: 99.99, - pr1id: '1', - pr1cd1: 'my product', - pr1nm: 'my product', - pr1pr: 24.75, - pr2id: '2', - pr2cd1: 'other product', - pr2nm: 'other product', - pr2pr: 24.75, - ea: 'Order Cancelled', - ec: 'EnhancedEcommerce', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - ti: 'rudderstackorder1', - ts: 13.99, - tt: 20.99, - cu: 'INR', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - ul: 'en-US', - pr1qt: 1, - pr2qt: 3, - ni: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - 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: '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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'Order Cancelled', - properties: { - order_id: 'rudderstackorder1', - value: 99.99, - shipping: 13.99, - tax: 20.99, - currency: 'INR', - products: [ - { - quantity: 1, - price: 24.75, - name: 'my product', - sku: 'p-298', - product_id: '1', - }, - { - quantity: 3, - price: 24.75, - name: 'other product', - sku: 'p-299', - product_id: '2', - }, - ], - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - pa: 'refund', - tr: 99.99, - pr1id: '1', - pr1cd1: 'my product', - pr1nm: 'my product', - pr1pr: 24.75, - pr2id: '2', - pr2cd1: 'other product', - pr2nm: 'other product', - pr2pr: 24.75, - ea: 'Order Cancelled', - ev: 100, - ec: 'EnhancedEcommerce', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - ti: 'rudderstackorder1', - ts: 13.99, - tt: 20.99, - cu: 'INR', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - ul: 'en-US', - pr1qt: 1, - pr2qt: 3, - ni: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - 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: '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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'Order Cancelled', - properties: { - order_id: 'rudderstackorder1', - revenue: 99.99, - shipping: 13.99, - tax: 20.99, - currency: 'INR', - products: [ - { - quantity: 1, - price: 24.75, - name: 'my product', - sku: 'p-298', - product_id: '1', - }, - { - quantity: 3, - price: 24.75, - name: 'other product', - sku: 'p-299', - product_id: '2', - }, - ], - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - pa: 'refund', - tr: 99.99, - pr1id: '1', - pr1cd1: 'my product', - pr1nm: 'my product', - pr1pr: 24.75, - pr2id: '2', - pr2cd1: 'other product', - pr2nm: 'other product', - pr2pr: 24.75, - ea: 'Order Cancelled', - ev: 100, - ec: 'EnhancedEcommerce', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - ti: 'rudderstackorder1', - ts: 13.99, - tt: 20.99, - cu: 'INR', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - ul: 'en-US', - pr1qt: 1, - pr2qt: 3, - ni: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - 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: '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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'Order Cancelled', - properties: { - order_id: 'rudderstackorder1', - revenue: 99.99, - shipping: 13.99, - tax: 20.99, - currency: 'INR', - products: [], - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - error: 'No product information supplied for transaction event', - statTags: { - destType: 'GA', - errorCategory: 'dataValidation', - errorType: 'instrumentation', - feature: 'processor', - implementation: 'native', - module: 'destination', - }, - statusCode: 400, - }, - ], - }, - }, - }, - { - name: 'ga', - description: 'Test 46', - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'Cart Viewed', - properties: { - order_id: 'rudderstackorder1', - revenue: 99.99, - shipping: 13.99, - tax: 20.99, - currency: 'INR', - products: [ - { - quantity: 1, - price: 24.75, - name: 'my product', - sku: 'p-298', - product_id: '1', - }, - { - quantity: 3, - price: 24.75, - name: 'other product', - sku: 'p-299', - product_id: '2', - }, - ], - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ea: 'Cart Viewed', - ev: 100, - ec: 'EnhancedEcommerce', - pa: 'detail', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - cid: '00000000000000000000000000', - uid: '12345', - ul: 'en-US', - ni: 1, - pr1cd1: 'my product', - pr1id: '1', - pr1nm: 'my product', - pr1pr: 24.75, - pr1qt: 1, - pr2cd1: 'other product', - pr2id: '2', - pr2nm: 'other product', - pr2pr: 24.75, - pr2qt: 3, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - description: 'Test 47', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - channel: 'web', - context: { - traits: { - name1: 'Test', - }, - app: { - build: '1.0.0', - name: 'RudderLabs JavaScript SDK', - namespace: 'com.rudderlabs.javascript', - version: '1.0.0', - }, - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.0.0', - }, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - locale: 'en-US', - ip: '0.0.0.0', - os: { - name: '', - version: '', - }, - screen: { - density: 2, - }, - }, - properties: { - plan: 'standard plan', - name: 'rudder test', - }, - type: 'identify', - messageId: '84e26acc-56a5-4835-8233-591137fca468', - originalTimestamp: '2019-10-14T09:03:17.562Z', - anonymousId: '00000000000000000000000000', - userId: '123456', - integrations: { - All: true, - }, - traits: { - name1: 'Test', - }, - sentAt: '2019-10-14T09:03:22.563Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - serverSideIdentifyEventCategory: 'name', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - error: 'server side identify is not on', - statTags: { - destType: 'GA', - errorCategory: 'dataValidation', - errorType: 'configuration', - feature: 'processor', - implementation: 'native', - module: 'destination', - }, - statusCode: 400, - }, - ], - }, - }, - }, - { - name: 'ga', - 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', - ip: '0.0.0.0', - os: { - name: '', - version: '', - }, - screen: { - density: 2, - }, - }, - type: 'screen', - messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', - originalTimestamp: '2019-10-14T11:15:18.299Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - properties: { - name: 'homescreen', - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - cd1: 'homescreen', - v: '1', - t: 'screenview', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - cd: 'homescreen', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - ul: 'en-US', - uip: '0.0.0.0', - qt: 124893881701, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - description: 'Test 49', - 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', - ip: '0.0.0.0', - os: { - name: '', - version: '', - }, - screen: { - density: 2, - }, - }, - type: 'newtype', - messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', - originalTimestamp: '2019-10-14T11:15:18.299Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - properties: { - name: 'homescreen', - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - error: 'Message type newtype not supported', - statTags: { - destType: 'GA', - errorCategory: 'dataValidation', - errorType: 'instrumentation', - feature: 'processor', - implementation: 'native', - module: 'destination', - }, - statusCode: 400, - }, - ], - }, - }, - }, - { - name: 'ga', - description: 'Test 50', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - channel: 'web', - context: { - traits: { - name: 'Test', - }, - app: { - build: '1.0.0', - name: 'RudderLabs JavaScript SDK', - namespace: 'com.rudderlabs.javascript', - version: '1.0.0', - }, - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.0.0', - }, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - locale: 'en-US', - ip: '0.0.0.0', - os: { - name: '', - version: '', - }, - screen: { - density: 2, - }, - }, - properties: { - plan: 'standard plan', - name: 'rudder test', - }, - type: 'identify', - messageId: '84e26acc-56a5-4835-8233-591137fca468', - originalTimestamp: '2019-10-14T09:03:17.562Z', - userId: '12345', - integrations: { - All: true, - }, - sentAt: '2019-10-14T09:03:22.563Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'name', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - userId: '12345', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ea: 'action1', - ec: 'Test', - ni: 1, - cd1: 'Test', - v: '1', - t: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - ul: 'en-US', - uid: '12345', - cid: '827ccb0eea8a706c4c34a16891f84e7b', - uip: '0.0.0.0', - qt: 124901802438, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - description: 'Test 51', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - channel: 'web', - context: { - traits: { - name: 'Test', - }, - app: { - build: '1.0.0', - name: 'RudderLabs JavaScript SDK', - namespace: 'com.rudderlabs.javascript', - version: '1.0.0', - }, - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.0.0', - }, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - locale: 'en-US', - ip: '0.0.0.0', - os: { - name: '', - version: '', - }, - screen: { - density: 2, - }, - }, - properties: { - plan: 'standard plan', - name: 'rudder test', - }, - type: 'identify', - messageId: '84e26acc-56a5-4835-8233-591137fca468', - originalTimestamp: '2019-10-14T09:03:17.562Z', - userId: '12345', - integrations: { - All: true, - }, - sentAt: '2019-10-14T09:03:22.563Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'name', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - disableMd5: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - userId: '12345', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ea: 'action1', - ec: 'Test', - ni: 1, - cd1: 'Test', - v: '1', - t: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - ul: 'en-US', - uid: '12345', - uip: '0.0.0.0', - qt: 124901802438, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - description: 'Test 52', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - channel: 'web', - context: { - traits: { - name: 'Test', - }, - app: { - build: '1.0.0', - name: 'RudderLabs JavaScript SDK', - namespace: 'com.rudderlabs.javascript', - version: '1.0.0', - }, - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.0.0', - }, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - locale: 'en-US', - ip: '0.0.0.0', - os: { - name: '', - version: '', - }, - screen: { - density: 2, - }, - }, - properties: { - plan: 'standard plan', - name: 'rudder test', - }, - type: 'identify', - messageId: '84e26acc-56a5-4835-8233-591137fca468', - originalTimestamp: '2019-10-14T09:03:17.562Z', - userId: '12345', - integrations: { - All: true, - GA: { - clientId: 'clientId', - }, - 'Google Analytics': { - clientId: 'clientId', - }, - }, - sentAt: '2019-10-14T09:03:22.563Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'name', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - userId: '12345', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ea: 'action1', - ec: 'Test', - ni: 1, - cd1: 'Test', - v: '1', - t: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - ul: 'en-US', - uid: '12345', - cid: 'clientId', - uip: '0.0.0.0', - qt: 124901802438, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - description: 'Test 53', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - channel: 'web', - context: { - externalId: [ - { - id: 'externalClientId', - type: 'gaExternalId', - }, - ], - traits: { - name: 'Test', - }, - app: { - build: '1.0.0', - name: 'RudderLabs JavaScript SDK', - namespace: 'com.rudderlabs.javascript', - version: '1.0.0', - }, - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.0.0', - }, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - locale: 'en-US', - ip: '0.0.0.0', - os: { - name: '', - version: '', - }, - screen: { - density: 2, - }, - }, - properties: { - plan: 'standard plan', - name: 'rudder test', - }, - type: 'identify', - messageId: '84e26acc-56a5-4835-8233-591137fca468', - originalTimestamp: '2019-10-14T09:03:17.562Z', - userId: '12345', - integrations: { - All: true, - }, - sentAt: '2019-10-14T09:03:22.563Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'name', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - userId: '12345', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ea: 'action1', - ec: 'Test', - ni: 1, - cd1: 'Test', - v: '1', - t: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - ul: 'en-US', - uid: '12345', - cid: 'externalClientId', - uip: '0.0.0.0', - qt: 124901802438, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - 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.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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'product list viewed', - properties: { - nonInteraction: 0, - category: 'cat 1', - list_id: '1234', - filters: { - a: 'department', - b: 'beauty', - }, - sorts: [ - { - type: 'price', - value: 'desc', - }, - ], - products: [ - { - product_id: '507f1f77bcf86cd799439011', - productDimension: 'My Product Dimension', - productMetric: 'My Product Metric', - position: 10, - }, - { - product_id: '507f1f77bcf86cdef799439011', - productDimension: 'My Product Dimension1', - productMetric: 'My Product Metric1', - position: -10, - }, - ], - testDimension: true, - testMetric: true, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'content1', - }, - { - from: 'prop2', - to: 'content2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ni: 0, - ea: 'product list viewed', - ec: 'cat 1', - pa: 'detail', - il1pi1id: '507f1f77bcf86cd799439011', - il1pi1va: '::price:desc', - il1pi1ps: 10, - il1pi1qt: 1, - il1pi2id: '507f1f77bcf86cdef799439011', - il1pi2va: '::price:desc', - il1pi2ps: -10, - il1pi2qt: 1, - el: 'event', - v: '1', - t: 'event', - tid: 'UA-165994240-1', - ds: 'web', - npa: 1, - aip: 1, - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - ul: 'en-US', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - il1nm: '1234', - uid: '12345', - cid: '00000000000000000000000000', - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga', - 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.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', - 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: { - referrer: - 'https://google.com/answer/7554821?zippy=%2Cfields-in-event-snippets-for-counter-tags%2Cstep-add-the-global-snippet-to-every-page-of-your-site%2Cstep-add-the-event-snippet-to-pages-with-events-youre-tracking%2Cfields-in-the-global-snippet%2Cfields-in-the-event-snippet---overview%2Cfields-in-all-event-snippets%2Cexample-event-snippet-for-counter---standard-activities%2Cexample-event-snippet-for-counter---unique-activities%2Cexample-event-snippet-for-counter---per-session-activities%2Cfields-in-event-snippets-for-sales-tags%2Cexample-event-snippet-for-sales---transaction-activities%2Cexample-event-snippet-for-sales---items-sold-activities%2Ccustom-fields%2Cnoscript-section-of-event-snippets%2Cdo-i-need-to-set-up-cache-busting-with-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cstep-add-the-event-snippet-to-pages-with-events-youre-tracking%2Cfields-in-the-global-snippet%2Cfields-in-the-event-snippet---overview%2Cfields-in-all-event-snippets%2Cexample-event-snippet-for-counter---standard-activities%2Cexample-event-snippet-for-counter---unique-activities%2Cexample-event-snippet-for-counter---per-session-activities%2Cfields-in-event-snippets-for-sales-tags%2Cexample-event-snippet-for-sales---transaction-activities%2Cexample-event-snippet-for-sales---items-sold-activities%2Ccustom-fields%2Cnoscript-section-of-event-snippets%2Cdo-i-need-to-set-up-cache-busting-with-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cstep-add-the-event-snippet-to-pages-with-events-youre-tracking%2Cfields-in-the-global-snippet%2Cfields-in-the-event-snippet---overview%2Cfields-in-all-event-snippets%2Cexample-event-snippet-for-counter---standard-activities%2Cexample-event-snippet-for-counter---unique-activities%2Cexample-event-snippet-for-counter---per-session-activities%2Cfields-in-event-snippets-for-sales-tags%2Cexample-event-snippet-for-sales---transaction-activities%2Cexample-event-snippet-for-sales---items-sold-activities%2Ccustom-fields%2Cnoscript-section-of-event-snippets%2Cdo-i-need-to-set-up-cache-busting-with-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-tg%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learns-more-about-the-global-site-tag%2Cwhy-is-the-globalthe-head-when-iframe-and-image-tags-were-placed-in-the-body-placed-of-my-site%2Cwhere-can-i-learn-g2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-and-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-n-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag', - search: '', - title: 'a', - url: 'https://support.google.com/campaignmanager/answer/7554821?zippy=%2Cfields-in-event-snippets-for-counter-tags%2Cstep-add-the-global-snippet-to-every-page-of-your-site%2Cstep-add-the-event-snippet-to-pages-with-events-youre-tracking%2Cfields-in-the-global-snippet%2Cfields-in-the-event-snippet---overview%2Cfields-in-all-event-snippets%2Cexample-event-snippet-for-counter---standard-activities%2Cexample-event-snippet-for-counter---unique-activities%2Cexample-event-snippet-for-counter---per-session-activities%2Cfields-in-event-snippets-for-sales-tags%2Cexample-event-snippet-for-sales---transaction-activities%2Cexample-event-snippet-for-sales---items-sold-activities%2Ccustom-fields%2Cnoscript-section-of-event-snippets%2Cdo-i-need-to-set-up-cache-busting-with-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cstep-add-the-event-snippet-to-pages-with-events-youre-tracking%2Cfields-in-the-global-snippet%2Cfields-in-the-event-snippet---overview%2Cfields-in-all-event-snippets%2Cexample-event-snippet-for-counter---standard-activities%2Cexample-event-snippet-for-counter---unique-activities%2Cexample-event-snippet-for-counter---per-session-activities%2Cfields-in-event-snippets-for-sales-tags%2Cexample-event-snippet-for-sales---transaction-activities%2Cexample-event-snippet-for-sales---items-sold-activities%2Ccustom-fields%2Cnoscript-section-of-event-snippets%2Cdo-i-need-to-set-up-cache-busting-with-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cstep-add-the-event-snippet-to-pages-with-events-youre-tracking%2Cfields-in-the-global-snippet%2Cfields-in-the-event-snippet---overview%2Cfields-in-all-event-snippets%2Cexample-event-snippet-for-counter---standard-activities%2Cexample-event-snippet-for-counter---unique-activities%2Cexample-event-snippet-for-counter---per-session-activities%2Cfields-in-event-snippets-for-sales-tags%2Cexample-event-snippet-for-sales---transaction-activities%2Cexample-event-snippet-for-sales---items-sold-activities%2Ccustom-fields%2Cnoscript-section-of-event-snippets%2Cdo-i-need-to-set-up-cache-busting-with-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-lakjsdlkfjalsdkfjis-the-global-site-tag-placed-in-the-head-lakjsdlkfjalsdkfjis-the-global-site-tag-placed-in-the-head-lakjsdlkfjalsdkfjakljshdlfkjahsldkfjahlskdfjhaklsjdfhalksjdhflakjshdflakjsdhfklasjhdflaksjhdflaksjdfhlakjshdflakjsdhfklasjhdflaksjhdflaksjdfhlakjshdflakjsdhfklasjhdflaksjhdflaksjdfhljkkwoipqpweoirpoqiwerpoqi1111111111111', - }, - integrations: { - All: true, - }, - name: 'ApplicationLoaded', - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - anonymizeIp: false, - eventDeliveryTS: 1657516676962, - eventFilteringOption: 'disable', - trackingID: 'UA-165994240-1', - }, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - dp: '%2Fcampaignmanager%2Fanswer%2F7554821', - dl: 'https://support.google.com/campaignmanager/answer/7554821?zippy=%2Cfields-in-event-snippets-for-counter-tags%2Cstep-add-the-global-snippet-to-every-page-of-your-site%2Cstep-add-the-event-snippet-to-pages-with-events-youre-tracking%2Cfields-in-the-global-snippet%2Cfields-in-the-event-snippet---overview%2Cfields-in-all-event-snippets%2Cexample-event-snippet-for-counter---standard-activities%2Cexample-event-snippet-for-counter---unique-activities%2Cexample-event-snippet-for-counter---per-session-activities%2Cfields-in-event-snippets-for-sales-tags%2Cexample-event-snippet-for-sales---transaction-activities%2Cexample-event-snippet-for-sales---items-sold-activities%2Ccustom-fields%2Cnoscript-section-of-event-snippets%2Cdo-i-need-to-set-up-cache-busting-with-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cstep-add-the-event-snippet-to-pages-with-events-youre-tracking%2Cfields-in-the-global-snippet%2Cfields-in-the-event-snippet---overview%2Cfields-in-all-event-snippets%2Cexample-event-snippet-for-counter---standard-activities%2Cexample-event-snippet-for-counter---unique-activities%2Cexample-event-snippet-for-counter---per-session-activities%2Cfields-in-event-snippets-for-sales-tags%2Cexample-event-snippet-for-sales---transaction-activities%2Cexample-event-snippet-for-sales---items-sold-activities%2Ccustom-fields%2Cnoscript-section-of-event-snippets%2Cdo-i-need-to-set-up-cache-busting-with-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cstep-add-the-event-snippet-to-pages-with-events-youre-tracking%2Cfields-in-the-global-snippet%2Cfields-in-the-event-snippet---overview%2Cfields-in-all-event-snippets%2Cexample-event-snippet-for-counter---standard-activities%2Cexample-event-snippet-for-counter---unique-activities%2Cexample-event-snippet-for-counter---per-session-activities%2Cfields-in-event-snippets-for-sales-tags%2Cexample-event-snippet-for-sales---transaction-activities%2Cexample-event-snippet-for-sales---items-sold-activities%2Ccustom-fields%2Cnoscript-section-of-event-snippets%2Cdo-i-need-to-set-up-cache-busting-with-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-lakjsdlkfjalsdkfjis-the-global-site-tag-placed-in-the-head-lakjsdlkfjalsdkfjis-the-global-site-tag-placed-in-the-head-lakjsdlkfjalsdkfjakljshdlfkjahsldkfjahlskdfjhaklsjdfhalksjdhflakjshdflakjsdhfklasjhdflaksjhdflaksjdfhlakjshdflakjsdhfklasjhdflaksjhdflaksjdfhlakjshdflakjsdhfklasjhdflaksjhdflaksjdfhljkkwoipqpweoirpoqiwerpoqi1111111111111', - dh: 'support.google.com', - dt: 'a', - dr: 'https://google.com/answer/7554821?zippy=%2Cfields-in-event-snippets-for-counter-tags%2Cstep-add-the-global-snippet-to-every-page-of-your-site%2Cstep-add-the-event-snippet-to-pages-with-events-youre-tracking%2Cfields-in-the-global-snippet%2Cfields-in-the-event-snippet---overview%2Cfields-in-all-event-snippets%2Cexample-event-snippet-for-counter---standard-activities%2Cexample-event-snippet-for-counter---unique-activities%2Cexample-event-snippet-for-counter---per-session-activities%2Cfields-in-event-snippets-for-sales-tags%2Cexample-event-snippet-for-sales---transaction-activities%2Cexample-event-snippet-for-sales---items-sold-activities%2Ccustom-fields%2Cnoscript-section-of-event-snippets%2Cdo-i-need-to-set-up-cache-busting-with-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cstep-add-the-event-snippet-to-pages-with-events-youre-tracking%2Cfields-in-the-global-snippet%2Cfields-in-the-event-snippet---overview%2Cfields-in-all-event-snippets%2Cexample-event-snippet-for-counter---standard-activities%2Cexample-event-snippet-for-counter---unique-activities%2Cexample-event-snippet-for-counter---per-session-activities%2Cfields-in-event-snippets-for-sales-tags%2Cexample-event-snippet-for-sales---transaction-activities%2Cexample-event-snippet-for-sales---items-sold-activities%2Ccustom-fields%2Cnoscript-section-of-event-snippets%2Cdo-i-need-to-set-up-cache-busting-with-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cstep-add-the-event-snippet-to-pages-with-events-youre-tracking%2Cfields-in-the-global-snippet%2Cfields-in-the-event-snippet---overview%2Cfields-in-all-event-snippets%2Cexample-event-snippet-for-counter---standard-activities%2Cexample-event-snippet-for-counter---unique-activities%2Cexample-event-snippet-for-counter---per-session-activities%2Cfields-in-event-snippets-for-sales-tags%2Cexample-event-snippet-for-sales---transaction-activities%2Cexample-event-snippet-for-sales---items-sold-activities%2Ccustom-fields%2Cnoscript-section-of-event-snippets%2Cdo-i-need-to-set-up-cache-busting-with-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-tg%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learns-more-about-the-global-site-tag%2Cwhy-is-the-globalthe-head-when-iframe-and-image-tags-were-placed-in-the-body-placed-of-my-site%2Cwhere-can-i-learn-g2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-and-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-n-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag', - v: '1', - t: 'pageview', - tid: 'UA-165994240-1', - ds: 'web', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - ul: 'en-US', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - cid: '00000000000000000000000000', - uip: '0.0.0.0', - qt: 124893881701, - }, - body: { - JSON: {}, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, -].map((d) => ({ ...d, mockFns })); + { + "name": "ga", + "description": "Test 0", + "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, + "an": "Test App name", + "ul": "Test ul" + }, + "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": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "name", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "name", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ea": "action1", + "ec": "All", + "ni": 1, + "ul": "Test ul", + "an": "Test App name", + "cm1": "test@rudderstack.com", + "v": "1", + "t": "event", + "tid": "UA-165994240-1", + "ds": "web", + "npa": 1, + "aip": 1, + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "uid": "123456", + "cid": "123456", + "uip": "0.0.0.0", + "qt": 124901802438 + }, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "123456" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "description": "Test 1", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "traits": { + "name": "Rudder Test" + }, + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "properties": { + "plan": "standard plan", + "name": "rudder test" + }, + "type": "identify", + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "originalTimestamp": "2019-10-14T11:15:18.299Z", + "anonymousId": "00000000000000000000000000", + "userId": "123456", + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "name", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "name", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ea": "action1", + "ec": "Rudder Test", + "cd1": "Rudder Test", + "cg2": "Rudder Test", + "v": "1", + "t": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "uid": "123456", + "cid": "00000000000000000000000000", + "ni": 1, + "uip": "0.0.0.0", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "ul": "en-US", + "qt": 124893881701 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "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": "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", + "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": "q", + "search": "", + "title": "a", + "url": "https://www.example.com/abc" + }, + "integrations": { + "All": true + }, + "name": "ApplicationLoaded", + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "v": "1", + "t": "pageview", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "uip": "0.0.0.0", + "ul": "en-US", + "dh": "www.example.com", + "dl": "https://www.example.com/abc", + "dp": "%2Fabc", + "dr": "q", + "dt": "a", + "qt": 124893881701 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "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" + }, + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "test track event GA3", + "properties": { + "category": "test-category", + "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-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ec": "test-category", + "ni": 1, + "v": "1", + "el": "event", + "t": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "ea": "test track event GA3", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "ul": "en-US", + "qt": 124893881700 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "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": { + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "order completed", + "properties": { + "order_id": "rudderstackorder1", + "total": 99.99, + "shipping": 13.99, + "tax": 20.99, + "currency": "INR", + "products": [ + { + "quantity": 1, + "price": 24.75, + "name": "my product", + "sku": "p-298" + }, + { + "quantity": 3, + "price": 24.75, + "name": "other product", + "sku": "p-299" + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "pa": "purchase", + "tr": 99.99, + "ev": 100, + "pr1id": "p-298", + "pr1cd1": "my product", + "pr1nm": "my product", + "pr1pr": 24.75, + "pr2id": "p-299", + "pr2cd1": "other product", + "pr2nm": "other product", + "pr2pr": 24.75, + "ea": "order completed", + "ec": "EnhancedEcommerce", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "ti": "rudderstackorder1", + "ts": 13.99, + "tt": 20.99, + "cu": "INR", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "ni": 1, + "pr1qt": 1, + "pr2qt": 3, + "ul": "en-US", + "qt": 124893881700 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "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": "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "product added", + "properties": { + "currency": "CAD", + "quantity": 1, + "price": 24.75, + "name": "my product 1", + "category": "cat 1", + "sku": "p-298", + "testDimension": true, + "testMetric": true, + "position": 4.5 + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ea": "product added", + "ec": "cat 1", + "pa": "add", + "pr1cd1": "my product 1", + "pr1id": "p-298", + "cd1": "my product 1", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "pr1nm": "my product 1", + "pr1ca": "cat 1", + "cu": "CAD", + "pr1ps": 4.5, + "pr1pr": 24.75, + "pr1qt": 1, + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "ni": 1, + "ul": "en-US", + "qt": 124893881700 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "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": "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "product removed", + "properties": { + "currency": "CAD", + "quantity": 1, + "price": 24.75, + "name": "my product 1", + "category": "cat 1", + "sku": "p-298", + "testDimension": true, + "testMetric": true, + "position": 4.5 + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ea": "product removed", + "ec": "cat 1", + "pa": "remove", + "pr1cd1": "my product 1", + "pr1id": "p-298", + "cd1": "my product 1", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "pr1nm": "my product 1", + "pr1ca": "cat 1", + "cu": "CAD", + "pr1ps": 4.5, + "pr1pr": 24.75, + "pr1qt": 1, + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "ul": "en-US", + "ni": 1, + "qt": 124893881700 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "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": "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "product viewed", + "properties": { + "currency": "CAD", + "quantity": 1, + "price": 24.75, + "name": "my product 1", + "category": "cat 1", + "sku": "p-298", + "testDimension": true, + "testMetric": true, + "position": 4.5 + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ea": "product viewed", + "ec": "cat 1", + "pa": "detail", + "pr1cd1": "my product 1", + "pr1id": "p-298", + "cd1": "my product 1", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "pr1nm": "my product 1", + "pr1ca": "cat 1", + "cu": "CAD", + "pr1ps": 4.5, + "pr1pr": 24.75, + "pr1qt": 1, + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "ul": "en-US", + "ni": 1, + "qt": 124893881700 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "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" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; 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": "2019-10-14T11:15:18.299Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "product removed", + "properties": { + "currency": "CAD", + "quantity": 1, + "price": 24.75, + "name": "my product 1", + "category": "cat 1", + "sku": "p-298", + "testDimension": true, + "testMetric": true, + "position": 4.5 + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ea": "product removed", + "ec": "cat 1", + "pa": "remove", + "pr1cd1": "my product 1", + "pr1id": "p-298", + "cd1": "my product 1", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "pr1nm": "my product 1", + "pr1ca": "cat 1", + "cu": "CAD", + "pr1ps": 4.5, + "pr1pr": 24.75, + "pr1qt": 1, + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "ul": "en-US", + "ni": 1, + "qt": 124893881701 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "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" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; 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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "product viewed", + "properties": { + "currency": "CAD", + "quantity": 1, + "price": 24.75, + "name": "my product 1", + "category": "cat 1", + "sku": "p-298", + "testDimension": true, + "testMetric": true, + "position": 4.5 + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ea": "product viewed", + "ec": "cat 1", + "pa": "detail", + "pr1cd1": "my product 1", + "pr1id": "p-298", + "cd1": "my product 1", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "pr1nm": "my product 1", + "pr1ca": "cat 1", + "cu": "CAD", + "pr1ps": 4.5, + "pr1pr": 24.75, + "pr1qt": 1, + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "ul": "en-US", + "ni": 1, + "qt": 124893881700 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "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" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; 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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "product list filtered", + "properties": { + "category": "cat 1", + "list_id": "1234", + "filters": [ + { + "type": "department", + "value": "beauty" + }, + { + "type": "price", + "value": "under" + } + ], + "sorts": [ + { + "type": "price", + "value": "desc" + } + ], + "products": [ + { + "product_id": "507f1f77bcf86cd799439011", + "productDimension": "My Product Dimension", + "productMetric": "My Product Metric" + } + ], + "testDimension": true, + "testMetric": true + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ea": "product list filtered", + "ec": "cat 1", + "pa": "detail", + "il1pi1id": "507f1f77bcf86cd799439011", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "il1nm": "1234", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "cid": "00000000000000000000000000", + "uid": "12345", + "il1pi1qt": 1, + "il1pi1va": "department:beauty,price:under::price:desc", + "ul": "en-US", + "ni": 1, + "qt": 124893881700 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "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": { + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "product list viewed", + "properties": { + "category": "cat 1", + "list_id": "1234", + "filters": [ + { + "type": "department", + "value": "beauty" + }, + { + "type": "price", + "value": "under" + } + ], + "sorts": [ + { + "type": "price", + "value": "desc" + } + ], + "products": [ + { + "product_id": "507f1f77bcf86cd799439011", + "productDimension": "My Product Dimension", + "productMetric": "My Product Metric", + "position": 10 + }, + { + "product_id": "507f1f77bcf86cdef799439011", + "productDimension": "My Product Dimension1", + "productMetric": "My Product Metric1", + "position": -10 + } + ], + "testDimension": true, + "testMetric": true + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ea": "product list viewed", + "ec": "cat 1", + "pa": "detail", + "il1pi1id": "507f1f77bcf86cd799439011", + "il1pi1ps": 10, + "il1pi2id": "507f1f77bcf86cdef799439011", + "il1pi2ps": -10, + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "il1nm": "1234", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "cid": "00000000000000000000000000", + "uid": "12345", + "il1pi1qt": 1, + "il1pi1va": "department:beauty,price:under::price:desc", + "il1pi2qt": 1, + "il1pi2va": "department:beauty,price:under::price:desc", + "ul": "en-US", + "ni": 1, + "qt": 124893881700 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "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" + }, + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "product clicked", + "properties": { + "currency": "CAD", + "quantity": 1, + "price": 24.75, + "name": "my product", + "category": "cat 1", + "sku": "p-298", + "list": "search results", + "testDimension": true, + "testMetric": true + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ea": "product clicked", + "ec": "cat 1", + "pa": "click", + "pr1cd1": "my product", + "pr1id": "p-298", + "cd1": "my product", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "pr1nm": "my product", + "pr1ca": "cat 1", + "cu": "CAD", + "pr1pr": 24.75, + "pr1qt": 1, + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "pal": "search results", + "ul": "en-US", + "ni": 1, + "qt": 124893881700 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "description": "Test 13", + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "promotion viewed", + "properties": { + "currency": "CAD", + "promotion_id": "PROMO_1234", + "name": "my product", + "creative": "summer_banner2", + "position": "banner_slot1", + "testDimension": true, + "testMetric": true + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ea": "promotion viewed", + "ec": "EnhancedEcommerce", + "cu": "CAD", + "promoa": "view", + "pa": "view", + "cd1": "my product", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "promo1id": "PROMO_1234", + "promo1cr": "summer_banner2", + "promo1ps": "banner_slot1", + "promo1nm": "my product", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "ul": "en-US", + "ni": 1, + "qt": 124893881700 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "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": { + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "promotion clicked", + "properties": { + "currency": "CAD", + "promotion_id": "PROMO_1234", + "name": "my product", + "creative": "summer_banner2", + "position": "banner_slot1", + "testDimension": true, + "testMetric": true + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ea": "promotion clicked", + "ec": "EnhancedEcommerce", + "cu": "CAD", + "promoa": "promo_click", + "pa": "promo_click", + "cd1": "my product", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "promo1id": "PROMO_1234", + "promo1cr": "summer_banner2", + "promo1ps": "banner_slot1", + "promo1nm": "my product", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "ul": "en-US", + "ni": 1, + "qt": 124893881700 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "description": "Test 15", + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "checkout started", + "properties": { + "currency": "CAD", + "products": [ + { + "quantity": 1, + "price": 24.75, + "name": "my product", + "sku": "p-298" + }, + { + "quantity": 1, + "price": 24.75, + "name": "my product 2", + "sku": "p-299" + } + ], + "step": 1, + "paymentMethod": "Visa", + "testDimension": true, + "testMetric": true + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "pa": "checkout", + "pr1id": "p-298", + "pr1cd1": "my product", + "pr1nm": "my product", + "pr1pr": 24.75, + "pr2id": "p-299", + "pr2cd1": "my product 2", + "pr2nm": "my product 2", + "pr2pr": 24.75, + "ea": "checkout started", + "ec": "EnhancedEcommerce", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "cu": "CAD", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "cos": 1, + "pr1qt": 1, + "pr2qt": 1, + "ul": "en-US", + "ni": 1, + "qt": 124893881700 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "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.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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "order updated", + "properties": { + "currency": "CAD", + "products": [ + { + "quantity": 1, + "price": 24.75, + "name": "my product", + "sku": "p-298" + }, + { + "quantity": 1, + "price": 24.75, + "name": "my product 2", + "sku": "p-299" + } + ], + "step": 1, + "paymentMethod": "Visa", + "testDimension": true, + "testMetric": true + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "pa": "checkout", + "pr1id": "p-298", + "pr1cd1": "my product", + "pr1nm": "my product", + "pr1pr": 24.75, + "pr2id": "p-299", + "pr2cd1": "my product 2", + "pr2nm": "my product 2", + "pr2pr": 24.75, + "ea": "order updated", + "ec": "EnhancedEcommerce", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "cu": "CAD", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "cos": 1, + "pr1qt": 1, + "pr2qt": 1, + "ul": "en-US", + "ni": 1, + "qt": 124893881700 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "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.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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "checkout step viewed", + "properties": { + "currency": "CAD", + "step": 1 + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "pa": "checkout", + "ea": "checkout step viewed", + "ec": "EnhancedEcommerce", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "cos": 1, + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "ul": "en-US", + "ni": 1, + "qt": 124893881700 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "description": "Test 18", + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "checkout step completed", + "properties": { + "currency": "CAD", + "step": 1, + "paymentMethod": "Visa" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "pa": "checkout_option", + "ea": "checkout step completed", + "ec": "EnhancedEcommerce", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "cos": 1, + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "ul": "en-US", + "ni": 1, + "qt": 124893881700 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "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.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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "order refunded", + "properties": { + "products": [ + { + "quantity": 1, + "sku": "p-298" + }, + { + "quantity": 1, + "sku": "p-299" + } + ], + "testDimension": true, + "testMetric": true + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ni": 1, + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "ea": "order refunded", + "ec": "EnhancedEcommerce", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "pa": "refund", + "pr1id": "p-298", + "pr1qt": 1, + "pr2id": "p-299", + "ul": "en-US", + "pr2qt": 1, + "qt": 124893881700 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "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.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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "order starterefundedd", + "properties": { + "products": [ + { + "quantity": 1, + "sku": "p-298" + }, + { + "quantity": 1, + "sku": "p-299" + } + ], + "testDimension": true, + "testMetric": true + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ul": "en-US", + "ec": "All", + "ni": 1, + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "ea": "order starterefundedd", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "qt": 124893881700 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "description": "Test 21", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "order starterefundedd", + "properties": { + "products": [ + { + "quantity": 1, + "sku": "p-298" + }, + { + "quantity": 1, + "sku": "p-299" + } + ], + "testDimension": true, + "testMetric": true + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ul": "en-US", + "ec": "All", + "ni": 1, + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "ea": "order starterefundedd", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "qt": 124893881700 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "description": "Test 22", + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "order starterefundedd", + "properties": { + "products": [ + { + "quantity": 1, + "sku": "p-298" + }, + { + "quantity": 1, + "sku": "p-299" + } + ], + "testDimension": true, + "testMetric": true + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ul": "en-US", + "ec": "All", + "ni": 1, + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "aip": 1, + "cid": "00000000000000000000000000", + "ea": "order starterefundedd", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "qt": 124893881700 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "description": "Test 23", + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "order starterefundedd", + "properties": { + "products": [ + { + "quantity": 1, + "sku": "p-298" + }, + { + "quantity": 1, + "sku": "p-299" + } + ], + "testDimension": true, + "testMetric": true + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ul": "en-US", + "ec": "All", + "ni": 1, + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "cid": "00000000000000000000000000", + "ea": "order starterefundedd", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "qt": 124893881700 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "description": "Test 24", + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "order starterefundedd", + "properties": { + "products": [ + { + "quantity": 1, + "sku": "p-298" + }, + { + "quantity": 1, + "sku": "p-299" + } + ], + "testDimension": true, + "testMetric": true + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ul": "en-US", + "ec": "All", + "ni": 1, + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "ea": "order starterefundedd", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "qt": 124893881700 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "description": "Test 25", + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "linkid test", + "properties": { + "linkid": "abc123", + "testDimension": true, + "testMetric": true + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ul": "en-US", + "ec": "All", + "ni": 1, + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "linkid": "abc123", + "cid": "00000000000000000000000000", + "ea": "linkid test", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "qt": 124893881700 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "description": "Test 26", + "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 + }, + "campaign": { + "name": "sampleName", + "source": "sampleSource", + "medium": "sampleMedium", + "content": "sampleContent", + "term": "sampleTerm" + } + }, + "type": "track", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "campaign test", + "properties": { + "testDimension": true, + "testMetric": true + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ul": "en-US", + "ec": "All", + "ni": 1, + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "cn": "sampleName", + "cs": "sampleSource", + "cm": "sampleMedium", + "cc": "sampleContent", + "ck": "sampleTerm", + "cid": "00000000000000000000000000", + "ea": "campaign test", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "qt": 124893881700 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "description": "Test 27", + "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 + }, + "campaign": { + "name": "sampleName", + "source": "sampleSource", + "medium": "sampleMedium", + "content": "sampleContent", + "term": "sampleTerm" + } + }, + "type": "track", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "event": "campaign test", + "properties": { + "testDimension": true, + "testMetric": true + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ul": "en-US", + "ec": "All", + "ni": 1, + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "cn": "sampleName", + "cs": "sampleSource", + "cm": "sampleMedium", + "cc": "sampleContent", + "ck": "sampleTerm", + "cid": "00000000000000000000000000", + "ea": "campaign test", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "qt": 124893881700 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "description": "Test 28", + "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 + }, + "campaign": { + "name": "sampleName", + "source": "sampleSource", + "medium": "sampleMedium", + "content": "sampleContent", + "term": "sampleTerm" + } + }, + "type": "track", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "event": "campaign test", + "properties": { + "testDimension": true, + "testMetric": true + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ul": "en-US", + "ec": "All", + "ni": 1, + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "cn": "sampleName", + "cs": "sampleSource", + "cm": "sampleMedium", + "cc": "sampleContent", + "ck": "sampleTerm", + "cid": "00000000000000000000000000", + "ea": "campaign test", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "qt": 124893881700 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "description": "Test 29", + "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.2" + }, + "traits": { + "abc": "1234" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.2" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36", + "locale": "en-GB", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + }, + "page": { + "path": "/tests/html/ecomm_test.html", + "referrer": "http://0.0.0.0:1112/tests/html/", + "search": "", + "title": "GA Ecommerce Test", + "url": "http://0.0.0.0:1112/tests/html/ecomm_test.html" + } + }, + "type": "identify", + "messageId": "bc8a6af8-37fd-46a9-9592-ea29a256435f", + "originalTimestamp": "2020-06-22T11:30:32.493Z", + "anonymousId": "38e169a1-3234-46f7-9ceb-c1a6a69005fe", + "userId": "123", + "integrations": { + "All": true + }, + "sentAt": "2020-06-22T11:30:32.494Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ea": "User Enriched", + "dt": "GA Ecommerce Test", + "ec": "All", + "v": "1", + "t": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.1.2", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "uid": "123", + "cid": "38e169a1-3234-46f7-9ceb-c1a6a69005fe", + "ni": 1, + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36", + "ul": "en-GB", + "qt": 103120167507 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "38e169a1-3234-46f7-9ceb-c1a6a69005fe" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "description": "Test 30", + "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", + "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", + "integrations": { + "All": true + }, + "name": "ApplicationLoaded", + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "v": "1", + "t": "pageview", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "ul": "en-US", + "uip": "0.0.0.0", + "qt": 124893881701 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "description": "Test 31", + "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", + "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": "?xyz=1", + "title": "", + "url": "https://www.example.com/abc" + }, + "integrations": { + "All": true + }, + "name": "ApplicationLoaded", + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "v": "1", + "t": "pageview", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "ul": "en-US", + "uip": "0.0.0.0", + "dh": "www.example.com", + "dl": "https://www.example.com/abc", + "dp": "%2Fabc%3Fxyz%3D1", + "qt": 124893881701 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "description": "Test 32", + "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", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "type": "track", + "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", + "originalTimestamp": "2019-10-14T11:15:18.299Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "integrations": { + "All": true + }, + "event": "sample event", + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ec": "All", + "ni": 1, + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "ea": "sample event", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "ul": "en-US", + "uip": "0.0.0.0", + "qt": 124893881701 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "description": "Test 33", + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "Order Refunded", + "properties": { + "order_id": "rudderstackorder1", + "total": 99.99, + "shipping": 13.99, + "tax": 20.99, + "currency": "INR", + "products": [ + { + "quantity": 1, + "price": 24.75, + "name": "my product", + "sku": "p-298" + }, + { + "quantity": 3, + "price": 24.75, + "name": "other product", + "sku": "p-299" + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "pa": "refund", + "ev": 100, + "pr1id": "p-298", + "pr1cd1": "my product", + "pr1nm": "my product", + "pr1pr": 24.75, + "pr1qt": 1, + "pr2id": "p-299", + "pr2cd1": "other product", + "pr2nm": "other product", + "pr2pr": 24.75, + "pr2qt": 3, + "ea": "Order Refunded", + "ec": "EnhancedEcommerce", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "cid": "00000000000000000000000000", + "ti": "rudderstackorder1", + "uid": "12345", + "ul": "en-US", + "ni": 1, + "qt": 124893881700 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "description": "Test 34", + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "Order Refunded", + "properties": { + "order_id": "rudderstackorder1", + "total": 99.99, + "shipping": 13.99, + "tax": 20.99, + "currency": "INR" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ev": 100, + "pa": "refund", + "ti": "rudderstackorder1", + "ea": "Order Refunded", + "ec": "EnhancedEcommerce", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "cid": "00000000000000000000000000", + "uid": "12345", + "ul": "en-US", + "ni": 1, + "qt": 124893881700 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "description": "Test 35", + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "Order Refunded", + "properties": { + "order_id": "rudderstackorder1", + "total": 99.99, + "shipping": 13.99, + "tax": 20.99, + "currency": "INR", + "products": [] + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ev": 100, + "pa": "refund", + "ti": "rudderstackorder1", + "ea": "Order Refunded", + "ec": "EnhancedEcommerce", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "cid": "00000000000000000000000000", + "uid": "12345", + "ul": "en-US", + "ni": 1, + "qt": 124893881700 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "description": "Test 36", + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "Order Refunded", + "properties": { + "order_id": "rudderstackorder1", + "total": 99.99, + "shipping": 13.99, + "tax": 20.99, + "currency": "INR", + "products": [ + { + "quantity": 1, + "price": 24.75, + "name": "my product", + "sku": "p-298", + "product_id": "1" + }, + { + "quantity": 3, + "price": 24.75, + "name": "other product", + "sku": "p-299", + "product_id": "2" + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ev": 100, + "pa": "refund", + "pr1id": "1", + "pr1cd1": "my product", + "pr1nm": "my product", + "pr1pr": 24.75, + "pr1qt": 1, + "pr2id": "2", + "pr2cd1": "other product", + "pr2nm": "other product", + "pr2pr": 24.75, + "pr2qt": 3, + "ea": "Order Refunded", + "ec": "EnhancedEcommerce", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "cid": "00000000000000000000000000", + "ti": "rudderstackorder1", + "uid": "12345", + "ul": "en-US", + "ni": 1, + "qt": 124893881700 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "description": "Test 37", + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "Cart Shared", + "properties": { + "order_id": "rudderstackorder1", + "total": 99.99, + "shipping": 13.99, + "tax": 20.99, + "currency": "INR", + "products": [ + { + "quantity": 1, + "price": 24.75, + "name": "my product", + "sku": "p-298", + "product_id": "1" + }, + { + "quantity": 3, + "price": 24.75, + "name": "other product", + "sku": "p-299", + "product_id": "2" + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ev": 100, + "ea": "Cart Shared", + "ec": "All", + "ni": 1, + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "st": " 1 2", + "ul": "en-US", + "qt": 124893881700 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "description": "Test 38", + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "Product Shared", + "properties": { + "product_id": "rudderstackorder1", + "total": 99.99, + "shipping": 13.99, + "tax": 20.99, + "currency": "INR", + "url": "https://www.example.com/abc" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ev": 100, + "ea": "Product Shared", + "ec": "All", + "ni": 1, + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "st": "https://www.example.com/abc", + "dh": "www.example.com", + "dl": "https://www.example.com/abc", + "dp": "%2Fabc", + "ul": "en-US", + "qt": 124893881700 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "description": "Test 39", + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "Product List Clicked", + "properties": { + "list_id": "Sample Product List", + "category": "Sample Product List", + "products": [ + { + "quantity": 1, + "price": 24.75, + "name": "my product", + "sku": "p-298", + "product_id": "1" + }, + { + "quantity": 3, + "price": 24.75, + "name": "other product", + "sku": "p-299", + "product_id": "2" + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ea": "Product List Clicked", + "ec": "Sample Product List", + "pa": "click", + "il1pi1id": "1", + "pr1cd1": "my product", + "il1pi1nm": "my product", + "il1pi1pr": 24.75, + "il1pi2id": "2", + "pr2cd1": "other product", + "il1pi2nm": "other product", + "il1pi2pr": 24.75, + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "il1nm": "Sample Product List", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "cid": "00000000000000000000000000", + "uid": "12345", + "ni": 1, + "il1pi2qt": 3, + "il1pi1qt": 1, + "ul": "en-US", + "qt": 124893881700 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "description": "Test 40", + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "Product List Clicked", + "properties": { + "list_id": "Sample Product List", + "category": "Sample Product List", + "products": [ + { + "quantity": 1, + "price": 24.75, + "name": "my product", + "sku": "p-298" + }, + { + "quantity": 3, + "price": 24.75, + "name": "other product", + "sku": "p-299" + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ea": "Product List Clicked", + "ec": "Sample Product List", + "pa": "click", + "il1pi1id": "p-298", + "pr1cd1": "my product", + "il1pi1nm": "my product", + "il1pi1pr": 24.75, + "il1pi2id": "p-299", + "pr2cd1": "other product", + "il1pi2nm": "other product", + "il1pi2pr": 24.75, + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "il1nm": "Sample Product List", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "cid": "00000000000000000000000000", + "uid": "12345", + "ul": "en-US", + "il1pi2qt": 3, + "il1pi1qt": 1, + "ni": 1, + "qt": 124893881700 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "description": "Test 41", + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "Product List Clicked", + "properties": { + "list_id": "Sample Product List", + "category": "Sample Product List", + "products": [] + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ni": 1, + "ea": "Product List Clicked", + "ec": "Sample Product List", + "pa": "click", + "el": "event", + "v": "1", + "t": "event", + "tid": "UA-165994240-1", + "ds": "web", + "npa": 1, + "aip": 1, + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "ul": "en-US", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "il1nm": "Sample Product List", + "uid": "12345", + "cid": "00000000000000000000000000", + "qt": 124893881700 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "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" + }, + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "Order Cancelled", + "properties": { + "order_id": "rudderstackorder1", + "total": 99.99, + "shipping": 13.99, + "tax": 20.99, + "currency": "INR", + "products": [ + { + "quantity": 1, + "price": 24.75, + "name": "my product", + "sku": "p-298", + "product_id": "1" + }, + { + "quantity": 3, + "price": 24.75, + "name": "other product", + "sku": "p-299", + "product_id": "2" + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "pa": "refund", + "ev": 100, + "tr": 99.99, + "pr1id": "1", + "pr1cd1": "my product", + "pr1nm": "my product", + "pr1pr": 24.75, + "pr2id": "2", + "pr2cd1": "other product", + "pr2nm": "other product", + "pr2pr": 24.75, + "ea": "Order Cancelled", + "ec": "EnhancedEcommerce", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "ti": "rudderstackorder1", + "ts": 13.99, + "tt": 20.99, + "cu": "INR", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "ul": "en-US", + "pr1qt": 1, + "pr2qt": 3, + "ni": 1, + "qt": 124893881700 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "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": "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "Order Cancelled", + "properties": { + "order_id": "rudderstackorder1", + "value": 99.99, + "shipping": 13.99, + "tax": 20.99, + "currency": "INR", + "products": [ + { + "quantity": 1, + "price": 24.75, + "name": "my product", + "sku": "p-298", + "product_id": "1" + }, + { + "quantity": 3, + "price": 24.75, + "name": "other product", + "sku": "p-299", + "product_id": "2" + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "pa": "refund", + "tr": 99.99, + "pr1id": "1", + "pr1cd1": "my product", + "pr1nm": "my product", + "pr1pr": 24.75, + "pr2id": "2", + "pr2cd1": "other product", + "pr2nm": "other product", + "pr2pr": 24.75, + "ea": "Order Cancelled", + "ev": 100, + "ec": "EnhancedEcommerce", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "ti": "rudderstackorder1", + "ts": 13.99, + "tt": 20.99, + "cu": "INR", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "ul": "en-US", + "pr1qt": 1, + "pr2qt": 3, + "ni": 1, + "qt": 124893881700 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "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": "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "Order Cancelled", + "properties": { + "order_id": "rudderstackorder1", + "revenue": 99.99, + "shipping": 13.99, + "tax": 20.99, + "currency": "INR", + "products": [ + { + "quantity": 1, + "price": 24.75, + "name": "my product", + "sku": "p-298", + "product_id": "1" + }, + { + "quantity": 3, + "price": 24.75, + "name": "other product", + "sku": "p-299", + "product_id": "2" + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "pa": "refund", + "tr": 99.99, + "pr1id": "1", + "pr1cd1": "my product", + "pr1nm": "my product", + "pr1pr": 24.75, + "pr2id": "2", + "pr2cd1": "other product", + "pr2nm": "other product", + "pr2pr": 24.75, + "ea": "Order Cancelled", + "ev": 100, + "ec": "EnhancedEcommerce", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "ti": "rudderstackorder1", + "ts": 13.99, + "tt": 20.99, + "cu": "INR", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "ul": "en-US", + "pr1qt": 1, + "pr2qt": 3, + "ni": 1, + "qt": 124893881700 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "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": "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "Order Cancelled", + "properties": { + "order_id": "rudderstackorder1", + "revenue": 99.99, + "shipping": 13.99, + "tax": 20.99, + "currency": "INR", + "products": [] + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "No product information supplied for transaction event", + "statTags": { + "destType": "GA", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "ga", + "description": "Test 46", + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "Cart Viewed", + "properties": { + "order_id": "rudderstackorder1", + "revenue": 99.99, + "shipping": 13.99, + "tax": 20.99, + "currency": "INR", + "products": [ + { + "quantity": 1, + "price": 24.75, + "name": "my product", + "sku": "p-298", + "product_id": "1" + }, + { + "quantity": 3, + "price": 24.75, + "name": "other product", + "sku": "p-299", + "product_id": "2" + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ea": "Cart Viewed", + "ev": 100, + "ec": "EnhancedEcommerce", + "pa": "detail", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "cid": "00000000000000000000000000", + "uid": "12345", + "ul": "en-US", + "ni": 1, + "pr1cd1": "my product", + "pr1id": "1", + "pr1nm": "my product", + "pr1pr": 24.75, + "pr1qt": 1, + "pr2cd1": "other product", + "pr2id": "2", + "pr2nm": "other product", + "pr2pr": 24.75, + "pr2qt": 3, + "qt": 124893881700 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "description": "Test 47", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "traits": { + "name1": "Test" + }, + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "properties": { + "plan": "standard plan", + "name": "rudder test" + }, + "type": "identify", + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "anonymousId": "00000000000000000000000000", + "userId": "123456", + "integrations": { + "All": true + }, + "traits": { + "name1": "Test" + }, + "sentAt": "2019-10-14T09:03:22.563Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "serverSideIdentifyEventCategory": "name", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "server side identify is not on", + "statTags": { + "destType": "GA", + "errorCategory": "dataValidation", + "errorType": "configuration", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "ga", + "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", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "type": "screen", + "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", + "originalTimestamp": "2019-10-14T11:15:18.299Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "properties": { + "name": "homescreen" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "cd1": "homescreen", + "v": "1", + "t": "screenview", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "cd": "homescreen", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "ul": "en-US", + "uip": "0.0.0.0", + "qt": 124893881701 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "description": "Test 49", + "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", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "type": "newtype", + "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", + "originalTimestamp": "2019-10-14T11:15:18.299Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "properties": { + "name": "homescreen" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Message type newtype not supported", + "statTags": { + "destType": "GA", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } + }, + { + "name": "ga", + "description": "Test 50", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "traits": { + "name": "Test" + }, + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "properties": { + "plan": "standard plan", + "name": "rudder test" + }, + "type": "identify", + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "userId": "12345", + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "name", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "userId": "12345", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ea": "action1", + "ec": "Test", + "ni": 1, + "cd1": "Test", + "v": "1", + "t": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "ul": "en-US", + "uid": "12345", + "cid": "827ccb0eea8a706c4c34a16891f84e7b", + "uip": "0.0.0.0", + "qt": 124901802438 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {} + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "description": "Test 51", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "traits": { + "name": "Test" + }, + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "properties": { + "plan": "standard plan", + "name": "rudder test" + }, + "type": "identify", + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "userId": "12345", + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "name", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "disableMd5": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "userId": "12345", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ea": "action1", + "ec": "Test", + "ni": 1, + "cd1": "Test", + "v": "1", + "t": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "ul": "en-US", + "uid": "12345", + "uip": "0.0.0.0", + "qt": 124901802438 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {} + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "description": "Test 52", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "traits": { + "name": "Test" + }, + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "properties": { + "plan": "standard plan", + "name": "rudder test" + }, + "type": "identify", + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "userId": "12345", + "integrations": { + "All": true, + "GA": { + "clientId": "clientId" + }, + "Google Analytics": { + "clientId": "clientId" + } + }, + "sentAt": "2019-10-14T09:03:22.563Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "name", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "userId": "12345", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ea": "action1", + "ec": "Test", + "ni": 1, + "cd1": "Test", + "v": "1", + "t": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "ul": "en-US", + "uid": "12345", + "cid": "clientId", + "uip": "0.0.0.0", + "qt": 124901802438 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {} + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "description": "Test 53", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "externalId": [ + { + "id": "externalClientId", + "type": "gaExternalId" + } + ], + "traits": { + "name": "Test" + }, + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "properties": { + "plan": "standard plan", + "name": "rudder test" + }, + "type": "identify", + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "userId": "12345", + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "name", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "userId": "12345", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ea": "action1", + "ec": "Test", + "ni": 1, + "cd1": "Test", + "v": "1", + "t": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "ul": "en-US", + "uid": "12345", + "cid": "externalClientId", + "uip": "0.0.0.0", + "qt": 124901802438 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {} + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "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.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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "product list viewed", + "properties": { + "nonInteraction": 0, + "category": "cat 1", + "list_id": "1234", + "filters": { + "a": "department", + "b": "beauty" + }, + "sorts": [ + { + "type": "price", + "value": "desc" + } + ], + "products": [ + { + "product_id": "507f1f77bcf86cd799439011", + "productDimension": "My Product Dimension", + "productMetric": "My Product Metric", + "position": 10 + }, + { + "product_id": "507f1f77bcf86cdef799439011", + "productDimension": "My Product Dimension1", + "productMetric": "My Product Metric1", + "position": -10 + } + ], + "testDimension": true, + "testMetric": true + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "content1" + }, + { + "from": "prop2", + "to": "content2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ni": 0, + "ea": "product list viewed", + "ec": "cat 1", + "pa": "detail", + "il1pi1id": "507f1f77bcf86cd799439011", + "il1pi1va": "::price:desc", + "il1pi1ps": 10, + "il1pi1qt": 1, + "il1pi2id": "507f1f77bcf86cdef799439011", + "il1pi2va": "::price:desc", + "il1pi2ps": -10, + "il1pi2qt": 1, + "el": "event", + "v": "1", + "t": "event", + "tid": "UA-165994240-1", + "ds": "web", + "npa": 1, + "aip": 1, + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "ul": "en-US", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "il1nm": "1234", + "uid": "12345", + "cid": "00000000000000000000000000", + "qt": 124893881700 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "ga", + "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.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", + "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": { + "referrer": "https://google.com/answer/7554821?zippy=%2Cfields-in-event-snippets-for-counter-tags%2Cstep-add-the-global-snippet-to-every-page-of-your-site%2Cstep-add-the-event-snippet-to-pages-with-events-youre-tracking%2Cfields-in-the-global-snippet%2Cfields-in-the-event-snippet---overview%2Cfields-in-all-event-snippets%2Cexample-event-snippet-for-counter---standard-activities%2Cexample-event-snippet-for-counter---unique-activities%2Cexample-event-snippet-for-counter---per-session-activities%2Cfields-in-event-snippets-for-sales-tags%2Cexample-event-snippet-for-sales---transaction-activities%2Cexample-event-snippet-for-sales---items-sold-activities%2Ccustom-fields%2Cnoscript-section-of-event-snippets%2Cdo-i-need-to-set-up-cache-busting-with-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cstep-add-the-event-snippet-to-pages-with-events-youre-tracking%2Cfields-in-the-global-snippet%2Cfields-in-the-event-snippet---overview%2Cfields-in-all-event-snippets%2Cexample-event-snippet-for-counter---standard-activities%2Cexample-event-snippet-for-counter---unique-activities%2Cexample-event-snippet-for-counter---per-session-activities%2Cfields-in-event-snippets-for-sales-tags%2Cexample-event-snippet-for-sales---transaction-activities%2Cexample-event-snippet-for-sales---items-sold-activities%2Ccustom-fields%2Cnoscript-section-of-event-snippets%2Cdo-i-need-to-set-up-cache-busting-with-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cstep-add-the-event-snippet-to-pages-with-events-youre-tracking%2Cfields-in-the-global-snippet%2Cfields-in-the-event-snippet---overview%2Cfields-in-all-event-snippets%2Cexample-event-snippet-for-counter---standard-activities%2Cexample-event-snippet-for-counter---unique-activities%2Cexample-event-snippet-for-counter---per-session-activities%2Cfields-in-event-snippets-for-sales-tags%2Cexample-event-snippet-for-sales---transaction-activities%2Cexample-event-snippet-for-sales---items-sold-activities%2Ccustom-fields%2Cnoscript-section-of-event-snippets%2Cdo-i-need-to-set-up-cache-busting-with-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-tg%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learns-more-about-the-global-site-tag%2Cwhy-is-the-globalthe-head-when-iframe-and-image-tags-were-placed-in-the-body-placed-of-my-site%2Cwhere-can-i-learn-g2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-and-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-n-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag", + "search": "", + "title": "a", + "url": "https://support.google.com/campaignmanager/answer/7554821?zippy=%2Cfields-in-event-snippets-for-counter-tags%2Cstep-add-the-global-snippet-to-every-page-of-your-site%2Cstep-add-the-event-snippet-to-pages-with-events-youre-tracking%2Cfields-in-the-global-snippet%2Cfields-in-the-event-snippet---overview%2Cfields-in-all-event-snippets%2Cexample-event-snippet-for-counter---standard-activities%2Cexample-event-snippet-for-counter---unique-activities%2Cexample-event-snippet-for-counter---per-session-activities%2Cfields-in-event-snippets-for-sales-tags%2Cexample-event-snippet-for-sales---transaction-activities%2Cexample-event-snippet-for-sales---items-sold-activities%2Ccustom-fields%2Cnoscript-section-of-event-snippets%2Cdo-i-need-to-set-up-cache-busting-with-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cstep-add-the-event-snippet-to-pages-with-events-youre-tracking%2Cfields-in-the-global-snippet%2Cfields-in-the-event-snippet---overview%2Cfields-in-all-event-snippets%2Cexample-event-snippet-for-counter---standard-activities%2Cexample-event-snippet-for-counter---unique-activities%2Cexample-event-snippet-for-counter---per-session-activities%2Cfields-in-event-snippets-for-sales-tags%2Cexample-event-snippet-for-sales---transaction-activities%2Cexample-event-snippet-for-sales---items-sold-activities%2Ccustom-fields%2Cnoscript-section-of-event-snippets%2Cdo-i-need-to-set-up-cache-busting-with-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cstep-add-the-event-snippet-to-pages-with-events-youre-tracking%2Cfields-in-the-global-snippet%2Cfields-in-the-event-snippet---overview%2Cfields-in-all-event-snippets%2Cexample-event-snippet-for-counter---standard-activities%2Cexample-event-snippet-for-counter---unique-activities%2Cexample-event-snippet-for-counter---per-session-activities%2Cfields-in-event-snippets-for-sales-tags%2Cexample-event-snippet-for-sales---transaction-activities%2Cexample-event-snippet-for-sales---items-sold-activities%2Ccustom-fields%2Cnoscript-section-of-event-snippets%2Cdo-i-need-to-set-up-cache-busting-with-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-lakjsdlkfjalsdkfjis-the-global-site-tag-placed-in-the-head-lakjsdlkfjalsdkfjis-the-global-site-tag-placed-in-the-head-lakjsdlkfjalsdkfjakljshdlfkjahsldkfjahlskdfjhaklsjdfhalksjdhflakjshdflakjsdhfklasjhdflaksjhdflaksjdfhlakjshdflakjsdhfklasjhdflaksjhdflaksjdfhlakjshdflakjsdhfklasjhdflaksjhdflaksjdfhljkkwoipqpweoirpoqiwerpoqi1111111111111" + }, + "integrations": { + "All": true + }, + "name": "ApplicationLoaded", + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "anonymizeIp": false, + "eventDeliveryTS": 1657516676962, + "eventFilteringOption": "disable", + "trackingID": "UA-165994240-1" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "dp": "%2Fcampaignmanager%2Fanswer%2F7554821", + "dl": "https://support.google.com/campaignmanager/answer/7554821?zippy=%2Cfields-in-event-snippets-for-counter-tags%2Cstep-add-the-global-snippet-to-every-page-of-your-site%2Cstep-add-the-event-snippet-to-pages-with-events-youre-tracking%2Cfields-in-the-global-snippet%2Cfields-in-the-event-snippet---overview%2Cfields-in-all-event-snippets%2Cexample-event-snippet-for-counter---standard-activities%2Cexample-event-snippet-for-counter---unique-activities%2Cexample-event-snippet-for-counter---per-session-activities%2Cfields-in-event-snippets-for-sales-tags%2Cexample-event-snippet-for-sales---transaction-activities%2Cexample-event-snippet-for-sales---items-sold-activities%2Ccustom-fields%2Cnoscript-section-of-event-snippets%2Cdo-i-need-to-set-up-cache-busting-with-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cstep-add-the-event-snippet-to-pages-with-events-youre-tracking%2Cfields-in-the-global-snippet%2Cfields-in-the-event-snippet---overview%2Cfields-in-all-event-snippets%2Cexample-event-snippet-for-counter---standard-activities%2Cexample-event-snippet-for-counter---unique-activities%2Cexample-event-snippet-for-counter---per-session-activities%2Cfields-in-event-snippets-for-sales-tags%2Cexample-event-snippet-for-sales---transaction-activities%2Cexample-event-snippet-for-sales---items-sold-activities%2Ccustom-fields%2Cnoscript-section-of-event-snippets%2Cdo-i-need-to-set-up-cache-busting-with-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cstep-add-the-event-snippet-to-pages-with-events-youre-tracking%2Cfields-in-the-global-snippet%2Cfields-in-the-event-snippet---overview%2Cfields-in-all-event-snippets%2Cexample-event-snippet-for-counter---standard-activities%2Cexample-event-snippet-for-counter---unique-activities%2Cexample-event-snippet-for-counter---per-session-activities%2Cfields-in-event-snippets-for-sales-tags%2Cexample-event-snippet-for-sales---transaction-activities%2Cexample-event-snippet-for-sales---items-sold-activities%2Ccustom-fields%2Cnoscript-section-of-event-snippets%2Cdo-i-need-to-set-up-cache-busting-with-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-lakjsdlkfjalsdkfjis-the-global-site-tag-placed-in-the-head-lakjsdlkfjalsdkfjis-the-global-site-tag-placed-in-the-head-lakjsdlkfjalsdkfjakljshdlfkjahsldkfjahlskdfjhaklsjdfhalksjdhflakjshdflakjsdhfklasjhdflaksjhdflaksjdfhlakjshdflakjsdhfklasjhdflaksjhdflaksjdfhlakjshdflakjsdhfklasjhdflaksjhdflaksjdfhljkkwoipqpweoirpoqiwerpoqi1111111111111", + "dh": "support.google.com", + "dt": "a", + "dr": "https://google.com/answer/7554821?zippy=%2Cfields-in-event-snippets-for-counter-tags%2Cstep-add-the-global-snippet-to-every-page-of-your-site%2Cstep-add-the-event-snippet-to-pages-with-events-youre-tracking%2Cfields-in-the-global-snippet%2Cfields-in-the-event-snippet---overview%2Cfields-in-all-event-snippets%2Cexample-event-snippet-for-counter---standard-activities%2Cexample-event-snippet-for-counter---unique-activities%2Cexample-event-snippet-for-counter---per-session-activities%2Cfields-in-event-snippets-for-sales-tags%2Cexample-event-snippet-for-sales---transaction-activities%2Cexample-event-snippet-for-sales---items-sold-activities%2Ccustom-fields%2Cnoscript-section-of-event-snippets%2Cdo-i-need-to-set-up-cache-busting-with-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cstep-add-the-event-snippet-to-pages-with-events-youre-tracking%2Cfields-in-the-global-snippet%2Cfields-in-the-event-snippet---overview%2Cfields-in-all-event-snippets%2Cexample-event-snippet-for-counter---standard-activities%2Cexample-event-snippet-for-counter---unique-activities%2Cexample-event-snippet-for-counter---per-session-activities%2Cfields-in-event-snippets-for-sales-tags%2Cexample-event-snippet-for-sales---transaction-activities%2Cexample-event-snippet-for-sales---items-sold-activities%2Ccustom-fields%2Cnoscript-section-of-event-snippets%2Cdo-i-need-to-set-up-cache-busting-with-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cstep-add-the-event-snippet-to-pages-with-events-youre-tracking%2Cfields-in-the-global-snippet%2Cfields-in-the-event-snippet---overview%2Cfields-in-all-event-snippets%2Cexample-event-snippet-for-counter---standard-activities%2Cexample-event-snippet-for-counter---unique-activities%2Cexample-event-snippet-for-counter---per-session-activities%2Cfields-in-event-snippets-for-sales-tags%2Cexample-event-snippet-for-sales---transaction-activities%2Cexample-event-snippet-for-sales---items-sold-activities%2Ccustom-fields%2Cnoscript-section-of-event-snippets%2Cdo-i-need-to-set-up-cache-busting-with-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-tg%2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learns-more-about-the-global-site-tag%2Cwhy-is-the-globalthe-head-when-iframe-and-image-tags-were-placed-in-the-body-placed-of-my-site%2Cwhere-can-i-learn-g2Cwhy-is-the-global-site-tag-placed-in-the-head-when-iframe-and-and-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag%2Cwhy-n-the-head-when-iframe-and-image-tags-were-placed-in-the-body-of-my-site%2Cwhere-can-i-learn-more-about-the-global-site-tag", + "v": "1", + "t": "pageview", + "tid": "UA-165994240-1", + "ds": "web", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "ul": "en-US", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "cid": "00000000000000000000000000", + "uip": "0.0.0.0", + "qt": 124893881701 + }, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } + } +].map((d) => ({ ...d, mockFns })) \ No newline at end of file diff --git a/test/integrations/destinations/ga/router/data.ts b/test/integrations/destinations/ga/router/data.ts index 23ff5bc3d8..f0c2b86377 100644 --- a/test/integrations/destinations/ga/router/data.ts +++ b/test/integrations/destinations/ga/router/data.ts @@ -1,345 +1,487 @@ +export const mockFns = (_) => { + // @ts-ignore + jest + .useFakeTimers() + .setSystemTime(new Date('2023-09-29')); +}; + export const data = [ - { - name: 'ga', - description: 'Test 0', - feature: 'router', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - input: [ - { - message: { - channel: 'web', - context: { - traits: { name: 'Rudder Test' }, - app: { - build: '1.0.0', - name: 'RudderLabs JavaScript SDK', - namespace: 'com.rudderlabs.javascript', - version: '1.0.0', - }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - locale: 'en-US', - ip: '0.0.0.0', - os: { name: '', version: '' }, - screen: { density: 2 }, + { + name: 'ga', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + "message": { + "channel": "web", + "context": { + "traits": { + "name": "Rudder Test" + }, + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "properties": { + "plan": "standard plan", + "name": "rudder test" + }, + "type": "identify", + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "originalTimestamp": "2019-10-14T11:15:18.299Z", + "anonymousId": "00000000000000000000000000", + "userId": "123456", + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + }, + "metadata": { + "jobId": 1 + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "name", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "name", + "to": "contentGroup2" + } + ] + }, + "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" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, 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": "q", + "search": "", + "title": "a", + "url": "https://www.example.com/abc" + }, + "integrations": { + "All": true + }, + "name": "ApplicationLoaded", + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "metadata": { + "jobId": 2 + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ], + destType: 'ga', }, - properties: { plan: 'standard plan', name: 'rudder test' }, - type: 'identify', - messageId: '84e26acc-56a5-4835-8233-591137fca468', - originalTimestamp: '2019-10-14T11:15:18.299Z', - anonymousId: '00000000000000000000000000', - userId: '123456', - integrations: { All: true }, - sentAt: '2019-10-14T09:03:22.563Z', - }, - metadata: { jobId: 1, userId: 'u1' }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'name', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { from: 'name', to: 'dimension1' }, - { from: 'custom2', to: 'dimension2' }, - ], - metrics: [ - { from: 'email', to: 'metric1' }, - { from: 'trait2', to: 'metric2' }, - ], - resetCustomDimensionsOnPage: [ - { resetCustomDimensionsOnPage: 'abc' }, - { resetCustomDimensionsOnPage: 'xyz' }, - ], - contentGroupings: [ - { from: 'plan', to: 'contentGroup1' }, - { from: 'name', to: 'contentGroup2' }, - ], - }, - 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' }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, 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: 'q', - search: '', - title: 'a', - url: 'https://www.example.com/abc', - }, - integrations: { All: true }, - name: 'ApplicationLoaded', - sentAt: '2019-10-14T11:15:53.296Z', - }, - metadata: { jobId: 2, userId: 'u1' }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { from: 'name', to: 'dimension1' }, - { from: 'custom2', to: 'dimension2' }, - ], - metrics: [ - { from: 'email', to: 'metric1' }, - { from: 'trait2', to: 'metric2' }, - ], - resetCustomDimensionsOnPage: [ - { resetCustomDimensionsOnPage: 'abc' }, - { resetCustomDimensionsOnPage: 'xyz' }, - ], - contentGroupings: [ - { from: 'plan', to: 'contentGroup1' }, - { from: 'prop2', to: 'contentGroup2' }, - ], - }, - Enabled: true, - }, - }, - ], - destType: 'ga', - }, - method: 'POST', - }, - }, - output: { - response: { - status: 200, - body: { - output: [ - { - batchedRequest: { - version: '1', - type: 'REST', method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ea: 'action1', - ec: 'Rudder Test', - cd1: 'Rudder Test', - cg2: 'Rudder Test', - v: '1', - t: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - uid: '123456', - cid: '00000000000000000000000000', - ni: 1, - uip: '0.0.0.0', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - ul: 'en-US', - qt: 124893881701, - }, - body: { JSON: {}, XML: {}, JSON_ARRAY: {}, FORM: {} }, - files: {}, - userId: '00000000000000000000000000', - }, - metadata: [{ jobId: 1, userId: 'u1' }], - batched: false, - statusCode: 200, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'name', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { from: 'name', to: 'dimension1' }, - { from: 'custom2', to: 'dimension2' }, - ], - metrics: [ - { from: 'email', to: 'metric1' }, - { from: 'trait2', to: 'metric2' }, - ], - resetCustomDimensionsOnPage: [ - { resetCustomDimensionsOnPage: 'abc' }, - { resetCustomDimensionsOnPage: 'xyz' }, - ], - contentGroupings: [ - { from: 'plan', to: 'contentGroup1' }, - { from: 'name', to: 'contentGroup2' }, - ], - }, - Enabled: true, - }, }, - { - batchedRequest: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - v: '1', - t: 'pageview', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - uip: '0.0.0.0', - ul: 'en-US', - dh: 'www.example.com', - dl: 'https://www.example.com/abc', - dp: '%2Fabc', - dr: 'q', - dt: 'a', - qt: 124893881701, - }, - body: { JSON: {}, XML: {}, JSON_ARRAY: {}, FORM: {} }, - files: {}, - userId: '00000000000000000000000000', - }, - metadata: [{ jobId: 2, userId: 'u1' }], - batched: false, - statusCode: 200, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { from: 'name', to: 'dimension1' }, - { from: 'custom2', to: 'dimension2' }, - ], - metrics: [ - { from: 'email', to: 'metric1' }, - { from: 'trait2', to: 'metric2' }, - ], - resetCustomDimensionsOnPage: [ - { resetCustomDimensionsOnPage: 'abc' }, - { resetCustomDimensionsOnPage: 'xyz' }, - ], - contentGroupings: [ - { from: 'plan', to: 'contentGroup1' }, - { from: 'prop2', to: 'contentGroup2' }, - ], + }, + output: { + response: { + status: 200, + body: { + output: [ + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ea": "action1", + "ec": "Rudder Test", + "cd1": "Rudder Test", + "cg2": "Rudder Test", + "v": "1", + "t": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "uid": "123456", + "cid": "00000000000000000000000000", + "ni": 1, + "uip": "0.0.0.0", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "ul": "en-US", + "qt": 124893881701, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "metadata": [ + { + "jobId": 1 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "name", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "name", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + }, + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "v": "1", + "t": "pageview", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "uip": "0.0.0.0", + "ul": "en-US", + "dh": "www.example.com", + "dl": "https://www.example.com/abc", + "dp": "%2Fabc", + "dr": "q", + "dt": "a", + "qt": 124893881701, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "metadata": [ + { + "jobId": 2 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ], }, - Enabled: true, - }, }, - ], }, - }, - }, - }, -]; + } +].map((d) => ({ ...d, mockFns })); diff --git a/test/integrations/destinations/ga360/processor/data.ts b/test/integrations/destinations/ga360/processor/data.ts index 40b3495062..4ed196d8c5 100644 --- a/test/integrations/destinations/ga360/processor/data.ts +++ b/test/integrations/destinations/ga360/processor/data.ts @@ -1,9507 +1,9456 @@ export const mockFns = (_) => { - // @ts-ignore - jest.useFakeTimers().setSystemTime(new Date('2023-09-29')); + // @ts-ignore + jest + .useFakeTimers() + .setSystemTime(new Date('2023-09-29')); }; export const data = [ - { - name: 'ga360', - description: 'Test 0', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - channel: 'web', - context: { - traits: { - name: 'Rudder Test', - }, - app: { - build: '1.0.0', - name: 'RudderLabs JavaScript SDK', - namespace: 'com.rudderlabs.javascript', - version: '1.0.0', - }, - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.0.0', - }, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - locale: 'en-US', - ip: '0.0.0.0', - os: { - name: '', - version: '', - }, - screen: { - density: 2, - }, - }, - properties: { - plan: 'standard plan', - name: 'rudder test', - }, - type: 'identify', - messageId: '84e26acc-56a5-4835-8233-591137fca468', - originalTimestamp: '2019-10-14T09:03:17.562Z', - anonymousId: '00000000000000000000000000', - userId: '123456', - integrations: { - All: true, - }, - sentAt: '2019-10-14T09:03:22.563Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'name', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'name', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, + { + "name": "ga360", + "description": "Test 0", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "traits": { + "name": "Rudder Test" + }, + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "properties": { + "plan": "standard plan", + "name": "rudder test" + }, + "type": "identify", + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "anonymousId": "00000000000000000000000000", + "userId": "123456", + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "name", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "name", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ea": "action1", + "ec": "Rudder Test", + "cd1": "Rudder Test", + "cg2": "Rudder Test", + "v": "1", + "t": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "uid": "123456", + "cid": "00000000000000000000000000", + "ni": 1, + "uip": "0.0.0.0", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "ul": "en-US", + "qt": 124901802438 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ea: 'action1', - ec: 'Rudder Test', - cd1: 'Rudder Test', - cg2: 'Rudder Test', - v: '1', - t: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - uid: '123456', - cid: '00000000000000000000000000', - ni: 1, - uip: '0.0.0.0', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - ul: 'en-US', - qt: 124901802438, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, + { + "name": "ga360", + "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": "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", + "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": "q", + "search": "", + "title": "a", + "url": "https://www.example.com/abc" + }, + "integrations": { + "All": true + }, + "name": "ApplicationLoaded", + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "v": "1", + "t": "pageview", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "uip": "0.0.0.0", + "ul": "en-US", + "dh": "www.example.com", + "dl": "https://www.example.com/abc", + "dp": "%2Fabc", + "dr": "q", + "dt": "a", + "qt": 124893881701, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - }, - { - name: 'ga360', - 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: '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', - 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: 'q', - search: '', - title: 'a', - url: 'https://www.example.com/abc', - }, - integrations: { - All: true, - }, - name: 'ApplicationLoaded', - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, + { + "name": "ga360", + "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": "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "test track event GA3", + "properties": { + "category": "test-category", + "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-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ec": "test-category", + "ni": 1, + "v": "1", + "el": "event", + "t": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "ea": "test track event GA3", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "ul": "en-US", + "qt": 124893881700, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - v: '1', - t: 'pageview', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - uip: '0.0.0.0', - ul: 'en-US', - dh: 'www.example.com', - dl: 'https://www.example.com/abc', - dp: '%2Fabc', - dr: 'q', - dt: 'a', - qt: 124893881701, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, + { + "name": "ga360", + "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" + }, + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "order completed", + "properties": { + "order_id": "rudderstackorder1", + "total": 99.99, + "shipping": 13.99, + "tax": 20.99, + "currency": "INR", + "products": [ + { + "quantity": 1, + "price": 24.75, + "name": "my product", + "sku": "p-298" + }, + { + "quantity": 3, + "price": 24.75, + "name": "other product", + "sku": "p-299" + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "pa": "purchase", + "tr": 99.99, + "ev": 100, + "pr1id": "p-298", + "pr1cd1": "my product", + "pr1nm": "my product", + "pr1pr": 24.75, + "pr2id": "p-299", + "pr2cd1": "other product", + "pr2nm": "other product", + "pr2pr": 24.75, + "ea": "order completed", + "ec": "EnhancedEcommerce", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "ti": "rudderstackorder1", + "ts": 13.99, + "tt": 20.99, + "cu": "INR", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "ni": 1, + "pr1qt": 1, + "pr2qt": 3, + "ul": "en-US", + "qt": 124893881700, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - }, - { - name: 'ga360', - 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: '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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'test track event GA3', - properties: { - category: 'test-category', - 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-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, + { + "name": "ga360", + "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": { + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "product added", + "properties": { + "currency": "CAD", + "quantity": 1, + "price": 24.75, + "name": "my product 1", + "category": "cat 1", + "sku": "p-298", + "testDimension": true, + "testMetric": true, + "position": 4.5 + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ea": "product added", + "ec": "cat 1", + "pa": "add", + "pr1cd1": "my product 1", + "pr1id": "p-298", + "cd1": "my product 1", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "pr1nm": "my product 1", + "pr1ca": "cat 1", + "cu": "CAD", + "pr1ps": 4.5, + "pr1pr": 24.75, + "pr1qt": 1, + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "ni": 1, + "ul": "en-US", + "qt": 124893881700, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ec: 'test-category', - ni: 1, - v: '1', - el: 'event', - t: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - ea: 'test track event GA3', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - ul: 'en-US', - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, + { + "name": "ga360", + "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": "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "product removed", + "properties": { + "currency": "CAD", + "quantity": 1, + "price": 24.75, + "name": "my product 1", + "category": "cat 1", + "sku": "p-298", + "testDimension": true, + "testMetric": true, + "position": 4.5 + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ea": "product removed", + "ec": "cat 1", + "pa": "remove", + "pr1cd1": "my product 1", + "pr1id": "p-298", + "cd1": "my product 1", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "pr1nm": "my product 1", + "pr1ca": "cat 1", + "cu": "CAD", + "pr1ps": 4.5, + "pr1pr": 24.75, + "pr1qt": 1, + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "ul": "en-US", + "ni": 1, + "qt": 124893881700, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - }, - { - name: 'ga360', - 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', - }, - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'order completed', - properties: { - order_id: 'rudderstackorder1', - total: 99.99, - shipping: 13.99, - tax: 20.99, - currency: 'INR', - products: [ - { - quantity: 1, - price: 24.75, - name: 'my product', - sku: 'p-298', - }, - { - quantity: 3, - price: 24.75, - name: 'other product', - sku: 'p-299', - }, - ], - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, + { + "name": "ga360", + "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": "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "product viewed", + "properties": { + "currency": "CAD", + "quantity": 1, + "price": 24.75, + "name": "my product 1", + "category": "cat 1", + "sku": "p-298", + "testDimension": true, + "testMetric": true, + "position": 4.5 + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ea": "product viewed", + "ec": "cat 1", + "pa": "detail", + "pr1cd1": "my product 1", + "pr1id": "p-298", + "cd1": "my product 1", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "pr1nm": "my product 1", + "pr1ca": "cat 1", + "cu": "CAD", + "pr1ps": 4.5, + "pr1pr": 24.75, + "pr1qt": 1, + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "ul": "en-US", + "ni": 1, + "qt": 124893881700, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - pa: 'purchase', - tr: 99.99, - ev: 100, - pr1id: 'p-298', - pr1cd1: 'my product', - pr1nm: 'my product', - pr1pr: 24.75, - pr2id: 'p-299', - pr2cd1: 'other product', - pr2nm: 'other product', - pr2pr: 24.75, - ea: 'order completed', - ec: 'EnhancedEcommerce', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - ti: 'rudderstackorder1', - ts: 13.99, - tt: 20.99, - cu: 'INR', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - ni: 1, - pr1qt: 1, - pr2qt: 3, - ul: 'en-US', - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, + { + "name": "ga360", + "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": "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "product removed", + "properties": { + "currency": "CAD", + "quantity": 1, + "price": 24.75, + "name": "my product 1", + "category": "cat 1", + "sku": "p-298", + "testDimension": true, + "testMetric": true, + "position": 4.5 + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ea": "product removed", + "ec": "cat 1", + "pa": "remove", + "pr1cd1": "my product 1", + "pr1id": "p-298", + "cd1": "my product 1", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "pr1nm": "my product 1", + "pr1ca": "cat 1", + "cu": "CAD", + "pr1ps": 4.5, + "pr1pr": 24.75, + "pr1qt": 1, + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "ul": "en-US", + "ni": 1, + "qt": 124893881700, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - }, - { - name: 'ga360', - 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: { - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'product added', - properties: { - currency: 'CAD', - quantity: 1, - price: 24.75, - name: 'my product 1', - category: 'cat 1', - sku: 'p-298', - testDimension: true, - testMetric: true, - position: 4.5, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, + { + "name": "ga360", + "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" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; 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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "product viewed", + "properties": { + "currency": "CAD", + "quantity": 1, + "price": 24.75, + "name": "my product 1", + "category": "cat 1", + "sku": "p-298", + "testDimension": true, + "testMetric": true, + "position": 4.5 + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ea": "product viewed", + "ec": "cat 1", + "pa": "detail", + "pr1cd1": "my product 1", + "pr1id": "p-298", + "cd1": "my product 1", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "pr1nm": "my product 1", + "pr1ca": "cat 1", + "cu": "CAD", + "pr1ps": 4.5, + "pr1pr": 24.75, + "pr1qt": 1, + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "ul": "en-US", + "ni": 1, + "qt": 124893881700, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ea: 'product added', - ec: 'cat 1', - pa: 'add', - pr1cd1: 'my product 1', - pr1id: 'p-298', - cd1: 'my product 1', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - pr1nm: 'my product 1', - pr1ca: 'cat 1', - cu: 'CAD', - pr1ps: 4.5, - pr1pr: 24.75, - pr1qt: 1, - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - ni: 1, - ul: 'en-US', - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, + { + "name": "ga360", + "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" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; 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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "product list filtered", + "properties": { + "category": "cat 1", + "list_id": "1234", + "filters": [ + { + "type": "department", + "value": "beauty" + }, + { + "type": "price", + "value": "under" + } + ], + "sorts": [ + { + "type": "price", + "value": "desc" + } + ], + "products": [ + { + "product_id": "507f1f77bcf86cd799439011", + "productDimension": "My Product Dimension", + "productMetric": "My Product Metric" + } + ], + "testDimension": true, + "testMetric": true + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ea": "product list filtered", + "ec": "cat 1", + "pa": "detail", + "il1pi1id": "507f1f77bcf86cd799439011", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "il1nm": "1234", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "cid": "00000000000000000000000000", + "uid": "12345", + "il1pi1qt": 1, + "il1pi1va": "department:beauty,price:under::price:desc", + "ul": "en-US", + "ni": 1, + "qt": 124893881700, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - }, - { - name: 'ga360', - 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: '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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'product removed', - properties: { - currency: 'CAD', - quantity: 1, - price: 24.75, - name: 'my product 1', - category: 'cat 1', - sku: 'p-298', - testDimension: true, - testMetric: true, - position: 4.5, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, + { + "name": "ga360", + "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" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; 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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "product list viewed", + "properties": { + "category": "cat 1", + "list_id": "1234", + "filters": [ + { + "type": "department", + "value": "beauty" + }, + { + "type": "price", + "value": "under" + } + ], + "sorts": [ + { + "type": "price", + "value": "desc" + } + ], + "products": [ + { + "product_id": "507f1f77bcf86cd799439011", + "productDimension": "My Product Dimension", + "productMetric": "My Product Metric", + "position": 10 + }, + { + "product_id": "507f1f77bcf86cdef799439011", + "productDimension": "My Product Dimension1", + "productMetric": "My Product Metric1", + "position": -10 + } + ], + "testDimension": true, + "testMetric": true + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ea": "product list viewed", + "ec": "cat 1", + "pa": "detail", + "il1pi1id": "507f1f77bcf86cd799439011", + "il1pi1ps": 10, + "il1pi2id": "507f1f77bcf86cdef799439011", + "il1pi2ps": -10, + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "il1nm": "1234", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "cid": "00000000000000000000000000", + "uid": "12345", + "il1pi1qt": 1, + "il1pi1va": "department:beauty,price:under::price:desc", + "il1pi2qt": 1, + "il1pi2va": "department:beauty,price:under::price:desc", + "ul": "en-US", + "ni": 1, + "qt": 124893881700, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ea: 'product removed', - ec: 'cat 1', - pa: 'remove', - pr1cd1: 'my product 1', - pr1id: 'p-298', - cd1: 'my product 1', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - pr1nm: 'my product 1', - pr1ca: 'cat 1', - cu: 'CAD', - pr1ps: 4.5, - pr1pr: 24.75, - pr1qt: 1, - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - ul: 'en-US', - ni: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, + { + "name": "ga360", + "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": { + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "product clicked", + "properties": { + "currency": "CAD", + "quantity": 1, + "price": 24.75, + "name": "my product", + "category": "cat 1", + "sku": "p-298", + "list": "search results", + "testDimension": true, + "testMetric": true + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ea": "product clicked", + "ec": "cat 1", + "pa": "click", + "pr1cd1": "my product", + "pr1id": "p-298", + "cd1": "my product", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "pr1nm": "my product", + "pr1ca": "cat 1", + "cu": "CAD", + "pr1pr": 24.75, + "pr1qt": 1, + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "pal": "search results", + "ul": "en-US", + "ni": 1, + "qt": 124893881700, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - }, - { - name: 'ga360', - 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: '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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'product viewed', - properties: { - currency: 'CAD', - quantity: 1, - price: 24.75, - name: 'my product 1', - category: 'cat 1', - sku: 'p-298', - testDimension: true, - testMetric: true, - position: 4.5, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, + { + "name": "ga360", + "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" + }, + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "promotion viewed", + "properties": { + "currency": "CAD", + "promotion_id": "PROMO_1234", + "name": "my product", + "creative": "summer_banner2", + "position": "banner_slot1", + "testDimension": true, + "testMetric": true + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ea": "promotion viewed", + "ec": "EnhancedEcommerce", + "cu": "CAD", + "promoa": "view", + "pa": "view", + "cd1": "my product", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "promo1id": "PROMO_1234", + "promo1cr": "summer_banner2", + "promo1ps": "banner_slot1", + "promo1nm": "my product", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "ul": "en-US", + "ni": 1, + "qt": 124893881700, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ea: 'product viewed', - ec: 'cat 1', - pa: 'detail', - pr1cd1: 'my product 1', - pr1id: 'p-298', - cd1: 'my product 1', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - pr1nm: 'my product 1', - pr1ca: 'cat 1', - cu: 'CAD', - pr1ps: 4.5, - pr1pr: 24.75, - pr1qt: 1, - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - ul: 'en-US', - ni: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, + { + "name": "ga360", + "description": "Test 13", + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "promotion clicked", + "properties": { + "currency": "CAD", + "promotion_id": "PROMO_1234", + "name": "my product", + "creative": "summer_banner2", + "position": "banner_slot1", + "testDimension": true, + "testMetric": true + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ea": "promotion clicked", + "ec": "EnhancedEcommerce", + "cu": "CAD", + "promoa": "promo_click", + "pa": "promo_click", + "cd1": "my product", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "promo1id": "PROMO_1234", + "promo1cr": "summer_banner2", + "promo1ps": "banner_slot1", + "promo1nm": "my product", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "ul": "en-US", + "ni": 1, + "qt": 124893881700, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - }, - { - name: 'ga360', - 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: '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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'product removed', - properties: { - currency: 'CAD', - quantity: 1, - price: 24.75, - name: 'my product 1', - category: 'cat 1', - sku: 'p-298', - testDimension: true, - testMetric: true, - position: 4.5, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, + { + "name": "ga360", + "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": { + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "checkout started", + "properties": { + "currency": "CAD", + "products": [ + { + "quantity": 1, + "price": 24.75, + "name": "my product", + "sku": "p-298" + }, + { + "quantity": 1, + "price": 24.75, + "name": "my product 2", + "sku": "p-299" + } + ], + "step": 1, + "paymentMethod": "Visa", + "testDimension": true, + "testMetric": true + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "pa": "checkout", + "pr1id": "p-298", + "pr1cd1": "my product", + "pr1nm": "my product", + "pr1pr": 24.75, + "pr2id": "p-299", + "pr2cd1": "my product 2", + "pr2nm": "my product 2", + "pr2pr": 24.75, + "ea": "checkout started", + "ec": "EnhancedEcommerce", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "cu": "CAD", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "cos": 1, + "pr1qt": 1, + "pr2qt": 1, + "ul": "en-US", + "ni": 1, + "qt": 124893881700, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ea: 'product removed', - ec: 'cat 1', - pa: 'remove', - pr1cd1: 'my product 1', - pr1id: 'p-298', - cd1: 'my product 1', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - pr1nm: 'my product 1', - pr1ca: 'cat 1', - cu: 'CAD', - pr1ps: 4.5, - pr1pr: 24.75, - pr1qt: 1, - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - ul: 'en-US', - ni: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, + { + "name": "ga360", + "description": "Test 15", + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "order updated", + "properties": { + "currency": "CAD", + "products": [ + { + "quantity": 1, + "price": 24.75, + "name": "my product", + "sku": "p-298" + }, + { + "quantity": 1, + "price": 24.75, + "name": "my product 2", + "sku": "p-299" + } + ], + "step": 1, + "paymentMethod": "Visa", + "testDimension": true, + "testMetric": true + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "pa": "checkout", + "pr1id": "p-298", + "pr1cd1": "my product", + "pr1nm": "my product", + "pr1pr": 24.75, + "pr2id": "p-299", + "pr2cd1": "my product 2", + "pr2nm": "my product 2", + "pr2pr": 24.75, + "ea": "order updated", + "ec": "EnhancedEcommerce", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "cu": "CAD", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "cos": 1, + "pr1qt": 1, + "pr2qt": 1, + "ul": "en-US", + "ni": 1, + "qt": 124893881700, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - }, - { - name: 'ga360', - 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', - }, - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.0.0', - }, - userAgent: - 'Mozilla/5.0 (Macintosh; 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'product viewed', - properties: { - currency: 'CAD', - quantity: 1, - price: 24.75, - name: 'my product 1', - category: 'cat 1', - sku: 'p-298', - testDimension: true, - testMetric: true, - position: 4.5, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, + { + "name": "ga360", + "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.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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "checkout step viewed", + "properties": { + "currency": "CAD", + "step": 1 + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "pa": "checkout", + "ea": "checkout step viewed", + "ec": "EnhancedEcommerce", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "cos": 1, + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "ul": "en-US", + "ni": 1, + "qt": 124893881700, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ea: 'product viewed', - ec: 'cat 1', - pa: 'detail', - pr1cd1: 'my product 1', - pr1id: 'p-298', - cd1: 'my product 1', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - pr1nm: 'my product 1', - pr1ca: 'cat 1', - cu: 'CAD', - pr1ps: 4.5, - pr1pr: 24.75, - pr1qt: 1, - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - ul: 'en-US', - ni: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, + { + "name": "ga360", + "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.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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "checkout step completed", + "properties": { + "currency": "CAD", + "step": 1, + "paymentMethod": "Visa" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "pa": "checkout_option", + "ea": "checkout step completed", + "ec": "EnhancedEcommerce", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "cos": 1, + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "ul": "en-US", + "ni": 1, + "qt": 124893881700, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - }, - { - name: 'ga360', - 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', - }, - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.0.0', - }, - userAgent: - 'Mozilla/5.0 (Macintosh; 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'product list filtered', - properties: { - category: 'cat 1', - list_id: '1234', - filters: [ - { - type: 'department', - value: 'beauty', - }, - { - type: 'price', - value: 'under', - }, - ], - sorts: [ - { - type: 'price', - value: 'desc', - }, - ], - products: [ - { - product_id: '507f1f77bcf86cd799439011', - productDimension: 'My Product Dimension', - productMetric: 'My Product Metric', - }, - ], - testDimension: true, - testMetric: true, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, + { + "name": "ga360", + "description": "Test 18", + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "order refunded", + "properties": { + "products": [ + { + "quantity": 1, + "sku": "p-298" + }, + { + "quantity": 1, + "sku": "p-299" + } + ], + "testDimension": true, + "testMetric": true + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ni": 1, + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "ea": "order refunded", + "ec": "EnhancedEcommerce", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "pa": "refund", + "pr1id": "p-298", + "pr1qt": 1, + "pr2id": "p-299", + "ul": "en-US", + "pr2qt": 1, + "qt": 124893881700, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ea: 'product list filtered', - ec: 'cat 1', - pa: 'detail', - il1pi1id: '507f1f77bcf86cd799439011', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - il1nm: '1234', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - cid: '00000000000000000000000000', - uid: '12345', - il1pi1qt: 1, - il1pi1va: 'department:beauty,price:under::price:desc', - ul: 'en-US', - ni: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, + { + "name": "ga360", + "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.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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "order starterefundedd", + "properties": { + "products": [ + { + "quantity": 1, + "sku": "p-298" + }, + { + "quantity": 1, + "sku": "p-299" + } + ], + "testDimension": true, + "testMetric": true + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ul": "en-US", + "ec": "All", + "ni": 1, + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "ea": "order starterefundedd", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "qt": 124893881700, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - }, - { - name: 'ga360', - 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', - }, - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.0.0', - }, - userAgent: - 'Mozilla/5.0 (Macintosh; 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'product list viewed', - properties: { - category: 'cat 1', - list_id: '1234', - filters: [ - { - type: 'department', - value: 'beauty', - }, - { - type: 'price', - value: 'under', - }, - ], - sorts: [ - { - type: 'price', - value: 'desc', - }, - ], - products: [ - { - product_id: '507f1f77bcf86cd799439011', - productDimension: 'My Product Dimension', - productMetric: 'My Product Metric', - position: 10, - }, - { - product_id: '507f1f77bcf86cdef799439011', - productDimension: 'My Product Dimension1', - productMetric: 'My Product Metric1', - position: -10, - }, - ], - testDimension: true, - testMetric: true, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, + { + "name": "ga360", + "description": "Test 20", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "order starterefundedd", + "properties": { + "products": [ + { + "quantity": 1, + "sku": "p-298" + }, + { + "quantity": 1, + "sku": "p-299" + } + ], + "testDimension": true, + "testMetric": true + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ul": "en-US", + "ec": "All", + "ni": 1, + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "ea": "order starterefundedd", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "qt": 124893881700, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ea: 'product list viewed', - ec: 'cat 1', - pa: 'detail', - il1pi1id: '507f1f77bcf86cd799439011', - il1pi1ps: 10, - il1pi2id: '507f1f77bcf86cdef799439011', - il1pi2ps: -10, - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - il1nm: '1234', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - cid: '00000000000000000000000000', - uid: '12345', - il1pi1qt: 1, - il1pi1va: 'department:beauty,price:under::price:desc', - il1pi2qt: 1, - il1pi2va: 'department:beauty,price:under::price:desc', - ul: 'en-US', - ni: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, + { + "name": "ga360", + "description": "Test 21", + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "order starterefundedd", + "properties": { + "products": [ + { + "quantity": 1, + "sku": "p-298" + }, + { + "quantity": 1, + "sku": "p-299" + } + ], + "testDimension": true, + "testMetric": true + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ul": "en-US", + "ec": "All", + "ni": 1, + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "aip": 1, + "cid": "00000000000000000000000000", + "ea": "order starterefundedd", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "qt": 124893881700, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - }, - { - name: 'ga360', - 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: { - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'product clicked', - properties: { - currency: 'CAD', - quantity: 1, - price: 24.75, - name: 'my product', - category: 'cat 1', - sku: 'p-298', - list: 'search results', - testDimension: true, - testMetric: true, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, + { + "name": "ga360", + "description": "Test 22", + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "order starterefundedd", + "properties": { + "products": [ + { + "quantity": 1, + "sku": "p-298" + }, + { + "quantity": 1, + "sku": "p-299" + } + ], + "testDimension": true, + "testMetric": true + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ul": "en-US", + "ec": "All", + "ni": 1, + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "cid": "00000000000000000000000000", + "ea": "order starterefundedd", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "qt": 124893881700, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ea: 'product clicked', - ec: 'cat 1', - pa: 'click', - pr1cd1: 'my product', - pr1id: 'p-298', - cd1: 'my product', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - pr1nm: 'my product', - pr1ca: 'cat 1', - cu: 'CAD', - pr1pr: 24.75, - pr1qt: 1, - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - pal: 'search results', - ul: 'en-US', - ni: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, + { + "name": "ga360", + "description": "Test 23", + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "order starterefundedd", + "properties": { + "products": [ + { + "quantity": 1, + "sku": "p-298" + }, + { + "quantity": 1, + "sku": "p-299" + } + ], + "testDimension": true, + "testMetric": true + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ul": "en-US", + "ec": "All", + "ni": 1, + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "ea": "order starterefundedd", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "qt": 124893881700, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - }, - { - name: 'ga360', - 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', - }, - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'promotion viewed', - properties: { - currency: 'CAD', - promotion_id: 'PROMO_1234', - name: 'my product', - creative: 'summer_banner2', - position: 'banner_slot1', - testDimension: true, - testMetric: true, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, + { + "name": "ga360", + "description": "Test 24", + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "linkid test", + "properties": { + "linkid": "abc123", + "testDimension": true, + "testMetric": true + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ul": "en-US", + "ec": "All", + "ni": 1, + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "linkid": "abc123", + "cid": "00000000000000000000000000", + "ea": "linkid test", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "qt": 124893881700, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ea: 'promotion viewed', - ec: 'EnhancedEcommerce', - cu: 'CAD', - promoa: 'view', - pa: 'view', - cd1: 'my product', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - promo1id: 'PROMO_1234', - promo1cr: 'summer_banner2', - promo1ps: 'banner_slot1', - promo1nm: 'my product', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - ul: 'en-US', - ni: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, + { + "name": "ga360", + "description": "Test 25", + "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 + }, + "campaign": { + "name": "sampleName", + "source": "sampleSource", + "medium": "sampleMedium", + "content": "sampleContent", + "term": "sampleTerm" + } + }, + "type": "track", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "campaign test", + "properties": { + "testDimension": true, + "testMetric": true + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ul": "en-US", + "ec": "All", + "ni": 1, + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "cn": "sampleName", + "cs": "sampleSource", + "cm": "sampleMedium", + "cc": "sampleContent", + "ck": "sampleTerm", + "cid": "00000000000000000000000000", + "ea": "campaign test", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "qt": 124893881700, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - }, - { - name: 'ga360', - description: 'Test 13', - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'promotion clicked', - properties: { - currency: 'CAD', - promotion_id: 'PROMO_1234', - name: 'my product', - creative: 'summer_banner2', - position: 'banner_slot1', - testDimension: true, - testMetric: true, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, + { + "name": "ga360", + "description": "Test 26", + "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 + }, + "campaign": { + "name": "sampleName", + "source": "sampleSource", + "medium": "sampleMedium", + "content": "sampleContent", + "term": "sampleTerm" + } + }, + "type": "track", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "event": "campaign test", + "properties": { + "testDimension": true, + "testMetric": true + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ul": "en-US", + "ec": "All", + "ni": 1, + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "cn": "sampleName", + "cs": "sampleSource", + "cm": "sampleMedium", + "cc": "sampleContent", + "ck": "sampleTerm", + "cid": "00000000000000000000000000", + "ea": "campaign test", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "qt": 124893881700, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ea: 'promotion clicked', - ec: 'EnhancedEcommerce', - cu: 'CAD', - promoa: 'promo_click', - pa: 'promo_click', - cd1: 'my product', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - promo1id: 'PROMO_1234', - promo1cr: 'summer_banner2', - promo1ps: 'banner_slot1', - promo1nm: 'my product', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - ul: 'en-US', - ni: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, + { + "name": "ga360", + "description": "Test 27", + "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 + }, + "campaign": { + "name": "sampleName", + "source": "sampleSource", + "medium": "sampleMedium", + "content": "sampleContent", + "term": "sampleTerm" + } + }, + "type": "track", + "messageId": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "originalTimestamp": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "event": "campaign test", + "properties": { + "testDimension": true, + "testMetric": true + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ul": "en-US", + "ec": "All", + "ni": 1, + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "cn": "sampleName", + "cs": "sampleSource", + "cm": "sampleMedium", + "cc": "sampleContent", + "ck": "sampleTerm", + "cid": "00000000000000000000000000", + "ea": "campaign test", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "qt": 124893881700, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - }, - { - name: 'ga360', - 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: { - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'checkout started', - properties: { - currency: 'CAD', - products: [ - { - quantity: 1, - price: 24.75, - name: 'my product', - sku: 'p-298', - }, - { - quantity: 1, - price: 24.75, - name: 'my product 2', - sku: 'p-299', - }, - ], - step: 1, - paymentMethod: 'Visa', - testDimension: true, - testMetric: true, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, + { + "name": "ga360", + "description": "Test 28", + "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.2" + }, + "traits": { + "abc": "1234" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.2" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36", + "locale": "en-GB", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + }, + "page": { + "path": "/tests/html/ecomm_test.html", + "referrer": "http://0.0.0.0:1112/tests/html/", + "search": "", + "title": "GA Ecommerce Test", + "url": "http://0.0.0.0:1112/tests/html/ecomm_test.html" + } + }, + "type": "identify", + "messageId": "bc8a6af8-37fd-46a9-9592-ea29a256435f", + "originalTimestamp": "2020-06-22T11:30:32.493Z", + "anonymousId": "38e169a1-3234-46f7-9ceb-c1a6a69005fe", + "userId": "123", + "integrations": { + "All": true + }, + "sentAt": "2020-06-22T11:30:32.494Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ea": "User Enriched", + "dt": "GA Ecommerce Test", + "ec": "All", + "v": "1", + "t": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.1.2", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "uid": "123", + "cid": "38e169a1-3234-46f7-9ceb-c1a6a69005fe", + "ni": 1, + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36", + "ul": "en-GB", + "qt": 103120167507, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "38e169a1-3234-46f7-9ceb-c1a6a69005fe" + }, + "statusCode": 200 + } + ] + } + } }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - pa: 'checkout', - pr1id: 'p-298', - pr1cd1: 'my product', - pr1nm: 'my product', - pr1pr: 24.75, - pr2id: 'p-299', - pr2cd1: 'my product 2', - pr2nm: 'my product 2', - pr2pr: 24.75, - ea: 'checkout started', - ec: 'EnhancedEcommerce', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - cu: 'CAD', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - cos: 1, - pr1qt: 1, - pr2qt: 1, - ul: 'en-US', - ni: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, + { + "name": "ga360", + "description": "Test 29", + "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", + "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", + "integrations": { + "All": true + }, + "name": "ApplicationLoaded", + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "v": "1", + "t": "pageview", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "ul": "en-US", + "uip": "0.0.0.0", + "qt": 124893881701, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - }, - { - name: 'ga360', - description: 'Test 15', - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'order updated', - properties: { - currency: 'CAD', - products: [ - { - quantity: 1, - price: 24.75, - name: 'my product', - sku: 'p-298', - }, - { - quantity: 1, - price: 24.75, - name: 'my product 2', - sku: 'p-299', - }, - ], - step: 1, - paymentMethod: 'Visa', - testDimension: true, - testMetric: true, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, + { + "name": "ga360", + "description": "Test 30", + "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", + "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": "?xyz=1", + "title": "", + "url": "https://www.example.com/abc" + }, + "integrations": { + "All": true + }, + "name": "ApplicationLoaded", + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "v": "1", + "t": "pageview", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "ul": "en-US", + "uip": "0.0.0.0", + "dh": "www.example.com", + "dl": "https://www.example.com/abc", + "dp": "%2Fabc%3Fxyz%3D1", + "qt": 124893881701, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - pa: 'checkout', - pr1id: 'p-298', - pr1cd1: 'my product', - pr1nm: 'my product', - pr1pr: 24.75, - pr2id: 'p-299', - pr2cd1: 'my product 2', - pr2nm: 'my product 2', - pr2pr: 24.75, - ea: 'order updated', - ec: 'EnhancedEcommerce', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - cu: 'CAD', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - cos: 1, - pr1qt: 1, - pr2qt: 1, - ul: 'en-US', - ni: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, + { + "name": "ga360", + "description": "Test 31", + "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", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "type": "track", + "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", + "originalTimestamp": "2019-10-14T11:15:18.299Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "integrations": { + "All": true + }, + "event": "sample event", + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ec": "All", + "ni": 1, + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "ea": "sample event", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "ul": "en-US", + "uip": "0.0.0.0", + "qt": 124893881701, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - }, - { - name: 'ga360', - 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.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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'checkout step viewed', - properties: { - currency: 'CAD', - step: 1, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, + { + "name": "ga360", + "description": "Test 32", + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "Order Refunded", + "properties": { + "order_id": "rudderstackorder1", + "total": 99.99, + "shipping": 13.99, + "tax": 20.99, + "currency": "INR", + "products": [ + { + "quantity": 1, + "price": 24.75, + "name": "my product", + "sku": "p-298" + }, + { + "quantity": 3, + "price": 24.75, + "name": "other product", + "sku": "p-299" + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "pa": "refund", + "ev": 100, + "pr1id": "p-298", + "pr1cd1": "my product", + "pr1nm": "my product", + "pr1pr": 24.75, + "pr1qt": 1, + "pr2id": "p-299", + "pr2cd1": "other product", + "pr2nm": "other product", + "pr2pr": 24.75, + "pr2qt": 3, + "ea": "Order Refunded", + "ec": "EnhancedEcommerce", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "cid": "00000000000000000000000000", + "ti": "rudderstackorder1", + "uid": "12345", + "ul": "en-US", + "ni": 1, + "qt": 124893881700, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - pa: 'checkout', - ea: 'checkout step viewed', - ec: 'EnhancedEcommerce', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - cos: 1, - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - ul: 'en-US', - ni: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, + { + "name": "ga360", + "description": "Test 33", + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "Order Refunded", + "properties": { + "order_id": "rudderstackorder1", + "total": 99.99, + "shipping": 13.99, + "tax": 20.99, + "currency": "INR" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ev": 100, + "pa": "refund", + "ti": "rudderstackorder1", + "ea": "Order Refunded", + "ec": "EnhancedEcommerce", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "cid": "00000000000000000000000000", + "uid": "12345", + "ul": "en-US", + "ni": 1, + "qt": 124893881700, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - }, - { - name: 'ga360', - 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.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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'checkout step completed', - properties: { - currency: 'CAD', - step: 1, - paymentMethod: 'Visa', - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, + { + "name": "ga360", + "description": "Test 34", + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "Order Refunded", + "properties": { + "order_id": "rudderstackorder1", + "total": 99.99, + "shipping": 13.99, + "tax": 20.99, + "currency": "INR", + "products": [] + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ev": 100, + "pa": "refund", + "ti": "rudderstackorder1", + "ea": "Order Refunded", + "ec": "EnhancedEcommerce", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "cid": "00000000000000000000000000", + "uid": "12345", + "ul": "en-US", + "ni": 1, + "qt": 124893881700, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - pa: 'checkout_option', - ea: 'checkout step completed', - ec: 'EnhancedEcommerce', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - cos: 1, - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - ul: 'en-US', - ni: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, + { + "name": "ga360", + "description": "Test 35", + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "Order Refunded", + "properties": { + "order_id": "rudderstackorder1", + "total": 99.99, + "shipping": 13.99, + "tax": 20.99, + "currency": "INR", + "products": [ + { + "quantity": 1, + "price": 24.75, + "name": "my product", + "sku": "p-298", + "product_id": "1" + }, + { + "quantity": 3, + "price": 24.75, + "name": "other product", + "sku": "p-299", + "product_id": "2" + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ev": 100, + "pa": "refund", + "pr1id": "1", + "pr1cd1": "my product", + "pr1nm": "my product", + "pr1pr": 24.75, + "pr1qt": 1, + "pr2id": "2", + "pr2cd1": "other product", + "pr2nm": "other product", + "pr2pr": 24.75, + "pr2qt": 3, + "ea": "Order Refunded", + "ec": "EnhancedEcommerce", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "cid": "00000000000000000000000000", + "ti": "rudderstackorder1", + "uid": "12345", + "ul": "en-US", + "ni": 1, + "qt": 124893881700, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - }, - { - name: 'ga360', - description: 'Test 18', - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'order refunded', - properties: { - products: [ - { - quantity: 1, - sku: 'p-298', - }, - { - quantity: 1, - sku: 'p-299', - }, - ], - testDimension: true, - testMetric: true, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, + { + "name": "ga360", + "description": "Test 36", + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "Cart Shared", + "properties": { + "order_id": "rudderstackorder1", + "total": 99.99, + "shipping": 13.99, + "tax": 20.99, + "currency": "INR", + "products": [ + { + "quantity": 1, + "price": 24.75, + "name": "my product", + "sku": "p-298", + "product_id": "1" + }, + { + "quantity": 3, + "price": 24.75, + "name": "other product", + "sku": "p-299", + "product_id": "2" + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ev": 100, + "ea": "Cart Shared", + "ec": "All", + "ni": 1, + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "st": " 1 2", + "ul": "en-US", + "qt": 124893881700, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ni: 1, - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - ea: 'order refunded', - ec: 'EnhancedEcommerce', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - pa: 'refund', - pr1id: 'p-298', - pr1qt: 1, - pr2id: 'p-299', - ul: 'en-US', - pr2qt: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, + { + "name": "ga360", + "description": "Test 37", + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "Product Shared", + "properties": { + "product_id": "rudderstackorder1", + "total": 99.99, + "shipping": 13.99, + "tax": 20.99, + "currency": "INR", + "url": "https://www.example.com/abc" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ev": 100, + "ea": "Product Shared", + "ec": "All", + "ni": 1, + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "st": "https://www.example.com/abc", + "dh": "www.example.com", + "dl": "https://www.example.com/abc", + "dp": "%2Fabc", + "ul": "en-US", + "qt": 124893881700, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - }, - { - name: 'ga360', - 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.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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'order starterefundedd', - properties: { - products: [ - { - quantity: 1, - sku: 'p-298', - }, - { - quantity: 1, - sku: 'p-299', - }, - ], - testDimension: true, - testMetric: true, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, + { + "name": "ga360", + "description": "Test 38", + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "Product List Clicked", + "properties": { + "list_id": "Sample Product List", + "category": "Sample Product List", + "products": [ + { + "quantity": 1, + "price": 24.75, + "name": "my product", + "sku": "p-298", + "product_id": "1" + }, + { + "quantity": 3, + "price": 24.75, + "name": "other product", + "sku": "p-299", + "product_id": "2" + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ea": "Product List Clicked", + "ec": "Sample Product List", + "pa": "click", + "il1pi1id": "1", + "pr1cd1": "my product", + "il1pi1nm": "my product", + "il1pi1pr": 24.75, + "il1pi2id": "2", + "pr2cd1": "other product", + "il1pi2nm": "other product", + "il1pi2pr": 24.75, + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "il1nm": "Sample Product List", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "cid": "00000000000000000000000000", + "uid": "12345", + "ni": 1, + "il1pi2qt": 3, + "il1pi1qt": 1, + "ul": "en-US", + "qt": 124893881700, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ul: 'en-US', - ec: 'All', - ni: 1, - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - ea: 'order starterefundedd', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, + { + "name": "ga360", + "description": "Test 39", + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "Product List Clicked", + "properties": { + "list_id": "Sample Product List", + "category": "Sample Product List", + "products": [ + { + "quantity": 1, + "price": 24.75, + "name": "my product", + "sku": "p-298" + }, + { + "quantity": 3, + "price": 24.75, + "name": "other product", + "sku": "p-299" + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ea": "Product List Clicked", + "ec": "Sample Product List", + "pa": "click", + "il1pi1id": "p-298", + "pr1cd1": "my product", + "il1pi1nm": "my product", + "il1pi1pr": 24.75, + "il1pi2id": "p-299", + "pr2cd1": "other product", + "il1pi2nm": "other product", + "il1pi2pr": 24.75, + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "il1nm": "Sample Product List", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "cid": "00000000000000000000000000", + "uid": "12345", + "ul": "en-US", + "il1pi2qt": 3, + "il1pi1qt": 1, + "ni": 1, + "qt": 124893881700, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - }, - { - name: 'ga360', - description: 'Test 20', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - channel: 'web', - context: { - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'order starterefundedd', - properties: { - products: [ - { - quantity: 1, - sku: 'p-298', - }, - { - quantity: 1, - sku: 'p-299', - }, - ], - testDimension: true, - testMetric: true, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, + { + "name": "ga360", + "description": "Test 40", + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "Product List Clicked", + "properties": { + "list_id": "Sample Product List", + "category": "Sample Product List", + "products": [] + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ni": 1, + "ea": "Product List Clicked", + "ec": "Sample Product List", + "pa": "click", + "el": "event", + "v": "1", + "t": "event", + "tid": "UA-165994240-1", + "ds": "web", + "npa": 1, + "aip": 1, + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "ul": "en-US", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "il1nm": "Sample Product List", + "uid": "12345", + "cid": "00000000000000000000000000", + "qt": 124893881700 + }, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ul: 'en-US', - ec: 'All', - ni: 1, - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - ea: 'order starterefundedd', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, + { + "name": "ga360", + "description": "Test 41", + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "Order Cancelled", + "properties": { + "order_id": "rudderstackorder1", + "total": 99.99, + "shipping": 13.99, + "tax": 20.99, + "currency": "INR", + "products": [ + { + "quantity": 1, + "price": 24.75, + "name": "my product", + "sku": "p-298", + "product_id": "1" + }, + { + "quantity": 3, + "price": 24.75, + "name": "other product", + "sku": "p-299", + "product_id": "2" + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "pa": "refund", + "ev": 100, + "tr": 99.99, + "pr1id": "1", + "pr1cd1": "my product", + "pr1nm": "my product", + "pr1pr": 24.75, + "pr2id": "2", + "pr2cd1": "other product", + "pr2nm": "other product", + "pr2pr": 24.75, + "ea": "Order Cancelled", + "ec": "EnhancedEcommerce", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "ti": "rudderstackorder1", + "ts": 13.99, + "tt": 20.99, + "cu": "INR", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "ul": "en-US", + "pr1qt": 1, + "pr2qt": 3, + "ni": 1, + "qt": 124893881700, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - }, - { - name: 'ga360', - description: 'Test 21', - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'order starterefundedd', - properties: { - products: [ - { - quantity: 1, - sku: 'p-298', - }, - { - quantity: 1, - sku: 'p-299', - }, - ], - testDimension: true, - testMetric: true, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, + { + "name": "ga360", + "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" + }, + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "Order Cancelled", + "properties": { + "order_id": "rudderstackorder1", + "value": 99.99, + "shipping": 13.99, + "tax": 20.99, + "currency": "INR", + "products": [ + { + "quantity": 1, + "price": 24.75, + "name": "my product", + "sku": "p-298", + "product_id": "1" + }, + { + "quantity": 3, + "price": 24.75, + "name": "other product", + "sku": "p-299", + "product_id": "2" + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "pa": "refund", + "tr": 99.99, + "pr1id": "1", + "pr1cd1": "my product", + "pr1nm": "my product", + "pr1pr": 24.75, + "pr2id": "2", + "pr2cd1": "other product", + "pr2nm": "other product", + "pr2pr": 24.75, + "ea": "Order Cancelled", + "ev": 100, + "ec": "EnhancedEcommerce", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "ti": "rudderstackorder1", + "ts": 13.99, + "tt": 20.99, + "cu": "INR", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "ul": "en-US", + "pr1qt": 1, + "pr2qt": 3, + "ni": 1, + "qt": 124893881700, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ul: 'en-US', - ec: 'All', - ni: 1, - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - aip: 1, - cid: '00000000000000000000000000', - ea: 'order starterefundedd', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, + { + "name": "ga360", + "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": "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "Order Cancelled", + "properties": { + "order_id": "rudderstackorder1", + "revenue": 99.99, + "shipping": 13.99, + "tax": 20.99, + "currency": "INR", + "products": [ + { + "quantity": 1, + "price": 24.75, + "name": "my product", + "sku": "p-298", + "product_id": "1" + }, + { + "quantity": 3, + "price": 24.75, + "name": "other product", + "sku": "p-299", + "product_id": "2" + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "pa": "refund", + "tr": 99.99, + "pr1id": "1", + "pr1cd1": "my product", + "pr1nm": "my product", + "pr1pr": 24.75, + "pr2id": "2", + "pr2cd1": "other product", + "pr2nm": "other product", + "pr2pr": 24.75, + "ea": "Order Cancelled", + "ev": 100, + "ec": "EnhancedEcommerce", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "ti": "rudderstackorder1", + "ts": 13.99, + "tt": 20.99, + "cu": "INR", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "ul": "en-US", + "pr1qt": 1, + "pr2qt": 3, + "ni": 1, + "qt": 124893881700, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - }, - { - name: 'ga360', - description: 'Test 22', - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'order starterefundedd', - properties: { - products: [ - { - quantity: 1, - sku: 'p-298', - }, - { - quantity: 1, - sku: 'p-299', - }, - ], - testDimension: true, - testMetric: true, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, + { + "name": "ga360", + "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": "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "Order Cancelled", + "properties": { + "order_id": "rudderstackorder1", + "revenue": 99.99, + "shipping": 13.99, + "tax": 20.99, + "currency": "INR", + "products": [] + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "No product information supplied for transaction event", + "statTags": { + "destType": "GA360", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ul: 'en-US', - ec: 'All', - ni: 1, - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - cid: '00000000000000000000000000', - ea: 'order starterefundedd', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, + { + "name": "ga360", + "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": "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "Cart Viewed", + "properties": { + "order_id": "rudderstackorder1", + "revenue": 99.99, + "shipping": 13.99, + "tax": 20.99, + "currency": "INR", + "products": [ + { + "quantity": 1, + "price": 24.75, + "name": "my product", + "sku": "p-298", + "product_id": "1" + }, + { + "quantity": 3, + "price": 24.75, + "name": "other product", + "sku": "p-299", + "product_id": "2" + } + ] + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ea": "Cart Viewed", + "ev": 100, + "ec": "EnhancedEcommerce", + "pa": "detail", + "v": "1", + "t": "event", + "el": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "cid": "00000000000000000000000000", + "uid": "12345", + "ul": "en-US", + "ni": 1, + "pr1cd1": "my product", + "pr1id": "1", + "pr1nm": "my product", + "pr1pr": 24.75, + "pr1qt": 1, + "pr2cd1": "other product", + "pr2id": "2", + "pr2nm": "other product", + "pr2pr": 24.75, + "pr2qt": 3, + "qt": 124893881700, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - }, - { - name: 'ga360', - description: 'Test 23', - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'order starterefundedd', - properties: { - products: [ - { - quantity: 1, - sku: 'p-298', - }, - { - quantity: 1, - sku: 'p-299', - }, - ], - testDimension: true, - testMetric: true, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, + { + "name": "ga360", + "description": "Test 46", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "traits": { + "name1": "Test" + }, + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "properties": { + "plan": "standard plan", + "name": "rudder test" + }, + "type": "identify", + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "anonymousId": "00000000000000000000000000", + "userId": "123456", + "integrations": { + "All": true + }, + "traits": { + "name1": "Test" + }, + "sentAt": "2019-10-14T09:03:22.563Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "serverSideIdentifyEventCategory": "name", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "server side identify is not on", + "statTags": { + "destType": "GA360", + "errorCategory": "dataValidation", + "errorType": "configuration", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ul: 'en-US', - ec: 'All', - ni: 1, - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - ea: 'order starterefundedd', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, + { + "name": "ga360", + "description": "Test 47", + "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", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "type": "screen", + "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", + "originalTimestamp": "2019-10-14T11:15:18.299Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "properties": { + "name": "homescreen" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "cd1": "homescreen", + "v": "1", + "t": "screenview", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "cd": "homescreen", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "ul": "en-US", + "uip": "0.0.0.0", + "qt": 124893881701, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "statusCode": 200 + } + ] + } + } }, - }, - { - name: 'ga360', - description: 'Test 24', - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'linkid test', - properties: { - linkid: 'abc123', - testDimension: true, - testMetric: true, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, + { + "name": "ga360", + "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", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "type": "newtype", + "messageId": "5e10d13a-bf9a-44bf-b884-43a9e591ea71", + "originalTimestamp": "2019-10-14T11:15:18.299Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "properties": { + "name": "homescreen" + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "error": "Message type newtype not supported", + "statTags": { + "destType": "GA360", + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "feature": "processor", + "implementation": "native", + "module": "destination" + }, + "statusCode": 400 + } + ] + } + } }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ul: 'en-US', - ec: 'All', - ni: 1, - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - linkid: 'abc123', - cid: '00000000000000000000000000', - ea: 'linkid test', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, + { + "name": "ga360", + "description": "Test 49", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "traits": { + "name": "Test" + }, + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "properties": { + "plan": "standard plan", + "name": "rudder test" + }, + "type": "identify", + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "userId": "12345", + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "name", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "userId": "12345", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ea": "action1", + "ec": "Test", + "ni": 1, + "cd1": "Test", + "v": "1", + "t": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "ul": "en-US", + "uid": "12345", + "cid": "827ccb0eea8a706c4c34a16891f84e7b", + "uip": "0.0.0.0", + "qt": 124901802438 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {} + }, + "statusCode": 200 + } + ] + } + } }, - }, - { - name: 'ga360', - description: 'Test 25', - 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, - }, - campaign: { - name: 'sampleName', - source: 'sampleSource', - medium: 'sampleMedium', - content: 'sampleContent', - term: 'sampleTerm', - }, - }, - type: 'track', - messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', - originalTimestamp: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'campaign test', - properties: { - testDimension: true, - testMetric: true, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, + { + "name": "ga360", + "description": "Test 50", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "traits": { + "name": "Test" + }, + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "properties": { + "plan": "standard plan", + "name": "rudder test" + }, + "type": "identify", + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "userId": "12345", + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "name", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "disableMd5": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "userId": "12345", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ea": "action1", + "ec": "Test", + "ni": 1, + "cd1": "Test", + "v": "1", + "t": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "ul": "en-US", + "uid": "12345", + "uip": "0.0.0.0", + "qt": 124901802438 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {} + }, + "statusCode": 200 + } + ] + } + } }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ul: 'en-US', - ec: 'All', - ni: 1, - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - cn: 'sampleName', - cs: 'sampleSource', - cm: 'sampleMedium', - cc: 'sampleContent', - ck: 'sampleTerm', - cid: '00000000000000000000000000', - ea: 'campaign test', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, + { + "name": "ga360", + "description": "Test 51", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "traits": { + "name": "Test" + }, + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "properties": { + "plan": "standard plan", + "name": "rudder test" + }, + "type": "identify", + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "userId": "12345", + "integrations": { + "All": true, + "GA": { + "clientId": "clientId" + }, + "Google Analytics": { + "clientId": "clientId" + } + }, + "sentAt": "2019-10-14T09:03:22.563Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "name", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "userId": "12345", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ea": "action1", + "ec": "Test", + "ni": 1, + "cd1": "Test", + "v": "1", + "t": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "ul": "en-US", + "uid": "12345", + "cid": "clientId", + "uip": "0.0.0.0", + "qt": 124901802438 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {} + }, + "statusCode": 200 + } + ] + } + } }, - }, - { - name: 'ga360', - description: 'Test 26', - 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, - }, - campaign: { - name: 'sampleName', - source: 'sampleSource', - medium: 'sampleMedium', - content: 'sampleContent', - term: 'sampleTerm', - }, - }, - type: 'track', - messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', - originalTimestamp: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - event: 'campaign test', - properties: { - testDimension: true, - testMetric: true, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ul: 'en-US', - ec: 'All', - ni: 1, - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - cn: 'sampleName', - cs: 'sampleSource', - cm: 'sampleMedium', - cc: 'sampleContent', - ck: 'sampleTerm', - cid: '00000000000000000000000000', - ea: 'campaign test', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga360', - description: 'Test 27', - 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, - }, - campaign: { - name: 'sampleName', - source: 'sampleSource', - medium: 'sampleMedium', - content: 'sampleContent', - term: 'sampleTerm', - }, - }, - type: 'track', - messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', - originalTimestamp: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - event: 'campaign test', - properties: { - testDimension: true, - testMetric: true, - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ul: 'en-US', - ec: 'All', - ni: 1, - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - cn: 'sampleName', - cs: 'sampleSource', - cm: 'sampleMedium', - cc: 'sampleContent', - ck: 'sampleTerm', - cid: '00000000000000000000000000', - ea: 'campaign test', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga360', - description: 'Test 28', - 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.2', - }, - traits: { - abc: '1234', - }, - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.1.2', - }, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36', - locale: 'en-GB', - os: { - name: '', - version: '', - }, - screen: { - density: 2, - }, - page: { - path: '/tests/html/ecomm_test.html', - referrer: 'http://0.0.0.0:1112/tests/html/', - search: '', - title: 'GA Ecommerce Test', - url: 'http://0.0.0.0:1112/tests/html/ecomm_test.html', - }, - }, - type: 'identify', - messageId: 'bc8a6af8-37fd-46a9-9592-ea29a256435f', - originalTimestamp: '2020-06-22T11:30:32.493Z', - anonymousId: '38e169a1-3234-46f7-9ceb-c1a6a69005fe', - userId: '123', - integrations: { - All: true, - }, - sentAt: '2020-06-22T11:30:32.494Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ea: 'User Enriched', - dt: 'GA Ecommerce Test', - ec: 'All', - v: '1', - t: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.1.2', - aiid: 'com.rudderlabs.javascript', - npa: 1, - uid: '123', - cid: '38e169a1-3234-46f7-9ceb-c1a6a69005fe', - ni: 1, - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36', - ul: 'en-GB', - qt: 103120167507, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '38e169a1-3234-46f7-9ceb-c1a6a69005fe', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga360', - description: 'Test 29', - 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', - 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', - integrations: { - All: true, - }, - name: 'ApplicationLoaded', - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - v: '1', - t: 'pageview', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - ul: 'en-US', - uip: '0.0.0.0', - qt: 124893881701, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga360', - description: 'Test 30', - 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', - 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: '?xyz=1', - title: '', - url: 'https://www.example.com/abc', - }, - integrations: { - All: true, - }, - name: 'ApplicationLoaded', - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - v: '1', - t: 'pageview', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - ul: 'en-US', - uip: '0.0.0.0', - dh: 'www.example.com', - dl: 'https://www.example.com/abc', - dp: '%2Fabc%3Fxyz%3D1', - qt: 124893881701, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga360', - description: 'Test 31', - 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', - ip: '0.0.0.0', - os: { - name: '', - version: '', - }, - screen: { - density: 2, - }, - }, - type: 'track', - messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', - originalTimestamp: '2019-10-14T11:15:18.299Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - integrations: { - All: true, - }, - event: 'sample event', - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ec: 'All', - ni: 1, - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - ea: 'sample event', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - ul: 'en-US', - uip: '0.0.0.0', - qt: 124893881701, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga360', - description: 'Test 32', - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'Order Refunded', - properties: { - order_id: 'rudderstackorder1', - total: 99.99, - shipping: 13.99, - tax: 20.99, - currency: 'INR', - products: [ - { - quantity: 1, - price: 24.75, - name: 'my product', - sku: 'p-298', - }, - { - quantity: 3, - price: 24.75, - name: 'other product', - sku: 'p-299', - }, - ], - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - pa: 'refund', - ev: 100, - pr1id: 'p-298', - pr1cd1: 'my product', - pr1nm: 'my product', - pr1pr: 24.75, - pr1qt: 1, - pr2id: 'p-299', - pr2cd1: 'other product', - pr2nm: 'other product', - pr2pr: 24.75, - pr2qt: 3, - ea: 'Order Refunded', - ec: 'EnhancedEcommerce', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - cid: '00000000000000000000000000', - ti: 'rudderstackorder1', - uid: '12345', - ul: 'en-US', - ni: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga360', - description: 'Test 33', - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'Order Refunded', - properties: { - order_id: 'rudderstackorder1', - total: 99.99, - shipping: 13.99, - tax: 20.99, - currency: 'INR', - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ev: 100, - pa: 'refund', - ti: 'rudderstackorder1', - ea: 'Order Refunded', - ec: 'EnhancedEcommerce', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - cid: '00000000000000000000000000', - uid: '12345', - ul: 'en-US', - ni: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga360', - description: 'Test 34', - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'Order Refunded', - properties: { - order_id: 'rudderstackorder1', - total: 99.99, - shipping: 13.99, - tax: 20.99, - currency: 'INR', - products: [], - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ev: 100, - pa: 'refund', - ti: 'rudderstackorder1', - ea: 'Order Refunded', - ec: 'EnhancedEcommerce', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - cid: '00000000000000000000000000', - uid: '12345', - ul: 'en-US', - ni: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga360', - description: 'Test 35', - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'Order Refunded', - properties: { - order_id: 'rudderstackorder1', - total: 99.99, - shipping: 13.99, - tax: 20.99, - currency: 'INR', - products: [ - { - quantity: 1, - price: 24.75, - name: 'my product', - sku: 'p-298', - product_id: '1', - }, - { - quantity: 3, - price: 24.75, - name: 'other product', - sku: 'p-299', - product_id: '2', - }, - ], - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ev: 100, - pa: 'refund', - pr1id: '1', - pr1cd1: 'my product', - pr1nm: 'my product', - pr1pr: 24.75, - pr1qt: 1, - pr2id: '2', - pr2cd1: 'other product', - pr2nm: 'other product', - pr2pr: 24.75, - pr2qt: 3, - ea: 'Order Refunded', - ec: 'EnhancedEcommerce', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - cid: '00000000000000000000000000', - ti: 'rudderstackorder1', - uid: '12345', - ul: 'en-US', - ni: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga360', - description: 'Test 36', - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'Cart Shared', - properties: { - order_id: 'rudderstackorder1', - total: 99.99, - shipping: 13.99, - tax: 20.99, - currency: 'INR', - products: [ - { - quantity: 1, - price: 24.75, - name: 'my product', - sku: 'p-298', - product_id: '1', - }, - { - quantity: 3, - price: 24.75, - name: 'other product', - sku: 'p-299', - product_id: '2', - }, - ], - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ev: 100, - ea: 'Cart Shared', - ec: 'All', - ni: 1, - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - st: ' 1 2', - ul: 'en-US', - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga360', - description: 'Test 37', - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'Product Shared', - properties: { - product_id: 'rudderstackorder1', - total: 99.99, - shipping: 13.99, - tax: 20.99, - currency: 'INR', - url: 'https://www.example.com/abc', - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ev: 100, - ea: 'Product Shared', - ec: 'All', - ni: 1, - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - st: 'https://www.example.com/abc', - dh: 'www.example.com', - dl: 'https://www.example.com/abc', - dp: '%2Fabc', - ul: 'en-US', - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga360', - description: 'Test 38', - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'Product List Clicked', - properties: { - list_id: 'Sample Product List', - category: 'Sample Product List', - products: [ - { - quantity: 1, - price: 24.75, - name: 'my product', - sku: 'p-298', - product_id: '1', - }, - { - quantity: 3, - price: 24.75, - name: 'other product', - sku: 'p-299', - product_id: '2', - }, - ], - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ea: 'Product List Clicked', - ec: 'Sample Product List', - pa: 'click', - il1pi1id: '1', - pr1cd1: 'my product', - il1pi1nm: 'my product', - il1pi1pr: 24.75, - il1pi2id: '2', - pr2cd1: 'other product', - il1pi2nm: 'other product', - il1pi2pr: 24.75, - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - il1nm: 'Sample Product List', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - cid: '00000000000000000000000000', - uid: '12345', - ni: 1, - il1pi2qt: 3, - il1pi1qt: 1, - ul: 'en-US', - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga360', - description: 'Test 39', - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'Product List Clicked', - properties: { - list_id: 'Sample Product List', - category: 'Sample Product List', - products: [ - { - quantity: 1, - price: 24.75, - name: 'my product', - sku: 'p-298', - }, - { - quantity: 3, - price: 24.75, - name: 'other product', - sku: 'p-299', - }, - ], - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ea: 'Product List Clicked', - ec: 'Sample Product List', - pa: 'click', - il1pi1id: 'p-298', - pr1cd1: 'my product', - il1pi1nm: 'my product', - il1pi1pr: 24.75, - il1pi2id: 'p-299', - pr2cd1: 'other product', - il1pi2nm: 'other product', - il1pi2pr: 24.75, - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - il1nm: 'Sample Product List', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - cid: '00000000000000000000000000', - uid: '12345', - ul: 'en-US', - il1pi2qt: 3, - il1pi1qt: 1, - ni: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga360', - description: 'Test 40', - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'Product List Clicked', - properties: { - list_id: 'Sample Product List', - category: 'Sample Product List', - products: [], - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ni: 1, - ea: 'Product List Clicked', - ec: 'Sample Product List', - pa: 'click', - el: 'event', - v: '1', - t: 'event', - tid: 'UA-165994240-1', - ds: 'web', - npa: 1, - aip: 1, - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - ul: 'en-US', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - il1nm: 'Sample Product List', - uid: '12345', - cid: '00000000000000000000000000', - qt: 124893881700, - }, - body: { - JSON: {}, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga360', - description: 'Test 41', - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'Order Cancelled', - properties: { - order_id: 'rudderstackorder1', - total: 99.99, - shipping: 13.99, - tax: 20.99, - currency: 'INR', - products: [ - { - quantity: 1, - price: 24.75, - name: 'my product', - sku: 'p-298', - product_id: '1', - }, - { - quantity: 3, - price: 24.75, - name: 'other product', - sku: 'p-299', - product_id: '2', - }, - ], - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - pa: 'refund', - ev: 100, - tr: 99.99, - pr1id: '1', - pr1cd1: 'my product', - pr1nm: 'my product', - pr1pr: 24.75, - pr2id: '2', - pr2cd1: 'other product', - pr2nm: 'other product', - pr2pr: 24.75, - ea: 'Order Cancelled', - ec: 'EnhancedEcommerce', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - ti: 'rudderstackorder1', - ts: 13.99, - tt: 20.99, - cu: 'INR', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - ul: 'en-US', - pr1qt: 1, - pr2qt: 3, - ni: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga360', - 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', - }, - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'Order Cancelled', - properties: { - order_id: 'rudderstackorder1', - value: 99.99, - shipping: 13.99, - tax: 20.99, - currency: 'INR', - products: [ - { - quantity: 1, - price: 24.75, - name: 'my product', - sku: 'p-298', - product_id: '1', - }, - { - quantity: 3, - price: 24.75, - name: 'other product', - sku: 'p-299', - product_id: '2', - }, - ], - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - pa: 'refund', - tr: 99.99, - pr1id: '1', - pr1cd1: 'my product', - pr1nm: 'my product', - pr1pr: 24.75, - pr2id: '2', - pr2cd1: 'other product', - pr2nm: 'other product', - pr2pr: 24.75, - ea: 'Order Cancelled', - ev: 100, - ec: 'EnhancedEcommerce', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - ti: 'rudderstackorder1', - ts: 13.99, - tt: 20.99, - cu: 'INR', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - ul: 'en-US', - pr1qt: 1, - pr2qt: 3, - ni: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga360', - 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: '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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'Order Cancelled', - properties: { - order_id: 'rudderstackorder1', - revenue: 99.99, - shipping: 13.99, - tax: 20.99, - currency: 'INR', - products: [ - { - quantity: 1, - price: 24.75, - name: 'my product', - sku: 'p-298', - product_id: '1', - }, - { - quantity: 3, - price: 24.75, - name: 'other product', - sku: 'p-299', - product_id: '2', - }, - ], - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - pa: 'refund', - tr: 99.99, - pr1id: '1', - pr1cd1: 'my product', - pr1nm: 'my product', - pr1pr: 24.75, - pr2id: '2', - pr2cd1: 'other product', - pr2nm: 'other product', - pr2pr: 24.75, - ea: 'Order Cancelled', - ev: 100, - ec: 'EnhancedEcommerce', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - ti: 'rudderstackorder1', - ts: 13.99, - tt: 20.99, - cu: 'INR', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - ul: 'en-US', - pr1qt: 1, - pr2qt: 3, - ni: 1, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga360', - 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: '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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'Order Cancelled', - properties: { - order_id: 'rudderstackorder1', - revenue: 99.99, - shipping: 13.99, - tax: 20.99, - currency: 'INR', - products: [], - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - error: 'No product information supplied for transaction event', - statTags: { - destType: 'GA360', - errorCategory: 'dataValidation', - errorType: 'instrumentation', - feature: 'processor', - implementation: 'native', - module: 'destination', - }, - statusCode: 400, - }, - ], - }, - }, - }, - { - name: 'ga360', - 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: '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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'Cart Viewed', - properties: { - order_id: 'rudderstackorder1', - revenue: 99.99, - shipping: 13.99, - tax: 20.99, - currency: 'INR', - products: [ - { - quantity: 1, - price: 24.75, - name: 'my product', - sku: 'p-298', - product_id: '1', - }, - { - quantity: 3, - price: 24.75, - name: 'other product', - sku: 'p-299', - product_id: '2', - }, - ], - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ea: 'Cart Viewed', - ev: 100, - ec: 'EnhancedEcommerce', - pa: 'detail', - v: '1', - t: 'event', - el: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - cid: '00000000000000000000000000', - uid: '12345', - ul: 'en-US', - ni: 1, - pr1cd1: 'my product', - pr1id: '1', - pr1nm: 'my product', - pr1pr: 24.75, - pr1qt: 1, - pr2cd1: 'other product', - pr2id: '2', - pr2nm: 'other product', - pr2pr: 24.75, - pr2qt: 3, - qt: 124893881700, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga360', - description: 'Test 46', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - channel: 'web', - context: { - traits: { - name1: 'Test', - }, - app: { - build: '1.0.0', - name: 'RudderLabs JavaScript SDK', - namespace: 'com.rudderlabs.javascript', - version: '1.0.0', - }, - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.0.0', - }, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - locale: 'en-US', - ip: '0.0.0.0', - os: { - name: '', - version: '', - }, - screen: { - density: 2, - }, - }, - properties: { - plan: 'standard plan', - name: 'rudder test', - }, - type: 'identify', - messageId: '84e26acc-56a5-4835-8233-591137fca468', - originalTimestamp: '2019-10-14T09:03:17.562Z', - anonymousId: '00000000000000000000000000', - userId: '123456', - integrations: { - All: true, - }, - traits: { - name1: 'Test', - }, - sentAt: '2019-10-14T09:03:22.563Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - serverSideIdentifyEventCategory: 'name', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - error: 'server side identify is not on', - statTags: { - destType: 'GA360', - errorCategory: 'dataValidation', - errorType: 'configuration', - feature: 'processor', - implementation: 'native', - module: 'destination', - }, - statusCode: 400, - }, - ], - }, - }, - }, - { - name: 'ga360', - description: 'Test 47', - 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', - ip: '0.0.0.0', - os: { - name: '', - version: '', - }, - screen: { - density: 2, - }, - }, - type: 'screen', - messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', - originalTimestamp: '2019-10-14T11:15:18.299Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - properties: { - name: 'homescreen', - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - cd1: 'homescreen', - v: '1', - t: 'screenview', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - cd: 'homescreen', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - ul: 'en-US', - uip: '0.0.0.0', - qt: 124893881701, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: '00000000000000000000000000', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga360', - 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', - ip: '0.0.0.0', - os: { - name: '', - version: '', - }, - screen: { - density: 2, - }, - }, - type: 'newtype', - messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', - originalTimestamp: '2019-10-14T11:15:18.299Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - properties: { - name: 'homescreen', - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - error: 'Message type newtype not supported', - statTags: { - destType: 'GA360', - errorCategory: 'dataValidation', - errorType: 'instrumentation', - feature: 'processor', - implementation: 'native', - module: 'destination', - }, - statusCode: 400, - }, - ], - }, - }, - }, - { - name: 'ga360', - description: 'Test 49', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - channel: 'web', - context: { - traits: { - name: 'Test', - }, - app: { - build: '1.0.0', - name: 'RudderLabs JavaScript SDK', - namespace: 'com.rudderlabs.javascript', - version: '1.0.0', - }, - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.0.0', - }, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - locale: 'en-US', - ip: '0.0.0.0', - os: { - name: '', - version: '', - }, - screen: { - density: 2, - }, - }, - properties: { - plan: 'standard plan', - name: 'rudder test', - }, - type: 'identify', - messageId: '84e26acc-56a5-4835-8233-591137fca468', - originalTimestamp: '2019-10-14T09:03:17.562Z', - userId: '12345', - integrations: { - All: true, - }, - sentAt: '2019-10-14T09:03:22.563Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'name', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - userId: '12345', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ea: 'action1', - ec: 'Test', - ni: 1, - cd1: 'Test', - v: '1', - t: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - ul: 'en-US', - uid: '12345', - cid: '827ccb0eea8a706c4c34a16891f84e7b', - uip: '0.0.0.0', - qt: 124901802438, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga360', - description: 'Test 50', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - channel: 'web', - context: { - traits: { - name: 'Test', - }, - app: { - build: '1.0.0', - name: 'RudderLabs JavaScript SDK', - namespace: 'com.rudderlabs.javascript', - version: '1.0.0', - }, - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.0.0', - }, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - locale: 'en-US', - ip: '0.0.0.0', - os: { - name: '', - version: '', - }, - screen: { - density: 2, - }, - }, - properties: { - plan: 'standard plan', - name: 'rudder test', - }, - type: 'identify', - messageId: '84e26acc-56a5-4835-8233-591137fca468', - originalTimestamp: '2019-10-14T09:03:17.562Z', - userId: '12345', - integrations: { - All: true, - }, - sentAt: '2019-10-14T09:03:22.563Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'name', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - disableMd5: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - userId: '12345', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ea: 'action1', - ec: 'Test', - ni: 1, - cd1: 'Test', - v: '1', - t: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - ul: 'en-US', - uid: '12345', - uip: '0.0.0.0', - qt: 124901802438, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga360', - description: 'Test 51', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - channel: 'web', - context: { - traits: { - name: 'Test', - }, - app: { - build: '1.0.0', - name: 'RudderLabs JavaScript SDK', - namespace: 'com.rudderlabs.javascript', - version: '1.0.0', - }, - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.0.0', - }, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - locale: 'en-US', - ip: '0.0.0.0', - os: { - name: '', - version: '', - }, - screen: { - density: 2, - }, - }, - properties: { - plan: 'standard plan', - name: 'rudder test', - }, - type: 'identify', - messageId: '84e26acc-56a5-4835-8233-591137fca468', - originalTimestamp: '2019-10-14T09:03:17.562Z', - userId: '12345', - integrations: { - All: true, - GA: { - clientId: 'clientId', - }, - 'Google Analytics': { - clientId: 'clientId', - }, - }, - sentAt: '2019-10-14T09:03:22.563Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'name', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - userId: '12345', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ea: 'action1', - ec: 'Test', - ni: 1, - cd1: 'Test', - v: '1', - t: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - ul: 'en-US', - uid: '12345', - cid: 'clientId', - uip: '0.0.0.0', - qt: 124901802438, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'ga360', - description: 'Test 52', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - channel: 'web', - context: { - externalId: [ - { - id: 'externalClientId', - type: 'gaExternalId', - }, - ], - traits: { - name: 'Test', - }, - app: { - build: '1.0.0', - name: 'RudderLabs JavaScript SDK', - namespace: 'com.rudderlabs.javascript', - version: '1.0.0', - }, - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.0.0', - }, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - locale: 'en-US', - ip: '0.0.0.0', - os: { - name: '', - version: '', - }, - screen: { - density: 2, - }, - }, - properties: { - plan: 'standard plan', - name: 'rudder test', - }, - type: 'identify', - messageId: '84e26acc-56a5-4835-8233-591137fca468', - originalTimestamp: '2019-10-14T09:03:17.562Z', - userId: '12345', - integrations: { - All: true, - }, - sentAt: '2019-10-14T09:03:22.563Z', - }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'name', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { - from: 'name', - to: 'dimension1', - }, - { - from: 'custom2', - to: 'dimension2', - }, - ], - metrics: [ - { - from: 'email', - to: 'metric1', - }, - { - from: 'trait2', - to: 'metric2', - }, - ], - resetCustomDimensionsOnPage: [ - { - resetCustomDimensionsOnPage: 'abc', - }, - { - resetCustomDimensionsOnPage: 'xyz', - }, - ], - contentGroupings: [ - { - from: 'plan', - to: 'contentGroup1', - }, - { - from: 'prop2', - to: 'contentGroup2', - }, - ], - }, - Enabled: true, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - userId: '12345', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ea: 'action1', - ec: 'Test', - ni: 1, - cd1: 'Test', - v: '1', - t: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - ul: 'en-US', - uid: '12345', - cid: 'externalClientId', - uip: '0.0.0.0', - qt: 124901802438, - }, - body: { - JSON: {}, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - }, - statusCode: 200, - }, - ], - }, - }, - }, -].map((d) => ({ ...d, mockFns })); + { + "name": "ga360", + "description": "Test 52", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "channel": "web", + "context": { + "externalId": [ + { + "id": "externalClientId", + "type": "gaExternalId" + } + ], + "traits": { + "name": "Test" + }, + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "properties": { + "plan": "standard plan", + "name": "rudder test" + }, + "type": "identify", + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "userId": "12345", + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "name", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "userId": "12345", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ea": "action1", + "ec": "Test", + "ni": 1, + "cd1": "Test", + "v": "1", + "t": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "ul": "en-US", + "uid": "12345", + "cid": "externalClientId", + "uip": "0.0.0.0", + "qt": 124901802438 + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {} + }, + "statusCode": 200 + } + ] + } + } + } +].map((d) => ({ ...d, mockFns })) \ No newline at end of file diff --git a/test/integrations/destinations/ga360/router/data.ts b/test/integrations/destinations/ga360/router/data.ts index a534ccea03..15086b6b2f 100644 --- a/test/integrations/destinations/ga360/router/data.ts +++ b/test/integrations/destinations/ga360/router/data.ts @@ -1,345 +1,487 @@ +export const mockFns = (_) => { + // @ts-ignore + jest + .useFakeTimers() + .setSystemTime(new Date('2023-09-29')); +}; + export const data = [ - { - name: 'ga360', - description: 'Test 0', - feature: 'router', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - input: [ - { - message: { - channel: 'web', - context: { - traits: { name: 'Rudder Test' }, - app: { - build: '1.0.0', - name: 'RudderLabs JavaScript SDK', - namespace: 'com.rudderlabs.javascript', - version: '1.0.0', - }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - locale: 'en-US', - ip: '0.0.0.0', - os: { name: '', version: '' }, - screen: { density: 2 }, + { + name: 'ga360', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { + body: { + input: [ + { + "message": { + "channel": "web", + "context": { + "traits": { + "name": "Rudder Test" + }, + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "locale": "en-US", + "ip": "0.0.0.0", + "os": { + "name": "", + "version": "" + }, + "screen": { + "density": 2 + } + }, + "properties": { + "plan": "standard plan", + "name": "rudder test" + }, + "type": "identify", + "messageId": "84e26acc-56a5-4835-8233-591137fca468", + "originalTimestamp": "2019-10-14T09:03:17.562Z", + "anonymousId": "00000000000000000000000000", + "userId": "123456", + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + }, + "metadata": { + "jobId": 1 + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "name", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "name", + "to": "contentGroup2" + } + ] + }, + "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" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, 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": "q", + "search": "", + "title": "a", + "url": "https://www.example.com/abc" + }, + "integrations": { + "All": true + }, + "name": "ApplicationLoaded", + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "metadata": { + "jobId": 2 + }, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ], + destType: 'ga360', }, - properties: { plan: 'standard plan', name: 'rudder test' }, - type: 'identify', - messageId: '84e26acc-56a5-4835-8233-591137fca468', - originalTimestamp: '2019-10-14T09:03:17.562Z', - anonymousId: '00000000000000000000000000', - userId: '123456', - integrations: { All: true }, - sentAt: '2019-10-14T09:03:22.563Z', - }, - metadata: { jobId: 1, userId: 'u1' }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'name', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { from: 'name', to: 'dimension1' }, - { from: 'custom2', to: 'dimension2' }, - ], - metrics: [ - { from: 'email', to: 'metric1' }, - { from: 'trait2', to: 'metric2' }, - ], - resetCustomDimensionsOnPage: [ - { resetCustomDimensionsOnPage: 'abc' }, - { resetCustomDimensionsOnPage: 'xyz' }, - ], - contentGroupings: [ - { from: 'plan', to: 'contentGroup1' }, - { from: 'name', to: 'contentGroup2' }, - ], - }, - 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' }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, 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: 'q', - search: '', - title: 'a', - url: 'https://www.example.com/abc', - }, - integrations: { All: true }, - name: 'ApplicationLoaded', - sentAt: '2019-10-14T11:15:53.296Z', - }, - metadata: { jobId: 2, userId: 'u1' }, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { from: 'name', to: 'dimension1' }, - { from: 'custom2', to: 'dimension2' }, - ], - metrics: [ - { from: 'email', to: 'metric1' }, - { from: 'trait2', to: 'metric2' }, - ], - resetCustomDimensionsOnPage: [ - { resetCustomDimensionsOnPage: 'abc' }, - { resetCustomDimensionsOnPage: 'xyz' }, - ], - contentGroupings: [ - { from: 'plan', to: 'contentGroup1' }, - { from: 'prop2', to: 'contentGroup2' }, - ], - }, - Enabled: true, - }, - }, - ], - destType: 'ga360', - }, - method: 'POST', - }, - }, - output: { - response: { - status: 200, - body: { - output: [ - { - batchedRequest: { - version: '1', - type: 'REST', method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - ea: 'action1', - ec: 'Rudder Test', - cd1: 'Rudder Test', - cg2: 'Rudder Test', - v: '1', - t: 'event', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - uid: '123456', - cid: '00000000000000000000000000', - ni: 1, - uip: '0.0.0.0', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - ul: 'en-US', - qt: 124901802438, - }, - body: { JSON: {}, XML: {}, JSON_ARRAY: {}, FORM: {} }, - files: {}, - userId: '00000000000000000000000000', - }, - metadata: [{ jobId: 1, userId: 'u1' }], - batched: false, - statusCode: 200, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'name', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { from: 'name', to: 'dimension1' }, - { from: 'custom2', to: 'dimension2' }, - ], - metrics: [ - { from: 'email', to: 'metric1' }, - { from: 'trait2', to: 'metric2' }, - ], - resetCustomDimensionsOnPage: [ - { resetCustomDimensionsOnPage: 'abc' }, - { resetCustomDimensionsOnPage: 'xyz' }, - ], - contentGroupings: [ - { from: 'plan', to: 'contentGroup1' }, - { from: 'name', to: 'contentGroup2' }, - ], - }, - Enabled: true, - }, }, - { - batchedRequest: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://www.google-analytics.com/collect', - headers: {}, - params: { - v: '1', - t: 'pageview', - tid: 'UA-165994240-1', - ds: 'web', - an: 'RudderLabs JavaScript SDK', - av: '1.0.0', - aiid: 'com.rudderlabs.javascript', - npa: 1, - aip: 1, - cid: '00000000000000000000000000', - ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', - uid: '12345', - uip: '0.0.0.0', - ul: 'en-US', - dh: 'www.example.com', - dl: 'https://www.example.com/abc', - dp: '%2Fabc', - dr: 'q', - dt: 'a', - qt: 124893881701, - }, - body: { JSON: {}, XML: {}, JSON_ARRAY: {}, FORM: {} }, - files: {}, - userId: '00000000000000000000000000', - }, - metadata: [{ jobId: 2, userId: 'u1' }], - batched: false, - statusCode: 200, - destination: { - Config: { - trackingID: 'UA-165994240-1', - doubleClick: true, - enhancedLinkAttribution: true, - classic: true, - ignoredReferrers: '', - serverClassic: false, - includeSearch: true, - trackCategorizedPages: true, - trackNamedPages: true, - sampleRate: '100', - siteSpeedSampleRate: '1', - setAllMappedProps: true, - enableServerSideIdentify: true, - serverSideIdentifyEventCategory: 'cat1', - serverSideIdentifyEventAction: 'action1', - anonymizeIp: true, - domain: 'domain', - enhancedEcommerce: true, - nonInteraction: true, - optimize: 'abc123', - sendUserId: true, - useGoogleAmpClientId: true, - 'web-useNativeSDK': true, - dimensions: [ - { from: 'name', to: 'dimension1' }, - { from: 'custom2', to: 'dimension2' }, - ], - metrics: [ - { from: 'email', to: 'metric1' }, - { from: 'trait2', to: 'metric2' }, - ], - resetCustomDimensionsOnPage: [ - { resetCustomDimensionsOnPage: 'abc' }, - { resetCustomDimensionsOnPage: 'xyz' }, - ], - contentGroupings: [ - { from: 'plan', to: 'contentGroup1' }, - { from: 'prop2', to: 'contentGroup2' }, - ], + }, + output: { + response: { + status: 200, + body: { + output: [ + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "ea": "action1", + "ec": "Rudder Test", + "cd1": "Rudder Test", + "cg2": "Rudder Test", + "v": "1", + "t": "event", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "uid": "123456", + "cid": "00000000000000000000000000", + "ni": 1, + "uip": "0.0.0.0", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "ul": "en-US", + "qt": 124901802438, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "metadata": [ + { + "jobId": 1 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "name", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "name", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + }, + { + "batchedRequest": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://www.google-analytics.com/collect", + "headers": {}, + "params": { + "v": "1", + "t": "pageview", + "tid": "UA-165994240-1", + "ds": "web", + "an": "RudderLabs JavaScript SDK", + "av": "1.0.0", + "aiid": "com.rudderlabs.javascript", + "npa": 1, + "aip": 1, + "cid": "00000000000000000000000000", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36", + "uid": "12345", + "uip": "0.0.0.0", + "ul": "en-US", + "dh": "www.example.com", + "dl": "https://www.example.com/abc", + "dp": "%2Fabc", + "dr": "q", + "dt": "a", + "qt": 124893881701, + }, + "body": { + "JSON": {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "00000000000000000000000000" + }, + "metadata": [ + { + "jobId": 2 + } + ], + "batched": false, + "statusCode": 200, + "destination": { + "Config": { + "trackingID": "UA-165994240-1", + "doubleClick": true, + "enhancedLinkAttribution": true, + "classic": true, + "ignoredReferrers": "", + "serverClassic": false, + "includeSearch": true, + "trackCategorizedPages": true, + "trackNamedPages": true, + "sampleRate": "100", + "siteSpeedSampleRate": "1", + "setAllMappedProps": true, + "enableServerSideIdentify": true, + "serverSideIdentifyEventCategory": "cat1", + "serverSideIdentifyEventAction": "action1", + "anonymizeIp": true, + "domain": "domain", + "enhancedEcommerce": true, + "nonInteraction": true, + "optimize": "abc123", + "sendUserId": true, + "useGoogleAmpClientId": true, + "web-useNativeSDK": true, + "dimensions": [ + { + "from": "name", + "to": "dimension1" + }, + { + "from": "custom2", + "to": "dimension2" + } + ], + "metrics": [ + { + "from": "email", + "to": "metric1" + }, + { + "from": "trait2", + "to": "metric2" + } + ], + "resetCustomDimensionsOnPage": [ + { + "resetCustomDimensionsOnPage": "abc" + }, + { + "resetCustomDimensionsOnPage": "xyz" + } + ], + "contentGroupings": [ + { + "from": "plan", + "to": "contentGroup1" + }, + { + "from": "prop2", + "to": "contentGroup2" + } + ] + }, + "Enabled": true + } + } + ], }, - Enabled: true, - }, }, - ], }, - }, - }, - }, -]; + } +].map((d) => ({ ...d, mockFns })); diff --git a/test/integrations/destinations/gainsight/network.ts b/test/integrations/destinations/gainsight/network.ts index 4c5a026847..c8adf871b9 100644 --- a/test/integrations/destinations/gainsight/network.ts +++ b/test/integrations/destinations/gainsight/network.ts @@ -1,71 +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: [], + { + httpReq: { + url: 'https://demo-domain.gainsightcloud.com/v1/data/objects/query/Company', + method: 'POST', }, - 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', + httpRes: { + data: { + "result": true, + "errorCode": null, + "errorDesc": null, + "requestId": "47d9c8be-4912-4610-806c-0eec22b73236", + "data": { + "records": [] + }, + "message": null }, - ], + status: 200 }, - 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', + { + 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 }, - 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 index dc4fe25e1b..5844c22b65 100644 --- a/test/integrations/destinations/gainsight/processor/data.ts +++ b/test/integrations/destinations/gainsight/processor/data.ts @@ -1,979 +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, - }, - ], - }, - }, - }, -]; + { + "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 index 73de708a11..d5873e8465 100644 --- a/test/integrations/destinations/gainsight/router/data.ts +++ b/test/integrations/destinations/gainsight/router/data.ts @@ -1,436 +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: 'u1', - 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: 'u1', - 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: {}, + { + name: 'gainsight', + description: 'Test 0', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { 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: 'u1', - 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', + 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 + } + } ], - transformAt: 'router', - transformAtV1: 'router', - }, - ResponseRules: {}, - }, - Config: { - accessKey: 'sample-access-key', - contractId: '', - domain: 'demo-account.gainsightcloud.com', - sharedSecret: '', - tenantId: '', - topicName: '', + destType: 'gainsight', }, - 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: {}, + }, + output: { + response: { + status: 200, body: { - JSON: { email: 'sample@user.com', status: 'active' }, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - }, - metadata: [ - { - userId: 'u1', - 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', + 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 + } + } ], - 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 index 81a2da4bed..d9dd6bbaa0 100644 --- a/test/integrations/destinations/gainsight_px/network.ts +++ b/test/integrations/destinations/gainsight_px/network.ts @@ -1,222 +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, - }, + { + httpReq: { + url: 'https://api.aptrinsic.com/v1/users/sample-user-id', + method: 'GET', }, - 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, - }, + 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 }, - }, - 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, - }, + { + httpReq: { + url: 'https://api.aptrinsic.com/v1/accounts/ecorp-id', + method: 'GET', }, - 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, - }, + 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 }, - 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, + { + 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 }, - }, - 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, - }, + { + 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 }, - numberOfUsers: 0, - propertyKeys: ['AP-XABC-123'], - createDate: 1624261864923, - lastModifiedDate: 1624261864923, - customAttributes: null, - parentGroupId: '', - }, - status: 200, }, - }, + { + 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/router/data.ts b/test/integrations/destinations/gainsight_px/router/data.ts index d50ca7127a..3b735c5b69 100644 --- a/test/integrations/destinations/gainsight_px/router/data.ts +++ b/test/integrations/destinations/gainsight_px/router/data.ts @@ -16,7 +16,10 @@ export const data = [ userId: 'stanley-kubrick', channel: 'web', context: { - os: { name: '', version: '' }, + os: { + name: '', + version: '', + }, app: { name: 'RudderLabs JavaScript SDK', build: '1.0.0', @@ -52,7 +55,10 @@ export const data = [ countryName: 'USA', hobbyCustomField: 'Making films. Being a genius', }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.1.18' }, + 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', @@ -63,11 +69,13 @@ export const data = [ receivedAt: '2021-06-25T14:29:52.911+05:30', request_ip: '[::1]', anonymousId: '1585ea2f-dddc-4d23-935f-c1196405d61e', - integrations: { All: true }, + integrations: { + All: true, + }, originalTimestamp: '2021-06-25T08:59:52.891Z', }, metadata: { - userId: 'u1', + userId: '9a7820d0-0ff2-4451-b655-682cec15cbd2', jobId: 1, sourceId: '1s9eG8UCer6YSKsD8ZlQCyLa3pj', destinationId: '1uLy1tqsoo9RhL1zLiqLQTKBIKL', @@ -114,13 +122,28 @@ export const data = [ ResponseRules: {}, }, Config: { - accountAttributeMap: [{ from: 'cultureCustomField', to: 'culture' }], + accountAttributeMap: [ + { + from: 'cultureCustomField', + to: 'culture', + }, + ], apiKey: 'sample-api-key', eventDelivery: false, eventDeliveryTS: 1624472902670, - globalContextMap: [{ from: 'kubrickTest', to: 'value' }], + globalContextMap: [ + { + from: 'kubrickTest', + to: 'value', + }, + ], productTagKey: 'AP-SAMPLE-2', - userAttributeMap: [{ from: 'hobbyCustomField', to: 'hobby' }], + userAttributeMap: [ + { + from: 'hobbyCustomField', + to: 'hobby', + }, + ], }, Enabled: true, Transformations: [], @@ -135,7 +158,10 @@ export const data = [ userId: 'adifhas9734', channel: 'web', context: { - os: { name: '', version: '' }, + os: { + name: '', + version: '', + }, app: { name: 'RudderLabs JavaScript SDK', build: '1.0.0', @@ -168,7 +194,10 @@ export const data = [ firstname: 'test', previousCompany: 'testprevCompany2', }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.1.18' }, + 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', @@ -178,22 +207,32 @@ export const data = [ timestamp: '2021-06-26T16:11:22.335+05:30', properties: { array: [1, 2, 3], - nested: { json: 'test' }, + nested: { + json: 'test', + }, status: 'testing', description: 'Example track call', fullyNested: [ - { a: 1, b: 2 }, - { a: 1, b: [1, 2, 3] }, + { + 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 }, + integrations: { + All: true, + }, originalTimestamp: '2021-06-26T10:41:22.316Z', }, metadata: { - userId: 'u1', + userId: 'a27a8a8a-9e81-4898-beeb-e6041fc1552d', jobId: 2, sourceId: '1s9eG8UCer6YSKsD8ZlQCyLa3pj', destinationId: '1uLy1tqsoo9RhL1zLiqLQTKBIKL', @@ -240,13 +279,28 @@ export const data = [ ResponseRules: {}, }, Config: { - accountAttributeMap: [{ from: 'cultureCustomField', to: 'culture' }], + accountAttributeMap: [ + { + from: 'cultureCustomField', + to: 'culture', + }, + ], apiKey: 'sample-api-key', eventDelivery: false, eventDeliveryTS: 1624472902670, - globalContextMap: [{ from: 'kubrickTest', to: 'value' }], + globalContextMap: [ + { + from: 'kubrickTest', + to: 'value', + }, + ], productTagKey: 'AP-SAMPLE-2', - userAttributeMap: [{ from: 'hobbyCustomField', to: 'hobby' }], + userAttributeMap: [ + { + from: 'hobbyCustomField', + to: 'hobby', + }, + ], }, Enabled: true, Transformations: [], @@ -280,10 +334,15 @@ export const data = [ gender: 'MALE', title: 'Director/Film Maker', score: 100, - location: { countryName: 'USA', countryCode: 'US' }, + location: { + countryName: 'USA', + countryCode: 'US', + }, firstName: 'Stanley', lastName: 'Kubrick', - customAttributes: { hobby: 'Making films. Being a genius' }, + customAttributes: { + hobby: 'Making films. Being a genius', + }, propertyKeys: ['AP-SAMPLE-2'], type: 'USER', }, @@ -295,7 +354,7 @@ export const data = [ }, metadata: [ { - userId: 'u1', + userId: '9a7820d0-0ff2-4451-b655-682cec15cbd2', jobId: 1, sourceId: '1s9eG8UCer6YSKsD8ZlQCyLa3pj', destinationId: '1uLy1tqsoo9RhL1zLiqLQTKBIKL', @@ -345,13 +404,28 @@ export const data = [ ResponseRules: {}, }, Config: { - accountAttributeMap: [{ from: 'cultureCustomField', to: 'culture' }], + accountAttributeMap: [ + { + from: 'cultureCustomField', + to: 'culture', + }, + ], apiKey: 'sample-api-key', eventDelivery: false, eventDeliveryTS: 1624472902670, - globalContextMap: [{ from: 'kubrickTest', to: 'value' }], + globalContextMap: [ + { + from: 'kubrickTest', + to: 'value', + }, + ], productTagKey: 'AP-SAMPLE-2', - userAttributeMap: [{ from: 'hobbyCustomField', to: 'hobby' }], + userAttributeMap: [ + { + from: 'hobbyCustomField', + to: 'hobby', + }, + ], }, Enabled: true, Transformations: [], @@ -385,7 +459,9 @@ export const data = [ referrer: '$direct', propertyKey: 'AP-SAMPLE-2', userType: 'USER', - globalContext: { kubrickTest: 'value' }, + globalContext: { + kubrickTest: 'value', + }, }, XML: {}, JSON_ARRAY: {}, @@ -395,7 +471,7 @@ export const data = [ }, metadata: [ { - userId: 'u1', + userId: 'a27a8a8a-9e81-4898-beeb-e6041fc1552d', jobId: 2, sourceId: '1s9eG8UCer6YSKsD8ZlQCyLa3pj', destinationId: '1uLy1tqsoo9RhL1zLiqLQTKBIKL', @@ -445,13 +521,28 @@ export const data = [ ResponseRules: {}, }, Config: { - accountAttributeMap: [{ from: 'cultureCustomField', to: 'culture' }], + accountAttributeMap: [ + { + from: 'cultureCustomField', + to: 'culture', + }, + ], apiKey: 'sample-api-key', eventDelivery: false, eventDeliveryTS: 1624472902670, - globalContextMap: [{ from: 'kubrickTest', to: 'value' }], + globalContextMap: [ + { + from: 'kubrickTest', + to: 'value', + }, + ], productTagKey: 'AP-SAMPLE-2', - userAttributeMap: [{ from: 'hobbyCustomField', to: 'hobby' }], + userAttributeMap: [ + { + from: 'hobbyCustomField', + to: 'hobby', + }, + ], }, Enabled: true, Transformations: [], diff --git a/test/integrations/destinations/gcs_datalake/processor/data.ts b/test/integrations/destinations/gcs_datalake/processor/data.ts index 46c7788709..2148d5a3e6 100644 --- a/test/integrations/destinations/gcs_datalake/processor/data.ts +++ b/test/integrations/destinations/gcs_datalake/processor/data.ts @@ -1,194 +1,191 @@ export const data = [ - { - name: 'gcs_datalake', - description: 'No Message type', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - receivedAt: '2023-09-29T15:07:16.650Z', - 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: '2019-10-14T11:15:18.300Z', - anonymousId: '00000000000000000000000000', - userId: '12345', - event: 'Product List Clicked', - properties: { - list_id: 'Sample Product List', - category: 'Sample Product List', - products: [], - }, - integrations: { - All: true, - }, - sentAt: '2019-10-14T11:15:53.296Z', + { + name: 'gcs_datalake', + description: 'No Message type', + feature: 'processor', + module: 'destination', + version: 'v0', + input: { + request: { + body: [ + { + "message": { + "receivedAt": "2023-09-29T15:07:16.650Z", + "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": "2019-10-14T11:15:18.300Z", + "anonymousId": "00000000000000000000000000", + "userId": "12345", + "event": "Product List Clicked", + "properties": { + "list_id": "Sample Product List", + "category": "Sample Product List", + "products": [] + }, + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T11:15:53.296Z" + }, + "destination": { + "Config": { + "bucketName": "ps-data-mdm-prod-rudderstack", + "prefix": "", + "namespace": "", + "credentials": "randomcreds", + "syncFrequency": "30", + "tableSuffix": "", + "timeWindowLayout": "2006/01/02/15" + }, + "Enabled": true + } + }, + ], + method: 'POST', }, - destination: { - Config: { - bucketName: 'ps-data-mdm-prod-rudderstack', - prefix: '', - namespace: '', - credentials: 'randomcreds', - syncFrequency: '30', - tableSuffix: '', - timeWindowLayout: '2006/01/02/15', - }, - Enabled: true, + pathSuffix: '', + }, + output: { + response: { + status: 200, + body: [ + { + "output": { + "metadata": { + "table": "tracks", + "columns": { + "uuid_ts": "datetime", + "context_app_build": "string", + "context_app_name": "string", + "context_app_namespace": "string", + "context_app_version": "string", + "context_traits_email": "string", + "context_library_name": "string", + "context_library_version": "string", + "context_user_agent": "string", + "context_locale": "string", + "context_screen_density": "int", + "event_text": "string", + "id": "string", + "anonymous_id": "string", + "user_id": "string", + "sent_at": "datetime", + "received_at": "datetime", + "original_timestamp": "datetime", + "channel": "string", + "event": "string" + }, + "receivedAt": "2023-09-29T15:07:16.650Z" + }, + "data": { + "context_app_build": "1.0.0", + "context_app_name": "RudderLabs JavaScript SDK", + "context_app_namespace": "com.rudderlabs.javascript", + "context_app_version": "1.0.0", + "context_traits_email": "test@rudderstack.com", + "context_library_name": "RudderLabs JavaScript SDK", + "context_library_version": "1.0.0", + "context_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", + "context_locale": "en-US", + "context_screen_density": 2, + "event_text": "Product List Clicked", + "id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "anonymous_id": "00000000000000000000000000", + "user_id": "12345", + "sent_at": "2019-10-14T11:15:53.296Z", + "received_at": "2023-09-29T15:07:16.650Z", + "original_timestamp": "2019-10-14T11:15:18.300Z", + "channel": "web", + "event": "product_list_clicked" + }, + "userId": "" + }, + "statusCode": 200 + }, + { + "output": { + "metadata": { + "table": "product_list_clicked", + "columns": { + "uuid_ts": "datetime", + "list_id": "string", + "category": "string", + "context_app_build": "string", + "context_app_name": "string", + "context_app_namespace": "string", + "context_app_version": "string", + "context_traits_email": "string", + "context_library_name": "string", + "context_library_version": "string", + "context_user_agent": "string", + "context_locale": "string", + "context_screen_density": "int", + "event_text": "string", + "id": "string", + "anonymous_id": "string", + "user_id": "string", + "sent_at": "datetime", + "received_at": "datetime", + "original_timestamp": "datetime", + "channel": "string", + "event": "string" + }, + "receivedAt": "2023-09-29T15:07:16.650Z" + }, + "data": { + "list_id": "Sample Product List", + "category": "Sample Product List", + "context_app_build": "1.0.0", + "context_app_name": "RudderLabs JavaScript SDK", + "context_app_namespace": "com.rudderlabs.javascript", + "context_app_version": "1.0.0", + "context_traits_email": "test@rudderstack.com", + "context_library_name": "RudderLabs JavaScript SDK", + "context_library_version": "1.0.0", + "context_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", + "context_locale": "en-US", + "context_screen_density": 2, + "event_text": "Product List Clicked", + "id": "ec5481b6-a926-4d2e-b293-0b3a77c4d3be", + "anonymous_id": "00000000000000000000000000", + "user_id": "12345", + "sent_at": "2019-10-14T11:15:53.296Z", + "received_at": "2023-09-29T15:07:16.650Z", + "original_timestamp": "2019-10-14T11:15:18.300Z", + "channel": "web", + "event": "product_list_clicked" + }, + "userId": "" + }, + "statusCode": 200 + } + ], }, - }, - ], - method: 'POST', - }, - pathSuffix: '', - }, - output: { - response: { - status: 200, - body: [ - { - output: { - metadata: { - table: 'tracks', - columns: { - uuid_ts: 'datetime', - context_app_build: 'string', - context_app_name: 'string', - context_app_namespace: 'string', - context_app_version: 'string', - context_traits_email: 'string', - context_library_name: 'string', - context_library_version: 'string', - context_user_agent: 'string', - context_locale: 'string', - context_screen_density: 'int', - event_text: 'string', - id: 'string', - anonymous_id: 'string', - user_id: 'string', - sent_at: 'datetime', - received_at: 'datetime', - original_timestamp: 'datetime', - channel: 'string', - event: 'string', - }, - receivedAt: '2023-09-29T15:07:16.650Z', - }, - data: { - context_app_build: '1.0.0', - context_app_name: 'RudderLabs JavaScript SDK', - context_app_namespace: 'com.rudderlabs.javascript', - context_app_version: '1.0.0', - context_traits_email: 'test@rudderstack.com', - context_library_name: 'RudderLabs JavaScript SDK', - context_library_version: '1.0.0', - context_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', - context_locale: 'en-US', - context_screen_density: 2, - event_text: 'Product List Clicked', - id: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', - anonymous_id: '00000000000000000000000000', - user_id: '12345', - sent_at: '2019-10-14T11:15:53.296Z', - received_at: '2023-09-29T15:07:16.650Z', - original_timestamp: '2019-10-14T11:15:18.300Z', - channel: 'web', - event: 'product_list_clicked', - }, - userId: '', - }, - statusCode: 200, - }, - { - output: { - metadata: { - table: 'product_list_clicked', - columns: { - uuid_ts: 'datetime', - list_id: 'string', - category: 'string', - context_app_build: 'string', - context_app_name: 'string', - context_app_namespace: 'string', - context_app_version: 'string', - context_traits_email: 'string', - context_library_name: 'string', - context_library_version: 'string', - context_user_agent: 'string', - context_locale: 'string', - context_screen_density: 'int', - event_text: 'string', - id: 'string', - anonymous_id: 'string', - user_id: 'string', - sent_at: 'datetime', - received_at: 'datetime', - original_timestamp: 'datetime', - channel: 'string', - event: 'string', - }, - receivedAt: '2023-09-29T15:07:16.650Z', - }, - data: { - list_id: 'Sample Product List', - category: 'Sample Product List', - context_app_build: '1.0.0', - context_app_name: 'RudderLabs JavaScript SDK', - context_app_namespace: 'com.rudderlabs.javascript', - context_app_version: '1.0.0', - context_traits_email: 'test@rudderstack.com', - context_library_name: 'RudderLabs JavaScript SDK', - context_library_version: '1.0.0', - context_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', - context_locale: 'en-US', - context_screen_density: 2, - event_text: 'Product List Clicked', - id: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', - anonymous_id: '00000000000000000000000000', - user_id: '12345', - sent_at: '2019-10-14T11:15:53.296Z', - received_at: '2023-09-29T15:07:16.650Z', - original_timestamp: '2019-10-14T11:15:18.300Z', - channel: 'web', - event: 'product_list_clicked', - }, - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, + }, + } ]; diff --git a/test/integrations/destinations/gladly/router/data.ts b/test/integrations/destinations/gladly/router/data.ts index 462edd9772..413c92e247 100644 --- a/test/integrations/destinations/gladly/router/data.ts +++ b/test/integrations/destinations/gladly/router/data.ts @@ -22,21 +22,32 @@ export const data = [ lastName: 'Rudderlabs', address: 'california usa', }, - externalId: [{ id: 'user@1', type: 'GladlyCustomerId' }], + 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 } }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, Config: { apiToken: 'testApiToken', userName: 'testUserName', domain: 'rudderlabs.us-uat.gladly.qa', }, }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, }, { message: { @@ -51,21 +62,32 @@ export const data = [ lastName: 'Rudderstack', address: 'New York, USA', }, - externalId: [{ id: 'user@2', type: 'GladlyCustomerId' }], + 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 } }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, Config: { apiToken: 'testApiToken', userName: 'testUserName', domain: 'rudderlabs.us-uat.gladly.qa', }, }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, }, { message: { @@ -78,21 +100,32 @@ export const data = [ lastName: 'Rudderstack', address: 'New York, USA', }, - externalId: [{ id: 'user@3', type: 'GladlyCustomerId' }], + 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 } }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, Config: { apiToken: 'testApiToken', userName: 'testUserName', domain: 'rudderlabs.us-uat.gladly.qa', }, }, - metadata: { jobId: 3, userId: 'u1' }, + metadata: { + jobId: 3, + }, }, ], destType: 'gladly', @@ -112,11 +145,21 @@ export const data = [ FORM: {}, JSON: { address: 'california usa', - customAttributes: { age: 23 }, - emails: [{ original: 'test@rudderlabs.com' }], + customAttributes: { + age: 23, + }, + emails: [ + { + original: 'test@rudderlabs.com', + }, + ], externalCustomerId: 'externalCustomer@1', id: 'user@1', - phones: [{ original: '+91 9999999999' }], + phones: [ + { + original: '+91 9999999999', + }, + ], }, JSON_ARRAY: {}, XML: {}, @@ -138,9 +181,17 @@ export const data = [ domain: 'rudderlabs.us-uat.gladly.qa', userName: 'testUserName', }, - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, }, - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [ + { + jobId: 1, + }, + ], statusCode: 200, }, { @@ -150,10 +201,20 @@ export const data = [ FORM: {}, JSON: { address: 'New York, USA', - customAttributes: { age: 23 }, - emails: [{ original: 'test+2@rudderlabs.com' }], + customAttributes: { + age: 23, + }, + emails: [ + { + original: 'test+2@rudderlabs.com', + }, + ], externalCustomerId: 'externalCustomer@2', - phones: [{ original: '+91 9999999998' }], + phones: [ + { + original: '+91 9999999998', + }, + ], }, JSON_ARRAY: {}, XML: {}, @@ -175,9 +236,17 @@ export const data = [ domain: 'rudderlabs.us-uat.gladly.qa', userName: 'testUserName', }, - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], statusCode: 200, }, { @@ -188,7 +257,11 @@ export const data = [ JSON: { address: 'New York, USA', externalCustomerId: 'externalCustomer@3', - phones: [{ original: '+91 9999999988' }], + phones: [ + { + original: '+91 9999999988', + }, + ], }, JSON_ARRAY: {}, XML: {}, @@ -210,9 +283,17 @@ export const data = [ domain: 'rudderlabs.us-uat.gladly.qa', userName: 'testUserName', }, - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, }, - metadata: [{ jobId: 3, userId: 'u1' }], + metadata: [ + { + jobId: 3, + }, + ], statusCode: 200, }, ], @@ -235,7 +316,12 @@ export const data = [ userId: 'externalCustomer@1', channel: 'web', context: { - externalId: [{ id: 'externalCustomer@1', identifierType: 'externalCustomerId' }], + externalId: [ + { + id: 'externalCustomer@1', + identifierType: 'externalCustomerId', + }, + ], mappedToDestination: true, }, traits: { @@ -251,21 +337,32 @@ export const data = [ timestamp: '2023-11-22T10:12:44.75705:30', }, destination: { - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, Config: { apiToken: 'testApiToken', userName: 'testUserName', domain: 'rudderlabs.us-uat.gladly.qa', }, }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, }, { message: { userId: 'externalCustomer@2', channel: 'web', context: { - externalId: [{ id: 'externalCustomer@2', identifierType: 'externalCustomerId' }], + externalId: [ + { + id: 'externalCustomer@2', + identifierType: 'externalCustomerId', + }, + ], mappedToDestination: true, }, traits: { @@ -281,21 +378,32 @@ export const data = [ timestamp: '2023-11-22T10:12:44.75705:30', }, destination: { - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, Config: { apiToken: 'testApiToken', userName: 'testUserName', domain: 'rudderlabs.us-uat.gladly.qa', }, }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, }, { message: { userId: 'externalCustomer@3', channel: 'web', context: { - externalId: [{ id: 'externalCustomer@3', identifierType: 'externalCustomerId' }], + externalId: [ + { + id: 'externalCustomer@3', + identifierType: 'externalCustomerId', + }, + ], mappedToDestination: true, }, traits: { @@ -310,14 +418,20 @@ export const data = [ timestamp: '2023-11-22T10:12:44.75705:30', }, destination: { - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, Config: { apiToken: 'testApiToken', userName: 'testUserName', domain: 'rudderlabs.us-uat.gladly.qa', }, }, - metadata: { jobId: 3, userId: 'u1' }, + metadata: { + jobId: 3, + }, }, ], destType: 'gladly', @@ -337,10 +451,18 @@ export const data = [ FORM: {}, JSON: { address: 'california usa', - emails: [{ original: 'test@rudderlabs.com' }], + emails: [ + { + original: 'test@rudderlabs.com', + }, + ], externalCustomerId: 'externalCustomer@1', id: 'user@1', - phones: [{ original: '+91 9999999999' }], + phones: [ + { + original: '+91 9999999999', + }, + ], }, JSON_ARRAY: {}, XML: {}, @@ -362,9 +484,17 @@ export const data = [ domain: 'rudderlabs.us-uat.gladly.qa', userName: 'testUserName', }, - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, }, - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [ + { + jobId: 1, + }, + ], statusCode: 200, }, { @@ -374,9 +504,17 @@ export const data = [ FORM: {}, JSON: { address: 'New York, USA', - emails: [{ original: 'test+2@rudderlabs.com' }], + emails: [ + { + original: 'test+2@rudderlabs.com', + }, + ], externalCustomerId: 'externalCustomer@2', - phones: [{ original: '+91 9999999998' }], + phones: [ + { + original: '+91 9999999998', + }, + ], }, JSON_ARRAY: {}, XML: {}, @@ -398,9 +536,17 @@ export const data = [ domain: 'rudderlabs.us-uat.gladly.qa', userName: 'testUserName', }, - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], statusCode: 200, }, { @@ -411,7 +557,11 @@ export const data = [ JSON: { address: 'New York, USA', externalCustomerId: 'externalCustomer@3', - phones: [{ original: '+91 9999999988' }], + phones: [ + { + original: '+91 9999999988', + }, + ], }, JSON_ARRAY: {}, XML: {}, @@ -433,9 +583,17 @@ export const data = [ domain: 'rudderlabs.us-uat.gladly.qa', userName: 'testUserName', }, - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, }, - metadata: [{ jobId: 3, userId: 'u1' }], + metadata: [ + { + jobId: 3, + }, + ], statusCode: 200, }, ], 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 62ee03c46d..4153630323 100644 --- a/test/integrations/destinations/google_adwords_enhanced_conversions/router/data.ts +++ b/test/integrations/destinations/google_adwords_enhanced_conversions/router/data.ts @@ -17,7 +17,6 @@ export const data = [ developer_token: 'ijkl91011', }, jobId: 1, - userId: 'u1', }, destination: { Config: { @@ -26,8 +25,12 @@ export const data = [ subAccount: true, loginCustomerId: '11', listOfConversions: [ - { conversions: 'Page View' }, - { conversions: 'Product Added' }, + { + conversions: 'Page View', + }, + { + conversions: 'Product Added', + }, ], authStatus: 'active', }, @@ -49,13 +52,21 @@ export const data = [ state: 'UK', streetAddress: '71 Cherry Court SOUTHAMPTON SO53 5PD UK', }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', locale: 'en-US', ip: '0.0.0.0', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, }, event: 'Page View', type: 'track', @@ -99,7 +110,9 @@ export const data = [ }, ], }, - integrations: { All: true }, + integrations: { + All: true, + }, name: 'ApplicationLoaded', sentAt: '2019-10-14T11:15:53.296Z', }, @@ -112,7 +125,6 @@ export const data = [ developer_token: 'ijkl91011', }, jobId: 2, - userId: 'u1', }, destination: { Config: { @@ -121,15 +133,21 @@ export const data = [ subAccount: true, loginCustomerId: '', listOfConversions: [ - { conversions: 'Page View' }, - { conversions: 'Product Added' }, + { + conversions: 'Page View', + }, + { + conversions: 'Product Added', + }, ], authStatus: 'active', }, }, message: { type: 'identify', - traits: { status: 'elizabeth' }, + traits: { + status: 'elizabeth', + }, userId: 'emrichardson820+22822@gmail.com', channel: 'sources', context: { @@ -156,7 +174,10 @@ export const data = [ }, }, { - metadata: { secret: {}, jobId: 3, userId: 'u1' }, + metadata: { + secret: {}, + jobId: 3, + }, destination: { Config: { rudderAccountId: '25u5whFH7gVTnCiAjn4ykoCLGoC', @@ -164,8 +185,12 @@ export const data = [ subAccount: true, loginCustomerId: '11', listOfConversions: [ - { conversions: 'Page View' }, - { conversions: 'Product Added' }, + { + conversions: 'Page View', + }, + { + conversions: 'Product Added', + }, ], authStatus: 'active', }, @@ -187,13 +212,21 @@ export const data = [ state: 'UK', streetAddress: '71 Cherry Court SOUTHAMPTON SO53 5PD UK', }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', locale: 'en-US', ip: '0.0.0.0', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, }, event: 'Page View', type: 'track', @@ -237,7 +270,9 @@ export const data = [ }, ], }, - integrations: { All: true }, + integrations: { + All: true, + }, name: 'ApplicationLoaded', sentAt: '2019-10-14T11:15:53.296Z', }, @@ -276,7 +311,10 @@ export const data = [ gclid: 'gclid1234', conversionDateTime: '2022-01-01 12:32:45-08:00', }, - restatementValue: { adjustedValue: 10, currencyCode: 'INR' }, + restatementValue: { + adjustedValue: 10, + currencyCode: 'INR', + }, orderId: '10000', adjustmentDateTime: '2022-01-01 12:32:45-08:00', userAgent: @@ -317,7 +355,6 @@ export const data = [ developer_token: 'ijkl91011', }, jobId: 1, - userId: 'u1', }, ], batched: false, @@ -345,7 +382,6 @@ export const data = [ developer_token: 'ijkl91011', }, jobId: 2, - userId: 'u1', }, ], destination: { @@ -355,8 +391,12 @@ export const data = [ subAccount: true, loginCustomerId: '', listOfConversions: [ - { conversions: 'Page View' }, - { conversions: 'Product Added' }, + { + conversions: 'Page View', + }, + { + conversions: 'Product Added', + }, ], authStatus: 'active', }, @@ -374,7 +414,12 @@ export const data = [ }, }, { - metadata: [{ secret: {}, jobId: 3, userId: 'u1' }], + metadata: [ + { + secret: {}, + jobId: 3, + }, + ], destination: { Config: { rudderAccountId: '25u5whFH7gVTnCiAjn4ykoCLGoC', @@ -382,8 +427,12 @@ export const data = [ subAccount: true, loginCustomerId: '11', listOfConversions: [ - { conversions: 'Page View' }, - { conversions: 'Product Added' }, + { + conversions: 'Page View', + }, + { + conversions: 'Product Added', + }, ], authStatus: 'active', }, diff --git a/test/integrations/destinations/google_adwords_offline_conversions/dataDelivery/data.ts b/test/integrations/destinations/google_adwords_offline_conversions/dataDelivery/data.ts index ae75273399..284632ae09 100644 --- a/test/integrations/destinations/google_adwords_offline_conversions/dataDelivery/data.ts +++ b/test/integrations/destinations/google_adwords_offline_conversions/dataDelivery/data.ts @@ -1,768 +1,750 @@ export const data = [ - { - name: 'google_adwords_offline_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/11122233331/offlineUserDataJobs', - headers: { - Authorization: 'Bearer abcd1234', - 'Content-Type': 'application/json', - 'developer-token': 'ijkl91011', - 'login-customer-id': 'logincustomerid', - }, - params: { - customerId: '1112223333', - event: 'Sign-up - click', - }, - body: { - JSON: { - addConversionPayload: { - enable_partial_failure: false, - enable_warnings: false, - operations: [ - { - create: { - transaction_attribute: { - CUSTOM_KEY: 'CUSTOM_VALUE', - currency_code: 'INR', - order_id: 'order id', - store_attribute: { - store_code: 'store code', - }, - transaction_amount_micros: '100000000', - transaction_date_time: '2019-10-14 11:15:18+00:00', - }, - userIdentifiers: [ - { - hashedEmail: - '6db61e6dcbcf2390e4a46af26f26a133a3bee45021422fc7ae86e9136f14110', - userIdentifierSource: 'UNSPECIFIED', - }, - ], + { + name: 'google_adwords_offline_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/11122233331/offlineUserDataJobs", + "headers": { + "Authorization": "Bearer abcd1234", + "Content-Type": "application/json", + "developer-token": "ijkl91011", + "login-customer-id": "logincustomerid" }, - }, - ], - validate_only: false, - }, - createJobPayload: { - job: { - storeSalesMetadata: { - custom_key: 'CUSTOM_KEY', - loyaltyFraction: 1, - transaction_upload_fraction: '1', - }, - type: 'STORE_SALES_UPLOAD_FIRST_PARTY', - }, - }, - event: '1112223333', - executeJobPayload: { - validate_only: false, - }, - isStoreConversion: true, - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - }, - method: 'POST', - }, - }, - output: { - response: { - status: 400, - body: { - output: { - status: 400, - message: - '[Google Ads Offline Conversions]:: Request contains an invalid argument. during google_ads_offline_store_conversions Add Conversion', - destinationResponse: { - error: { - code: 400, - details: [ - { - '@type': 'type.googleapis.com/google.ads.googleads.v14.errors.GoogleAdsFailure', - errors: [ - { - errorCode: { - offlineUserDataJobError: 'INVALID_SHA256_FORMAT', - }, - message: 'The SHA256 encoded value is malformed.', - location: { - fieldPathElements: [ - { - fieldName: 'operations', - index: 0, - }, - { - fieldName: 'create', + "params": { + "customerId": "1112223333", + "event": "Sign-up - click" + }, + "body": { + "JSON": { + "addConversionPayload": { + "enable_partial_failure": false, + "enable_warnings": false, + "operations": [ + { + "create": { + "transaction_attribute": { + "CUSTOM_KEY": "CUSTOM_VALUE", + "currency_code": "INR", + "order_id": "order id", + "store_attribute": { + "store_code": "store code" + }, + "transaction_amount_micros": "100000000", + "transaction_date_time": "2019-10-14 11:15:18+00:00" + }, + "userIdentifiers": [ + { + "hashedEmail": "6db61e6dcbcf2390e4a46af26f26a133a3bee45021422fc7ae86e9136f14110", + "userIdentifierSource": "UNSPECIFIED" + } + ] + } + } + ], + "validate_only": false }, - { - fieldName: 'user_identifiers', - index: 0, + "createJobPayload": { + "job": { + "storeSalesMetadata": { + "custom_key": "CUSTOM_KEY", + "loyaltyFraction": 1, + "transaction_upload_fraction": "1" + }, + "type": "STORE_SALES_UPLOAD_FIRST_PARTY" + } }, - { - fieldName: 'hashed_email', + "event": "1112223333", + "executeJobPayload": { + "validate_only": false }, - ], + "isStoreConversion": true }, - }, - ], - requestId: '68697987', - }, - ], - message: 'Request contains an invalid argument.', - status: 'INVALID_ARGUMENT', - }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + }, + method: 'POST', }, - statTags: { - destType: 'GOOGLE_ADWORDS_OFFLINE_CONVERSIONS', - destinationId: 'Non-determininable', - errorCategory: 'network', - errorType: 'aborted', - feature: 'dataDelivery', - implementation: 'native', - module: 'destination', - workspaceId: 'Non-determininable', + }, + output: { + response: { + status: 400, + body: { + "output": { + "status": 400, + "message": "[Google Ads Offline Conversions]:: Request contains an invalid argument. during google_ads_offline_store_conversions Add Conversion", + "destinationResponse": { + "error": { + "code": 400, + "details": [ + { + "@type": "type.googleapis.com/google.ads.googleads.v14.errors.GoogleAdsFailure", + "errors": [ + { + "errorCode": { + "offlineUserDataJobError": "INVALID_SHA256_FORMAT" + }, + "message": "The SHA256 encoded value is malformed.", + "location": { + "fieldPathElements": [ + { + "fieldName": "operations", + "index": 0 + }, + { + "fieldName": "create" + }, + { + "fieldName": "user_identifiers", + "index": 0 + }, + { + "fieldName": "hashed_email" + } + ] + } + } + ], + "requestId": "68697987" + } + ], + "message": "Request contains an invalid argument.", + "status": "INVALID_ARGUMENT" + } + }, + "statTags": { + "destType": "GOOGLE_ADWORDS_OFFLINE_CONVERSIONS", + "destinationId": "Non-determininable", + "errorCategory": "network", + "errorType": "aborted", + "feature": "dataDelivery", + "implementation": "native", + "module": "destination", + "workspaceId": "Non-determininable", + } + } + }, }, - }, }, - }, }, - }, - { - name: 'google_adwords_offline_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/1112223333/offlineUserDataJobs', - headers: { - Authorization: 'Bearer abcd1234', - 'Content-Type': 'application/json', - 'developer-token': 'ijkl91011', - 'login-customer-id': 'logincustomerid', - }, - params: { - customerId: '1112223333', - event: 'Sign-up - click', - }, - body: { - JSON: { - addConversionPayload: { - enable_partial_failure: false, - enable_warnings: false, - operations: [ - { - create: { - transaction_attribute: { - CUSTOM_KEY: 'CUSTOM_VALUE', - currency_code: 'INR', - order_id: 'order id', - store_attribute: { - store_code: 'store code', - }, - transaction_amount_micros: '100000000', - transaction_date_time: '2019-10-14 11:15:18+00:00', - }, - userIdentifiers: [ - { - hashedEmail: - '6db61e6dcbcf2390e4a46af426f26a133a3bee45021422fc7ae86e9136f14110', - userIdentifierSource: 'UNSPECIFIED', + { + name: 'google_adwords_offline_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/1112223333/offlineUserDataJobs", + "headers": { + "Authorization": "Bearer abcd1234", + "Content-Type": "application/json", + "developer-token": "ijkl91011", + "login-customer-id": "logincustomerid" + }, + "params": { + "customerId": "1112223333", + "event": "Sign-up - click" + }, + "body": { + "JSON": { + "addConversionPayload": { + "enable_partial_failure": false, + "enable_warnings": false, + "operations": [ + { + "create": { + "transaction_attribute": { + "CUSTOM_KEY": "CUSTOM_VALUE", + "currency_code": "INR", + "order_id": "order id", + "store_attribute": { + "store_code": "store code" + }, + "transaction_amount_micros": "100000000", + "transaction_date_time": "2019-10-14 11:15:18+00:00" + }, + "userIdentifiers": [ + { + "hashedEmail": "6db61e6dcbcf2390e4a46af426f26a133a3bee45021422fc7ae86e9136f14110", + "userIdentifierSource": "UNSPECIFIED" + } + ] + } + } + ], + "validate_only": false + }, + "createJobPayload": { + "job": { + "storeSalesMetadata": { + "custom_key": "CUSTOM_KEY", + "loyaltyFraction": 1, + "transaction_upload_fraction": "1" + }, + "type": "STORE_SALES_UPLOAD_FIRST_PARTY" + } + }, + "event": "1112223333", + "executeJobPayload": { + "validate_only": false + }, + "isStoreConversion": true }, - ], + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} }, - }, - ], - validate_only: false, - }, - createJobPayload: { - job: { - storeSalesMetadata: { - custom_key: 'CUSTOM_KEY', - loyaltyFraction: 1, - transaction_upload_fraction: '1', - }, - type: 'STORE_SALES_UPLOAD_FIRST_PARTY', - }, - }, - event: '1112223333', - executeJobPayload: { - validate_only: false, - }, - isStoreConversion: true, + "files": {} + } }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, }, - }, - }, - output: { - response: { - status: 200, - body: { - output: { - status: 200, - message: - '[Google Ads Offline Conversions Response Handler] - Request processed successfully', - destinationResponse: { - response: { - name: 'customers/111-222-3333/operations/abcd=', - }, - status: 200, + output: { + response: { + status: 200, + body: { + "output": { + "status": 200, + "message": "[Google Ads Offline Conversions Response Handler] - Request processed successfully", + "destinationResponse": { + "response": { + "name": "customers/111-222-3333/operations/abcd=" + }, + "status": 200 + } + } + }, }, - }, }, - }, }, - }, - { - name: 'google_adwords_offline_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/customerid/offlineUserDataJobs', - headers: { - Authorization: 'Bearer abcd1234', - 'Content-Type': 'application/json', - 'developer-token': 'ijkl91011', - 'login-customer-id': 'logincustomerid', - }, - params: { - customerId: '1112223333', - event: 'Sign-up - click', - }, - body: { - JSON: { - addConversionPayload: { - enable_partial_failure: false, - enable_warnings: false, - operations: [ - { - create: { - transaction_attribute: { - CUSTOM_KEY: 'CUSTOM_VALUE', - currency_code: 'INR', - order_id: 'order id', - store_attribute: { - store_code: 'store code', - }, - transaction_amount_micros: '100000000', - transaction_date_time: '2019-10-14 11:15:18+00:00', - }, - userIdentifiers: [ - { - hashedEmail: - '6db61e6dcbcf2390e4a46af426f26a133a3bee45021422fc7ae86e9136f14110', - userIdentifierSource: 'UNSPECIFIED', + { + name: 'google_adwords_offline_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/customerid/offlineUserDataJobs", + "headers": { + "Authorization": "Bearer abcd1234", + "Content-Type": "application/json", + "developer-token": "ijkl91011", + "login-customer-id": "logincustomerid" + }, + "params": { + "customerId": "1112223333", + "event": "Sign-up - click" + }, + "body": { + "JSON": { + "addConversionPayload": { + "enable_partial_failure": false, + "enable_warnings": false, + "operations": [ + { + "create": { + "transaction_attribute": { + "CUSTOM_KEY": "CUSTOM_VALUE", + "currency_code": "INR", + "order_id": "order id", + "store_attribute": { + "store_code": "store code" + }, + "transaction_amount_micros": "100000000", + "transaction_date_time": "2019-10-14 11:15:18+00:00" + }, + "userIdentifiers": [ + { + "hashedEmail": "6db61e6dcbcf2390e4a46af426f26a133a3bee45021422fc7ae86e9136f14110", + "userIdentifierSource": "UNSPECIFIED" + } + ] + } + } + ], + "validate_only": false + }, + "createJobPayload": { + "job": { + "storeSalesMetadata": { + "custom_key": "CUSTOM_KEY", + "loyaltyFraction": 1, + "transaction_upload_fraction": "1" + }, + "type": "STORE_SALES_UPLOAD_FIRST_PARTY" + } + }, + "event": "1112223333", + "executeJobPayload": { + "validate_only": false + }, + "isStoreConversion": true }, - ], + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} }, - }, - ], - validate_only: false, - }, - createJobPayload: { - job: { - storeSalesMetadata: { - custom_key: 'CUSTOM_KEY', - loyaltyFraction: 1, - transaction_upload_fraction: '1', - }, - type: 'STORE_SALES_UPLOAD_FIRST_PARTY', - }, - }, - event: '1112223333', - executeJobPayload: { - validate_only: false, - }, - isStoreConversion: true, + "files": {} + } }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, }, - }, - }, - output: { - response: { - status: 401, - body: { - output: { - status: 401, - message: - '[Google Ads Offline Conversions]:: 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_ads_offline_store_conversions Job Creation', - 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_OFFLINE_CONVERSIONS', - destinationId: 'Non-determininable', - errorCategory: 'network', - errorType: 'aborted', - feature: 'dataDelivery', - implementation: 'native', - module: 'destination', - workspaceId: 'Non-determininable', + output: { + response: { + status: 401, + body: { + "output": { + "status": 401, + "message": "[Google Ads Offline Conversions]:: 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_ads_offline_store_conversions Job Creation", + "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_OFFLINE_CONVERSIONS", + "destinationId": "Non-determininable", + "errorCategory": "network", + "errorType": "aborted", + "feature": "dataDelivery", + "implementation": "native", + "module": "destination", + "workspaceId": "Non-determininable" + } + } + } }, - }, }, - }, }, - }, - { - name: 'google_adwords_offline_conversions', - description: 'Test 3', - feature: 'dataDelivery', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: - 'https://googleads.googleapis.com/v14/customers/1234567890:uploadClickConversions', - headers: { - Authorization: 'Bearer abcd1234', - 'Content-Type': 'application/json', - 'developer-token': 'ijkl91011', - }, - params: { - event: 'Sign-up - click', - customerId: '1234567890', - customVariables: [ - { - from: 'value', - to: 'revenue', - }, - { - from: 'total', - to: 'cost', - }, - ], - properties: { - gbraid: 'gbraid', - wbraid: 'wbraid', - externalAttributionCredit: 10, - externalAttributionModel: 'externalAttributionModel', - conversionCustomVariable: 'conversionCustomVariable', - value: 'value', - merchantId: '9876merchantId', - feedCountryCode: 'feedCountryCode', - feedLanguageCode: 'feedLanguageCode', - localTransactionCost: 20, - products: [ - { - product_id: '507f1f77bcf86cd799439011', - quantity: '2', - price: '50', - sku: '45790-32', - name: 'Monopoly: 3rd Edition', - position: '1', - category: 'cars', - url: 'https://www.example.com/product/path', - image_url: 'https://www.example.com/product/path.jpg', - }, - ], - userIdentifierSource: 'FIRST_PARTY', - conversionEnvironment: 'WEB', - gclid: 'gclid', - conversionDateTime: '2022-01-01 12:32:45-08:00', - conversionValue: '1', - currency: 'GBP', - orderId: 'PL-123QR', - }, - }, - body: { - JSON: { - conversions: [ - { - gbraid: 'gbraid', - wbraid: 'wbraid', - externalAttributionData: { - externalAttributionCredit: 10, - externalAttributionModel: 'externalAttributionModel', - }, - cartData: { - merchantId: 9876, - feedCountryCode: 'feedCountryCode', - feedLanguageCode: 'feedLanguageCode', - localTransactionCost: 20, - items: [ - { - productId: '507f1f77bcf86cd799439011', - quantity: 2, - unitPrice: 50, - }, - ], - }, - userIdentifiers: [ - { - userIdentifierSource: 'FIRST_PARTY', - hashedEmail: - '6db61e6dcbcf2390e4a46af426f26a133a3bee45021422fc7ae86e9136f14110', + { + name: 'google_adwords_offline_conversions', + description: 'Test 3', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + request: { + "body": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://googleads.googleapis.com/v14/customers/1234567890:uploadClickConversions", + "headers": { + "Authorization": "Bearer abcd1234", + "Content-Type": "application/json", + "developer-token": "ijkl91011" }, - ], - conversionEnvironment: 'WEB', - gclid: 'gclid', - conversionDateTime: '2022-01-01 12:32:45-08:00', - conversionValue: 1, - currencyCode: 'GBP', - orderId: 'PL-123QR', - }, - ], - partialFailure: true, + "params": { + "event": "Sign-up - click", + "customerId": "1234567890", + "customVariables": [ + { + "from": "value", + "to": "revenue" + }, + { + "from": "total", + "to": "cost" + } + ], + "properties": { + "gbraid": "gbraid", + "wbraid": "wbraid", + "externalAttributionCredit": 10, + "externalAttributionModel": "externalAttributionModel", + "conversionCustomVariable": "conversionCustomVariable", + "value": "value", + "merchantId": "9876merchantId", + "feedCountryCode": "feedCountryCode", + "feedLanguageCode": "feedLanguageCode", + "localTransactionCost": 20, + "products": [ + { + "product_id": "507f1f77bcf86cd799439011", + "quantity": "2", + "price": "50", + "sku": "45790-32", + "name": "Monopoly: 3rd Edition", + "position": "1", + "category": "cars", + "url": "https://www.example.com/product/path", + "image_url": "https://www.example.com/product/path.jpg" + } + ], + "userIdentifierSource": "FIRST_PARTY", + "conversionEnvironment": "WEB", + "gclid": "gclid", + "conversionDateTime": "2022-01-01 12:32:45-08:00", + "conversionValue": "1", + "currency": "GBP", + "orderId": "PL-123QR" + } + }, + "body": { + "JSON": { + "conversions": [ + { + "gbraid": "gbraid", + "wbraid": "wbraid", + "externalAttributionData": { + "externalAttributionCredit": 10, + "externalAttributionModel": "externalAttributionModel" + }, + "cartData": { + "merchantId": 9876, + "feedCountryCode": "feedCountryCode", + "feedLanguageCode": "feedLanguageCode", + "localTransactionCost": 20, + "items": [ + { + "productId": "507f1f77bcf86cd799439011", + "quantity": 2, + "unitPrice": 50 + } + ] + }, + "userIdentifiers": [ + { + "userIdentifierSource": "FIRST_PARTY", + "hashedEmail": "6db61e6dcbcf2390e4a46af426f26a133a3bee45021422fc7ae86e9136f14110" + } + ], + "conversionEnvironment": "WEB", + "gclid": "gclid", + "conversionDateTime": "2022-01-01 12:32:45-08:00", + "conversionValue": 1, + "currencyCode": "GBP", + "orderId": "PL-123QR" + } + ], + "partialFailure": true + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + } }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, }, - }, - }, - output: { - response: { - status: 401, - body: { - output: { - status: 401, - message: - '[Google Ads Offline Conversions]:: [{"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"}}] during google_ads_offline_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_OFFLINE_CONVERSIONS', - destinationId: 'Non-determininable', - errorCategory: 'network', - errorType: 'aborted', - feature: 'dataDelivery', - implementation: 'native', - module: 'destination', - workspaceId: 'Non-determininable', + output: { + response: { + status: 401, + body: { + "output": { + "status": 401, + "message": "[Google Ads Offline Conversions]:: [{\"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\"}}] during google_ads_offline_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_OFFLINE_CONVERSIONS", + "destinationId": "Non-determininable", + "errorCategory": "network", + "errorType": "aborted", + "feature": "dataDelivery", + "implementation": "native", + "module": "destination", + "workspaceId": "Non-determininable", + } + } + } }, - }, }, - }, }, - }, - { - name: 'google_adwords_offline_conversions', - description: 'Test 4', - feature: 'dataDelivery', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: - 'https://googleads.googleapis.com/v14/customers/1234567891:uploadClickConversions', - headers: { - Authorization: 'Bearer abcd1234', - 'Content-Type': 'application/json', - 'developer-token': 'ijkl91011', - }, - params: { - event: 'Sign-up - click', - customerId: '1234567891', - customVariables: [ - { - from: 'Value', - to: 'revenue', - }, - { - from: 'total', - to: 'cost', - }, - ], - properties: { - gbraid: 'gbraid', - wbraid: 'wbraid', - externalAttributionCredit: 10, - externalAttributionModel: 'externalAttributionModel', - conversionCustomVariable: 'conversionCustomVariable', - Value: 'value', - merchantId: '9876merchantId', - feedCountryCode: 'feedCountryCode', - feedLanguageCode: 'feedLanguageCode', - localTransactionCost: 20, - products: [ - { - product_id: '507f1f77bcf86cd799439011', - quantity: '2', - price: '50', - sku: '45790-32', - name: 'Monopoly: 3rd Edition', - position: '1', - category: 'cars', - url: 'https://www.example.com/product/path', - image_url: 'https://www.example.com/product/path.jpg', - }, - ], - userIdentifierSource: 'FIRST_PARTY', - conversionEnvironment: 'WEB', - gclid: 'gclid', - conversionDateTime: '2022-01-01 12:32:45-08:00', - conversionValue: '1', - currency: 'GBP', - orderId: 'PL-123QR', - }, - }, - body: { - JSON: { - conversions: [ - { - gbraid: 'gbraid', - wbraid: 'wbraid', - externalAttributionData: { - externalAttributionCredit: 10, - externalAttributionModel: 'externalAttributionModel', - }, - cartData: { - merchantId: 9876, - feedCountryCode: 'feedCountryCode', - feedLanguageCode: 'feedLanguageCode', - localTransactionCost: 20, - items: [ - { - productId: '507f1f77bcf86cd799439011', - quantity: 2, - unitPrice: 50, - }, - ], - }, - userIdentifiers: [ - { - userIdentifierSource: 'FIRST_PARTY', - hashedPhoneNumber: - '04e1dabb7c1348b72bfa87da179c9697c69af74827649266a5da8cdbb367abcd', + { + name: 'google_adwords_offline_conversions', + description: 'Test 4', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + "request": { + "body": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://googleads.googleapis.com/v14/customers/1234567891:uploadClickConversions", + "headers": { + "Authorization": "Bearer abcd1234", + "Content-Type": "application/json", + "developer-token": "ijkl91011" }, - ], - conversionEnvironment: 'WEB', - gclid: 'gclid', - conversionDateTime: '2022-01-01 12:32:45-08:00', - conversionValue: 1, - currencyCode: 'GBP', - orderId: 'PL-123QR', - }, - ], - partialFailure: true, - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, + "params": { + "event": "Sign-up - click", + "customerId": "1234567891", + "customVariables": [ + { + "from": "Value", + "to": "revenue" + }, + { + "from": "total", + "to": "cost" + } + ], + "properties": { + "gbraid": "gbraid", + "wbraid": "wbraid", + "externalAttributionCredit": 10, + "externalAttributionModel": "externalAttributionModel", + "conversionCustomVariable": "conversionCustomVariable", + "Value": "value", + "merchantId": "9876merchantId", + "feedCountryCode": "feedCountryCode", + "feedLanguageCode": "feedLanguageCode", + "localTransactionCost": 20, + "products": [ + { + "product_id": "507f1f77bcf86cd799439011", + "quantity": "2", + "price": "50", + "sku": "45790-32", + "name": "Monopoly: 3rd Edition", + "position": "1", + "category": "cars", + "url": "https://www.example.com/product/path", + "image_url": "https://www.example.com/product/path.jpg" + } + ], + "userIdentifierSource": "FIRST_PARTY", + "conversionEnvironment": "WEB", + "gclid": "gclid", + "conversionDateTime": "2022-01-01 12:32:45-08:00", + "conversionValue": "1", + "currency": "GBP", + "orderId": "PL-123QR" + } + }, + "body": { + "JSON": { + "conversions": [ + { + "gbraid": "gbraid", + "wbraid": "wbraid", + "externalAttributionData": { + "externalAttributionCredit": 10, + "externalAttributionModel": "externalAttributionModel" + }, + "cartData": { + "merchantId": 9876, + "feedCountryCode": "feedCountryCode", + "feedLanguageCode": "feedLanguageCode", + "localTransactionCost": 20, + "items": [ + { + "productId": "507f1f77bcf86cd799439011", + "quantity": 2, + "unitPrice": 50 + } + ] + }, + "userIdentifiers": [ + { + "userIdentifierSource": "FIRST_PARTY", + "hashedPhoneNumber": "04e1dabb7c1348b72bfa87da179c9697c69af74827649266a5da8cdbb367abcd" + } + ], + "conversionEnvironment": "WEB", + "gclid": "gclid", + "conversionDateTime": "2022-01-01 12:32:45-08:00", + "conversionValue": 1, + "currencyCode": "GBP", + "orderId": "PL-123QR" + } + ], + "partialFailure": true + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + } + } }, - }, - }, - output: { - response: { - status: 200, - body: { - output: { - status: 200, - message: - '[Google Ads Offline Conversions Response Handler] - Request processed successfully', - destinationResponse: { - response: [ - { - adjustmentType: 'ENHANCEMENT', - conversionAction: 'customers/1234567891/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, + output: { + response: { + status: 200, + body: { + "output": { + "status": 200, + "message": "[Google Ads Offline Conversions Response Handler] - Request processed successfully", + "destinationResponse": { + "response": [ + { + "adjustmentType": "ENHANCEMENT", + "conversionAction": "customers/1234567891/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 + } + } + } }, - }, }, - }, }, - }, - { - name: 'google_adwords_offline_conversions', - description: 'Test 5', - feature: 'dataDelivery', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: - 'https://googleads.googleapis.com/v14/customers/1234567891:uploadClickConversions', - headers: { - Authorization: 'Bearer abcd1234', - 'Content-Type': 'application/json', - 'developer-token': 'ijkl91011', - }, - params: { - event: 'Sign-up - click', - customerId: '1234567891', - customVariables: [], - properties: { - gbraid: 'gbraid', - wbraid: 'wbraid', - externalAttributionCredit: 10, - externalAttributionModel: 'externalAttributionModel', - conversionCustomVariable: 'conversionCustomVariable', - value: 'value', - merchantId: '9876merchantId', - feedCountryCode: 'feedCountryCode', - feedLanguageCode: 'feedLanguageCode', - localTransactionCost: 20, - products: [ - { - product_id: '507f1f77bcf86cd799439011', - quantity: '2', - price: '50', - sku: '45790-32', - name: 'Monopoly: 3rd Edition', - position: '1', - category: 'cars', - url: 'https://www.example.com/product/path', - image_url: 'https://www.example.com/product/path.jpg', - }, - ], - userIdentifierSource: 'FIRST_PARTY', - conversionEnvironment: 'WEB', - gclid: 'gclid', - conversionDateTime: '2022-01-01 12:32:45-08:00', - conversionValue: '1', - currency: 'GBP', - orderId: 'PL-123QR', - }, - }, - body: { - JSON: { - conversions: [ - { - gbraid: 'gbraid', - wbraid: 'wbraid', - externalAttributionData: { - externalAttributionCredit: 10, - externalAttributionModel: 'externalAttributionModel', - }, - cartData: { - merchantId: 9876, - feedCountryCode: 'feedCountryCode', - feedLanguageCode: 'feedLanguageCode', - localTransactionCost: 20, - items: [ - { - productId: '507f1f77bcf86cd799439011', - quantity: 2, - unitPrice: 50, - }, - ], - }, - userIdentifiers: [ - { - userIdentifierSource: 'FIRST_PARTY', - hashedPhoneNumber: - '04e1dabb7c1348b72bfa87da179c9697c69af74827649266a5da8cdbb367abcd', + { + name: 'google_adwords_offline_conversions', + description: 'Test 5', + feature: 'dataDelivery', + module: 'destination', + version: 'v0', + input: { + "request": { + "body": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://googleads.googleapis.com/v14/customers/1234567891:uploadClickConversions", + "headers": { + "Authorization": "Bearer abcd1234", + "Content-Type": "application/json", + "developer-token": "ijkl91011" }, - ], - conversionEnvironment: 'WEB', - gclid: 'gclid', - conversionDateTime: '2022-01-01 12:32:45-08:00', - conversionValue: 1, - currencyCode: 'GBP', - orderId: 'PL-123QR', - }, - ], - partialFailure: true, - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, + "params": { + "event": "Sign-up - click", + "customerId": "1234567891", + "customVariables": [], + "properties": { + "gbraid": "gbraid", + "wbraid": "wbraid", + "externalAttributionCredit": 10, + "externalAttributionModel": "externalAttributionModel", + "conversionCustomVariable": "conversionCustomVariable", + "value": "value", + "merchantId": "9876merchantId", + "feedCountryCode": "feedCountryCode", + "feedLanguageCode": "feedLanguageCode", + "localTransactionCost": 20, + "products": [ + { + "product_id": "507f1f77bcf86cd799439011", + "quantity": "2", + "price": "50", + "sku": "45790-32", + "name": "Monopoly: 3rd Edition", + "position": "1", + "category": "cars", + "url": "https://www.example.com/product/path", + "image_url": "https://www.example.com/product/path.jpg" + } + ], + "userIdentifierSource": "FIRST_PARTY", + "conversionEnvironment": "WEB", + "gclid": "gclid", + "conversionDateTime": "2022-01-01 12:32:45-08:00", + "conversionValue": "1", + "currency": "GBP", + "orderId": "PL-123QR" + } + }, + "body": { + "JSON": { + "conversions": [ + { + "gbraid": "gbraid", + "wbraid": "wbraid", + "externalAttributionData": { + "externalAttributionCredit": 10, + "externalAttributionModel": "externalAttributionModel" + }, + "cartData": { + "merchantId": 9876, + "feedCountryCode": "feedCountryCode", + "feedLanguageCode": "feedLanguageCode", + "localTransactionCost": 20, + "items": [ + { + "productId": "507f1f77bcf86cd799439011", + "quantity": 2, + "unitPrice": 50 + } + ] + }, + "userIdentifiers": [ + { + "userIdentifierSource": "FIRST_PARTY", + "hashedPhoneNumber": "04e1dabb7c1348b72bfa87da179c9697c69af74827649266a5da8cdbb367abcd" + } + ], + "conversionEnvironment": "WEB", + "gclid": "gclid", + "conversionDateTime": "2022-01-01 12:32:45-08:00", + "conversionValue": 1, + "currencyCode": "GBP", + "orderId": "PL-123QR" + } + ], + "partialFailure": true + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {} + } + } }, - }, - }, - output: { - response: { - status: 200, - body: { - output: { - destinationResponse: { - response: [ - { - adjustmentDateTime: '2021-01-01 12:32:45-08:00', - adjustmentType: 'ENHANCEMENT', - conversionAction: 'customers/1234567891/conversionActions/874224905', - gclidDateTimePair: { - conversionDateTime: '2021-01-01 12:32:45-08:00', - gclid: '1234', - }, - orderId: '12345', - }, - ], - status: 200, + output: { + response: { + status: 200, + body: { + "output": { + "destinationResponse": { + "response": [ + { + "adjustmentDateTime": "2021-01-01 12:32:45-08:00", + "adjustmentType": "ENHANCEMENT", + "conversionAction": "customers/1234567891/conversionActions/874224905", + "gclidDateTimePair": { + "conversionDateTime": "2021-01-01 12:32:45-08:00", + "gclid": "1234" + }, + "orderId": "12345" + } + ], + "status": 200 + }, + "message": "[Google Ads Offline Conversions Response Handler] - Request processed successfully", + "status": 200 + } + } }, - message: - '[Google Ads Offline Conversions Response Handler] - Request processed successfully', - status: 200, - }, }, - }, - }, - }, + } ]; diff --git a/test/integrations/destinations/google_adwords_offline_conversions/router/data.ts b/test/integrations/destinations/google_adwords_offline_conversions/router/data.ts index a075320414..c5d2f2f524 100644 --- a/test/integrations/destinations/google_adwords_offline_conversions/router/data.ts +++ b/test/integrations/destinations/google_adwords_offline_conversions/router/data.ts @@ -1,3 +1,5 @@ +import { timestampMock } from '../mocks'; + export const data = [ { name: 'google_adwords_offline_conversions', @@ -39,13 +41,21 @@ export const data = [ postalCode: 'EC3M', streetAddress: '71 Cherry Court SOUTHAMPTON SO53 5PD UK', }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', locale: 'en-US', ip: '0.0.0.0', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, }, event: 'Promotion Clicked', type: 'track', @@ -84,7 +94,9 @@ export const data = [ conversionValue: '1', currency: 'GBP', }, - integrations: { All: true }, + integrations: { + All: true, + }, name: 'ApplicationLoaded', sentAt: '2019-10-14T11:15:53.296Z', }, @@ -94,27 +106,55 @@ export const data = [ refresh_token: 'efgh5678', developer_token: 'ijkl91011', }, - jobId: 1, - userId: 'u1', }, destination: { Config: { customerId: '962-581-2972', eventsToOfflineConversionsTypeMapping: [ - { from: 'Sign up completed', to: 'click' }, - { from: 'Download', to: 'call' }, - { from: 'Promotion Clicked', to: 'click' }, - { from: 'Product Searched', to: 'call' }, + { + from: 'Sign up completed', + to: 'click', + }, + { + from: 'Download', + to: 'call', + }, + { + from: 'Promotion Clicked', + to: 'click', + }, + { + from: 'Product Searched', + to: 'call', + }, ], eventsToConversionsNamesMapping: [ - { from: 'Sign up completed', to: 'Sign-up - click' }, - { from: 'Download', to: 'Page view' }, - { from: 'Promotion Clicked', to: 'Sign-up - click' }, - { from: 'Product Searched', to: 'search' }, + { + from: 'Sign up completed', + to: 'Sign-up - click', + }, + { + from: 'Download', + to: 'Page view', + }, + { + from: 'Promotion Clicked', + to: 'Sign-up - click', + }, + { + from: 'Product Searched', + to: 'search', + }, ], customVariables: [ - { from: 'value', to: 'revenue' }, - { from: 'total', to: 'cost' }, + { + from: 'value', + to: 'revenue', + }, + { + from: 'total', + to: 'cost', + }, ], UserIdentifierSource: 'THIRD_PARTY', conversionEnvironment: 'WEB', @@ -155,13 +195,21 @@ export const data = [ postalCode: 'EC3M', streetAddress: '71 Cherry Court SOUTHAMPTON SO53 5PD UK', }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', locale: 'en-US', ip: '0.0.0.0', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, }, event: 'Product Searched', type: 'track', @@ -192,15 +240,19 @@ export const data = [ userIdentifierSource: 'FIRST_PARTY', conversionEnvironment: 'WEB', gclid: 'gclid', + conversionCustomVariable: 'conversionCustomVariable', value: 'value', + callerId: 'callerId', callStartDateTime: '2022-08-28 15:01:30+05:30', conversionDateTime: '2022-01-01 12:32:45-08:00', conversionValue: '1', currency: 'GBP', }, - integrations: { All: true }, + integrations: { + All: true, + }, name: 'ApplicationLoaded', sentAt: '2019-10-14T11:15:53.296Z', }, @@ -210,27 +262,55 @@ export const data = [ refresh_token: 'efgh5678', developer_token: 'ijkl91011', }, - jobId: 2, - userId: 'u1', }, destination: { Config: { customerId: '962-581-2972', eventsToOfflineConversionsTypeMapping: [ - { from: 'Sign up completed', to: 'click' }, - { from: 'Download', to: 'call' }, - { from: 'Promotion Clicked', to: 'click' }, - { from: 'Product Searched', to: 'call' }, + { + from: 'Sign up completed', + to: 'click', + }, + { + from: 'Download', + to: 'call', + }, + { + from: 'Promotion Clicked', + to: 'click', + }, + { + from: 'Product Searched', + to: 'call', + }, ], eventsToConversionsNamesMapping: [ - { from: 'Sign up completed', to: 'Sign-up - click' }, - { from: 'Download', to: 'Page view' }, - { from: 'Promotion Clicked', to: 'Sign-up - click' }, - { from: 'Product Searched', to: 'search' }, + { + from: 'Sign up completed', + to: 'Sign-up - click', + }, + { + from: 'Download', + to: 'Page view', + }, + { + from: 'Promotion Clicked', + to: 'Sign-up - click', + }, + { + from: 'Product Searched', + to: 'search', + }, ], customVariables: [ - { from: 'value', to: 'revenue' }, - { from: 'total', to: 'cost' }, + { + from: 'value', + to: 'revenue', + }, + { + from: 'total', + to: 'cost', + }, ], UserIdentifierSource: 'THIRD_PARTY', conversionEnvironment: 'WEB', @@ -244,7 +324,11 @@ export const data = [ { message: { channel: 'web', - context: { traits: { firstName: 'John' } }, + context: { + traits: { + firstName: 'John', + }, + }, event: 'Product Clicked', type: 'track', messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', @@ -264,7 +348,9 @@ export const data = [ callerId: '1234', callStartDateTime: '2019-10-14T11:15:18.299Z', }, - integrations: { All: true }, + integrations: { + All: true, + }, name: 'ApplicationLoaded', sentAt: '2019-10-14T11:15:53.296Z', }, @@ -274,8 +360,7 @@ export const data = [ refresh_token: 'efgh5678', developer_token: 'ijkl91011', }, - jobId: 3, - userId: 'u1', + jobId: 1, }, destination: { Config: { @@ -320,7 +405,11 @@ export const data = [ { message: { channel: 'web', - context: { traits: { firstName: 'John' } }, + context: { + traits: { + firstName: 'John', + }, + }, event: 'Order Completed', type: 'track', messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', @@ -340,7 +429,9 @@ export const data = [ callerId: '1234', callStartDateTime: '2019-10-14T11:15:18.299Z', }, - integrations: { All: true }, + integrations: { + All: true, + }, name: 'ApplicationLoaded', sentAt: '2019-10-14T11:15:53.296Z', }, @@ -350,8 +441,7 @@ export const data = [ refresh_token: 'efgh5678', developer_token: 'ijkl91011', }, - jobId: 4, - userId: 'u1', + jobId: 2, }, destination: { Config: { @@ -396,7 +486,11 @@ export const data = [ { message: { channel: 'web', - context: { traits: { firstName: 'John' } }, + context: { + traits: { + firstName: 'John', + }, + }, event: 'Order Completed', type: 'track', messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', @@ -416,7 +510,9 @@ export const data = [ callerId: '1234', callStartDateTime: '2019-10-14T11:15:18.299Z', }, - integrations: { All: true }, + integrations: { + All: true, + }, name: 'ApplicationLoaded', sentAt: '2019-10-14T11:15:53.296Z', }, @@ -426,8 +522,7 @@ export const data = [ refresh_token: 'efgh5678', developer_token: 'ijkl91011', }, - jobId: 5, - userId: 'u1', + jobId: 3, }, destination: { Config: { @@ -560,8 +655,7 @@ export const data = [ refresh_token: 'efgh5678', developer_token: 'ijkl91011', }, - jobId: 3, - userId: 'u1', + jobId: 1, }, { secret: { @@ -569,8 +663,7 @@ export const data = [ refresh_token: 'efgh5678', developer_token: 'ijkl91011', }, - jobId: 4, - userId: 'u1', + jobId: 2, }, ], batched: true, @@ -714,8 +807,6 @@ export const data = [ refresh_token: 'efgh5678', developer_token: 'ijkl91011', }, - jobId: 1, - userId: 'u1', }, ], batched: false, @@ -825,8 +916,6 @@ export const data = [ refresh_token: 'efgh5678', developer_token: 'ijkl91011', }, - jobId: 2, - userId: 'u1', }, ], batched: false, @@ -915,8 +1004,7 @@ export const data = [ refresh_token: 'efgh5678', developer_token: 'ijkl91011', }, - jobId: 4, - userId: 'u1', + jobId: 2, }, ], batched: false, @@ -969,8 +1057,7 @@ export const data = [ refresh_token: 'efgh5678', developer_token: 'ijkl91011', }, - jobId: 5, - userId: 'u1', + jobId: 3, }, ], batched: false, @@ -1027,5 +1114,6 @@ export const data = [ }, }, }, + mockFns: timestampMock, }, ]; 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 8c12225400..c60e32aaf6 100644 --- a/test/integrations/destinations/google_adwords_remarketing_lists/router/data.ts +++ b/test/integrations/destinations/google_adwords_remarketing_lists/router/data.ts @@ -17,7 +17,6 @@ export const data = [ developer_token: 'ijkl9101', }, jobId: 1, - userId: 'u1', }, destination: { Config: { @@ -51,7 +50,12 @@ export const data = [ }, enablePartialFailure: true, }, - context: { ip: '14.5.67.21', library: { name: 'http' } }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, timestamp: '2020-02-02T00:23:09.544Z', }, }, @@ -63,7 +67,6 @@ export const data = [ developer_token: 'ijkl9101', }, jobId: 2, - userId: 'u1', }, destination: { Config: { @@ -98,7 +101,12 @@ export const data = [ }, enablePartialFailure: true, }, - context: { ip: '14.5.67.21', library: { name: 'http' } }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, timestamp: '2020-02-02T00:23:09.544Z', }, }, @@ -110,7 +118,6 @@ export const data = [ developer_token: 'ijkl9101', }, jobId: 3, - userId: 'u1', }, destination: { Config: { @@ -144,7 +151,12 @@ export const data = [ }, enablePartialFailure: true, }, - context: { ip: '14.5.67.21', library: { name: 'http' } }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, timestamp: '2020-02-02T00:23:09.544Z', }, }, @@ -156,7 +168,6 @@ export const data = [ developer_token: 'ijkl9101', }, jobId: 4, - userId: 'u1', }, destination: { Config: { @@ -200,7 +211,12 @@ export const data = [ }, enablePartialFailure: true, }, - context: { ip: '14.5.67.21', library: { name: 'http' } }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, timestamp: '2020-02-02T00:23:09.544Z', }, }, @@ -274,7 +290,6 @@ export const data = [ developer_token: 'ijkl9101', }, jobId: 1, - userId: 'u1', }, ], batched: false, @@ -310,7 +325,15 @@ export const data = [ JSON: { enablePartialFailure: true, operations: [ - { create: { userIdentifiers: [{ thirdPartyUserId: 'useri1234' }] } }, + { + create: { + userIdentifiers: [ + { + thirdPartyUserId: 'useri1234', + }, + ], + }, + }, ], }, JSON_ARRAY: {}, @@ -328,7 +351,6 @@ export const data = [ developer_token: 'ijkl9101', }, jobId: 2, - userId: 'u1', }, ], batched: false, @@ -405,7 +427,6 @@ export const data = [ developer_token: 'ijkl9101', }, jobId: 3, - userId: 'u1', }, ], batched: false, @@ -530,7 +551,6 @@ export const data = [ developer_token: 'ijkl9101', }, jobId: 4, - userId: 'u1', }, ], batched: false, diff --git a/test/integrations/destinations/google_cloud_function/router/data.ts b/test/integrations/destinations/google_cloud_function/router/data.ts index 50a559e27c..0661d4cb15 100644 --- a/test/integrations/destinations/google_cloud_function/router/data.ts +++ b/test/integrations/destinations/google_cloud_function/router/data.ts @@ -20,7 +20,9 @@ export const data = [ maxBatchSize: '2', }, }, - metadata: { jobId: '1', userId: 'u1' }, + metadata: { + jobId: '1', + }, message: { channel: 'web', context: { @@ -30,13 +32,21 @@ 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 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', locale: 'en-US', ip: '0.0.0.0', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, }, messageId: '84e26acc-56a5-4835-8233-591137fca468', session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', @@ -51,7 +61,9 @@ export const data = [ emailOptOut: true, masterAvatarTypeCode: 10, }, - integrations: { All: true }, + integrations: { + All: true, + }, sentAt: '2019-10-14T09:03:22.563Z', }, }, @@ -65,7 +77,9 @@ export const data = [ maxBatchSize: '2', }, }, - metadata: { jobId: '2', userId: 'u1' }, + metadata: { + jobId: '2', + }, message: { channel: 'web', context: { @@ -75,13 +89,21 @@ 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 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', locale: 'en-US', ip: '0.0.0.0', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, }, messageId: '84e26acc-56a5-4835-8233-591137fca468', session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', @@ -96,7 +118,9 @@ export const data = [ emailOptOut: true, masterAvatarTypeCode: 10, }, - integrations: { All: true }, + integrations: { + All: true, + }, sentAt: '2019-10-14T09:03:22.563Z', }, }, @@ -111,7 +135,9 @@ export const data = [ maxBatchSize: '2', }, }, - metadata: { jobId: '3', userId: 'u1' }, + metadata: { + jobId: '3', + }, message: { channel: 'web', context: { @@ -121,13 +147,21 @@ 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 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', locale: 'en-US', ip: '0.0.0.0', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, }, messageId: '84e26acc-56a5-4835-8233-591137fca468', session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', @@ -142,7 +176,9 @@ export const data = [ emailOptOut: true, masterAvatarTypeCode: 10, }, - integrations: { All: true }, + integrations: { + All: true, + }, sentAt: '2019-10-14T09:03:22.563Z', }, }, @@ -168,13 +204,21 @@ 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 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', locale: 'en-US', ip: '0.0.0.0', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, }, messageId: '84e26acc-56a5-4835-8233-591137fca468', session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', @@ -189,7 +233,9 @@ export const data = [ emailOptOut: true, masterAvatarTypeCode: 10, }, - integrations: { All: true }, + integrations: { + All: true, + }, sentAt: '2019-10-14T09:03:22.563Z', }, { @@ -201,13 +247,21 @@ 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 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', locale: 'en-US', ip: '0.0.0.0', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, }, messageId: '84e26acc-56a5-4835-8233-591137fca468', session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', @@ -222,14 +276,13 @@ export const data = [ emailOptOut: true, masterAvatarTypeCode: 10, }, - integrations: { All: true }, + integrations: { + All: true, + }, sentAt: '2019-10-14T09:03:22.563Z', }, ], - metadata: [ - { jobId: '1', userId: 'u1' }, - { jobId: '3', userId: 'u1' }, - ], + metadata: [{ jobId: '1' }, { jobId: '3' }], batched: true, statusCode: 200, destination: { @@ -253,7 +306,7 @@ export const data = [ maxBatchSize: '2', }, }, - metadata: [{ jobId: '2', userId: 'u1' }], + metadata: [{ jobId: '2' }], batched: false, statusCode: 400, error: '[GCF]:: Url not found. Aborting', @@ -292,7 +345,9 @@ export const data = [ maxBatchSize: '2', }, }, - metadata: { jobId: '1', userId: 'u1' }, + metadata: { + jobId: '1', + }, message: { channel: 'web', context: { @@ -302,13 +357,21 @@ 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 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', locale: 'en-US', ip: '0.0.0.0', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, }, messageId: '84e26acc-56a5-4835-8233-591137fca468', session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', @@ -323,7 +386,9 @@ export const data = [ emailOptOut: true, masterAvatarTypeCode: 10, }, - integrations: { All: true }, + integrations: { + All: true, + }, sentAt: '2019-10-14T09:03:22.563Z', }, }, @@ -337,7 +402,9 @@ export const data = [ maxBatchSize: '2', }, }, - metadata: { jobId: '2', userId: 'u1' }, + metadata: { + jobId: '2', + }, message: { channel: 'web', context: { @@ -347,13 +414,21 @@ 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 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', locale: 'en-US', ip: '0.0.0.0', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, }, messageId: '84e26acc-56a5-4835-8233-591137fca468', session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', @@ -368,7 +443,9 @@ export const data = [ emailOptOut: true, masterAvatarTypeCode: 10, }, - integrations: { All: true }, + integrations: { + All: true, + }, sentAt: '2019-10-14T09:03:22.563Z', }, }, @@ -383,7 +460,9 @@ export const data = [ maxBatchSize: '2', }, }, - metadata: { jobId: '3', userId: 'u1' }, + metadata: { + jobId: '3', + }, message: { channel: 'web', context: { @@ -393,13 +472,21 @@ 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 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', locale: 'en-US', ip: '0.0.0.0', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, }, messageId: '84e26acc-56a5-4835-8233-591137fca468', session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', @@ -414,7 +501,9 @@ export const data = [ emailOptOut: true, masterAvatarTypeCode: 10, }, - integrations: { All: true }, + integrations: { + All: true, + }, sentAt: '2019-10-14T09:03:22.563Z', }, }, @@ -440,13 +529,21 @@ 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 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', locale: 'en-US', ip: '0.0.0.0', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, }, messageId: '84e26acc-56a5-4835-8233-591137fca468', session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', @@ -461,7 +558,9 @@ export const data = [ emailOptOut: true, masterAvatarTypeCode: 10, }, - integrations: { All: true }, + integrations: { + All: true, + }, sentAt: '2019-10-14T09:03:22.563Z', }, { @@ -473,13 +572,21 @@ 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 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', locale: 'en-US', ip: '0.0.0.0', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, }, messageId: '84e26acc-56a5-4835-8233-591137fca468', session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', @@ -494,14 +601,13 @@ export const data = [ emailOptOut: true, masterAvatarTypeCode: 10, }, - integrations: { All: true }, + integrations: { + All: true, + }, sentAt: '2019-10-14T09:03:22.563Z', }, ], - metadata: [ - { jobId: '1', userId: 'u1' }, - { jobId: '3', userId: 'u1' }, - ], + metadata: [{ jobId: '1' }, { jobId: '3' }], batched: true, statusCode: 200, destination: { @@ -525,7 +631,7 @@ export const data = [ maxBatchSize: '2', }, }, - metadata: [{ jobId: '2', userId: 'u1' }], + metadata: [{ jobId: '2' }], batched: false, statusCode: 400, error: '[GCF]:: Url not found. Aborting', diff --git a/test/integrations/destinations/googlesheets/router/data.ts b/test/integrations/destinations/googlesheets/router/data.ts index bdc686efda..20fe270e5f 100644 --- a/test/integrations/destinations/googlesheets/router/data.ts +++ b/test/integrations/destinations/googlesheets/router/data.ts @@ -14,20 +14,62 @@ export const data = [ Config: { credentials: '{ sheets credentials }', eventKeyMap: [ - { from: 'firstName', to: 'First Name' }, - { from: 'lastName', to: 'Last Name' }, - { from: 'birthday', to: 'Birthday' }, - { from: 'address.city', to: 'City' }, - { from: 'address.country', to: 'Country' }, - { from: 'revenue', to: 'Revenue' }, - { from: 'offer', to: 'Offer' }, - { from: 'title', to: 'Title Page' }, - { from: 'Cart Value', to: 'Cart Value' }, - { from: 'revenue', to: 'Revenue' }, - { from: 'context.app.build', to: 'App Build' }, - { from: 'context.app.name', to: 'App Name' }, - { from: 'context.library.name', to: 'Library Name' }, - { from: 'context.ip', to: 'IP' }, + { + from: 'firstName', + to: 'First Name', + }, + { + from: 'lastName', + to: 'Last Name', + }, + { + from: 'birthday', + to: 'Birthday', + }, + { + from: 'address.city', + to: 'City', + }, + { + from: 'address.country', + to: 'Country', + }, + { + from: 'revenue', + to: 'Revenue', + }, + { + from: 'offer', + to: 'Offer', + }, + { + from: 'title', + to: 'Title Page', + }, + { + from: 'Cart Value', + to: 'Cart Value', + }, + { + from: 'revenue', + to: 'Revenue', + }, + { + from: 'context.app.build', + to: 'App Build', + }, + { + from: 'context.app.name', + to: 'App Name', + }, + { + from: 'context.library.name', + to: 'Library Name', + }, + { + from: 'context.ip', + to: 'IP', + }, ], sheetId: 'rudder_sheet_id', sheetName: 'rudder_sheet', @@ -79,7 +121,10 @@ export const data = [ married: true, customerType: 'Prime', custom_tags: ['Test_User', 'Interested_User', 'DIY_Hobby'], - custom_mappings: { Office: 'Trastkiv', Country: 'Russia' }, + custom_mappings: { + Office: 'Trastkiv', + Country: 'Russia', + }, address: { city: 'kolkata', country: 'India', @@ -91,27 +136,71 @@ export const data = [ integrations: { All: true }, sentAt: '2019-10-14T09:03:22.563Z', }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, }, { destination: { Config: { credentials: '{ sheets credentials }', eventKeyMap: [ - { from: 'firstName', to: 'First Name' }, - { from: 'lastName', to: 'Last Name' }, - { from: 'birthday', to: 'Birthday' }, - { from: 'address.city', to: 'City' }, - { from: 'address.country', to: 'Country' }, - { from: 'revenue', to: 'Revenue' }, - { from: 'offer', to: 'Offer' }, - { from: 'title', to: 'Title Page' }, - { from: 'Cart Value', to: 'Cart Value' }, - { from: 'revenue', to: 'Revenue' }, - { from: 'context.app.build', to: 'App Build' }, - { from: 'context.app.name', to: 'App Name' }, - { from: 'context.library.name', to: 'Library Name' }, - { from: 'context.ip', to: 'IP' }, + { + from: 'firstName', + to: 'First Name', + }, + { + from: 'lastName', + to: 'Last Name', + }, + { + from: 'birthday', + to: 'Birthday', + }, + { + from: 'address.city', + to: 'City', + }, + { + from: 'address.country', + to: 'Country', + }, + { + from: 'revenue', + to: 'Revenue', + }, + { + from: 'offer', + to: 'Offer', + }, + { + from: 'title', + to: 'Title Page', + }, + { + from: 'Cart Value', + to: 'Cart Value', + }, + { + from: 'revenue', + to: 'Revenue', + }, + { + from: 'context.app.build', + to: 'App Build', + }, + { + from: 'context.app.name', + to: 'App Name', + }, + { + from: 'context.library.name', + to: 'Library Name', + }, + { + from: 'context.ip', + to: 'IP', + }, ], sheetId: 'rudder_sheet_id', sheetName: 'rudder_sheet', @@ -143,16 +232,26 @@ export const data = [ name: 'generic_x86', type: 'android', }, - library: { name: 'com.rudderstack.android.sdk.core', version: '0.1.4' }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '0.1.4', + }, locale: 'en-US', - network: { carrier: 'Android', bluetooth: false, cellular: true, wifi: true }, + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, os: { name: 'Android', version: '9' }, screen: { density: 420, height: 1794, width: 1080 }, timezone: 'Asia/Kolkata', }, timestamp: '2020-02-02T00:23:09.544Z', }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, }, ], destType: 'googlesheets', @@ -173,17 +272,50 @@ export const data = [ attributeKey: 'messageId', attributeValue: '84e26acc-56a5-4835-8233-591137fca468', }, - '1': { attributeKey: 'First Name', attributeValue: 'James' }, - '2': { attributeKey: 'Last Name', attributeValue: 'Doe' }, - '3': { attributeKey: 'Birthday', attributeValue: '1614775793' }, - '4': { attributeKey: 'City', attributeValue: 'kolkata' }, - '5': { attributeKey: 'Country', attributeValue: 'India' }, - '6': { attributeKey: 'Revenue', attributeValue: '' }, - '7': { attributeKey: 'Offer', attributeValue: '' }, - '8': { attributeKey: 'Title Page', attributeValue: '' }, - '9': { attributeKey: 'Cart Value', attributeValue: '' }, - '10': { attributeKey: 'Revenue', attributeValue: '' }, - '11': { attributeKey: 'App Build', attributeValue: '1.0.0' }, + '1': { + attributeKey: 'First Name', + attributeValue: 'James', + }, + '2': { + attributeKey: 'Last Name', + attributeValue: 'Doe', + }, + '3': { + attributeKey: 'Birthday', + attributeValue: '1614775793', + }, + '4': { + attributeKey: 'City', + attributeValue: 'kolkata', + }, + '5': { + attributeKey: 'Country', + attributeValue: 'India', + }, + '6': { + attributeKey: 'Revenue', + attributeValue: '', + }, + '7': { + attributeKey: 'Offer', + attributeValue: '', + }, + '8': { + attributeKey: 'Title Page', + attributeValue: '', + }, + '9': { + attributeKey: 'Cart Value', + attributeValue: '', + }, + '10': { + attributeKey: 'Revenue', + attributeValue: '', + }, + '11': { + attributeKey: 'App Build', + attributeValue: '1.0.0', + }, '12': { attributeKey: 'App Name', attributeValue: 'RudderLabs JavaScript SDK', @@ -192,29 +324,74 @@ export const data = [ attributeKey: 'Library Name', attributeValue: 'RudderLabs JavaScript SDK', }, - '14': { attributeKey: 'IP', attributeValue: '0.0.0.0' }, + '14': { + attributeKey: 'IP', + attributeValue: '0.0.0.0', + }, }, }, { message: { - '0': { attributeKey: 'messageId', attributeValue: '' }, - '1': { attributeKey: 'First Name', attributeValue: '' }, - '2': { attributeKey: 'Last Name', attributeValue: '' }, - '3': { attributeKey: 'Birthday', attributeValue: '' }, - '4': { attributeKey: 'City', attributeValue: '' }, - '5': { attributeKey: 'Country', attributeValue: '' }, - '6': { attributeKey: 'Revenue', attributeValue: 5.99 }, - '7': { attributeKey: 'Offer', attributeValue: 'Discount' }, - '8': { attributeKey: 'Title Page', attributeValue: '' }, - '9': { attributeKey: 'Cart Value', attributeValue: '' }, - '10': { attributeKey: 'Revenue', attributeValue: 5.99 }, - '11': { attributeKey: 'App Build', attributeValue: '1' }, - '12': { attributeKey: 'App Name', attributeValue: 'RudderAndroidClient' }, + '0': { + attributeKey: 'messageId', + attributeValue: '', + }, + '1': { + attributeKey: 'First Name', + attributeValue: '', + }, + '2': { + attributeKey: 'Last Name', + attributeValue: '', + }, + '3': { + attributeKey: 'Birthday', + attributeValue: '', + }, + '4': { + attributeKey: 'City', + attributeValue: '', + }, + '5': { + attributeKey: 'Country', + attributeValue: '', + }, + '6': { + attributeKey: 'Revenue', + attributeValue: 5.99, + }, + '7': { + attributeKey: 'Offer', + attributeValue: 'Discount', + }, + '8': { + attributeKey: 'Title Page', + attributeValue: '', + }, + '9': { + attributeKey: 'Cart Value', + attributeValue: '', + }, + '10': { + attributeKey: 'Revenue', + attributeValue: 5.99, + }, + '11': { + attributeKey: 'App Build', + attributeValue: '1', + }, + '12': { + attributeKey: 'App Name', + attributeValue: 'RudderAndroidClient', + }, '13': { attributeKey: 'Library Name', attributeValue: 'com.rudderstack.android.sdk.core', }, - '14': { attributeKey: 'IP', attributeValue: '14.5.67.21' }, + '14': { + attributeKey: 'IP', + attributeValue: '14.5.67.21', + }, }, }, ], @@ -222,8 +399,12 @@ export const data = [ spreadSheet: 'rudder_sheet', }, metadata: [ - { jobId: 1, userId: 'u1' }, - { jobId: 2, userId: 'u1' }, + { + jobId: 1, + }, + { + jobId: 2, + }, ], batched: true, statusCode: 200, @@ -231,20 +412,62 @@ export const data = [ Config: { credentials: '{ sheets credentials }', eventKeyMap: [ - { from: 'firstName', to: 'First Name' }, - { from: 'lastName', to: 'Last Name' }, - { from: 'birthday', to: 'Birthday' }, - { from: 'address.city', to: 'City' }, - { from: 'address.country', to: 'Country' }, - { from: 'revenue', to: 'Revenue' }, - { from: 'offer', to: 'Offer' }, - { from: 'title', to: 'Title Page' }, - { from: 'Cart Value', to: 'Cart Value' }, - { from: 'revenue', to: 'Revenue' }, - { from: 'context.app.build', to: 'App Build' }, - { from: 'context.app.name', to: 'App Name' }, - { from: 'context.library.name', to: 'Library Name' }, - { from: 'context.ip', to: 'IP' }, + { + from: 'firstName', + to: 'First Name', + }, + { + from: 'lastName', + to: 'Last Name', + }, + { + from: 'birthday', + to: 'Birthday', + }, + { + from: 'address.city', + to: 'City', + }, + { + from: 'address.country', + to: 'Country', + }, + { + from: 'revenue', + to: 'Revenue', + }, + { + from: 'offer', + to: 'Offer', + }, + { + from: 'title', + to: 'Title Page', + }, + { + from: 'Cart Value', + to: 'Cart Value', + }, + { + from: 'revenue', + to: 'Revenue', + }, + { + from: 'context.app.build', + to: 'App Build', + }, + { + from: 'context.app.name', + to: 'App Name', + }, + { + from: 'context.library.name', + to: 'Library Name', + }, + { + from: 'context.ip', + to: 'IP', + }, ], sheetId: 'rudder_sheet_id', sheetName: 'rudder_sheet', diff --git a/test/integrations/destinations/heap/router/data.ts b/test/integrations/destinations/heap/router/data.ts index 3aa8fae2ca..24efbf4b15 100644 --- a/test/integrations/destinations/heap/router/data.ts +++ b/test/integrations/destinations/heap/router/data.ts @@ -11,7 +11,9 @@ export const data = [ input: [ { destination: { - Config: { appId: '' }, + Config: { + appId: '', + }, DestinationDefinition: { DisplayName: 'Heap.io', ID: '1WTbl0l5GjOQKOvfmcGwk0T49kV', @@ -22,7 +24,9 @@ export const data = [ Name: 'heap test', Transformations: [], }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, message: { anonymousId: 'sampath', channel: 'web', @@ -34,15 +38,28 @@ export const data = [ version: '1.0.0', }, ip: '0.0.0.0', - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, locale: 'en-US', - os: { name: '', version: '' }, - screen: { density: 2 }, + 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.88 Safari/537.36', }, - integrations: { All: true }, - traits: { anonymousId: 'sampath', email: 'sampath@gmail.com' }, + integrations: { + All: true, + }, + traits: { + anonymousId: 'sampath', + email: 'sampath@gmail.com', + }, messageId: 'fca2e71a-5d30-48e1-ba45-761c16e3820f', originalTimestamp: '2020-01-16T13:21:59.076Z', receivedAt: '2020-01-16T18:52:03.871+05:30', @@ -55,7 +72,9 @@ export const data = [ }, { destination: { - Config: { appId: '' }, + Config: { + appId: '', + }, DestinationDefinition: { DisplayName: 'Heap.io', ID: '1WTbl0l5GjOQKOvfmcGwk0T49kV', @@ -66,7 +85,9 @@ export const data = [ Name: 'heap test', Transformations: [], }, - metadata: { jobId: 3, userId: 'u1' }, + metadata: { + jobId: 2, + }, message: { anonymousId: 'sampath', channel: 'web', @@ -78,19 +99,35 @@ export const data = [ version: '1.0.0', }, ip: '0.0.0.0', - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, locale: 'en-US', - os: { name: '', version: '' }, - screen: { density: 2 }, - traits: { anonymousId: 'sampath', email: 'sampath@gmail.com' }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + anonymousId: 'sampath', + email: 'sampath@gmail.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', }, event: 'Send Transactional Email', - integrations: { All: true }, + integrations: { + All: true, + }, messageId: 'c0c5b892-0d54-449f-b85f-ebb39ff04e67', originalTimestamp: '2020-01-16T13:23:20.844Z', - properties: { subject: 'Welcome to My App!', variation: 'A' }, + properties: { + subject: 'Welcome to My App!', + variation: 'A', + }, receivedAt: '2020-01-16T18:53:23.804+05:30', request_ip: '[::1]:62312', sentAt: '2020-01-16T13:23:23.782Z', @@ -101,7 +138,9 @@ export const data = [ }, { destination: { - Config: { appId: '' }, + Config: { + appId: '', + }, DestinationDefinition: { DisplayName: 'Heap.io', ID: '1WTbl0l5GjOQKOvfmcGwk0T49kV', @@ -112,7 +151,9 @@ export const data = [ Name: 'heap test', Transformations: [], }, - metadata: { jobId: 4, userId: 'u1' }, + metadata: { + jobId: 2, + }, message: { anonymousId: 'sampath', channel: 'web', @@ -124,16 +165,29 @@ export const data = [ version: '1.0.0', }, ip: '0.0.0.0', - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, locale: 'en-US', - os: { name: '', version: '' }, - screen: { density: 2 }, - traits: { anonymousId: 'sampath', email: 'sampath@gmail.com' }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + anonymousId: 'sampath', + email: 'sampath@gmail.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', }, event: 'Send Transactional Email', - integrations: { All: true }, + integrations: { + All: true, + }, messageId: 'c0c5b892-0d54-449f-b85f-ebb39ff04e67', originalTimestamp: '2020-01-16T13:23:20.844Z', properties: { @@ -165,12 +219,18 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://heapanalytics.com/api/add_user_properties', - headers: { 'Content-Type': 'application/json', Accept: 'application/json' }, + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + }, params: {}, body: { JSON: { identity: 'sampath', - properties: { anonymousId: 'sampath', email: 'sampath@gmail.com' }, + properties: { + anonymousId: 'sampath', + email: 'sampath@gmail.com', + }, app_id: '', }, XML: {}, @@ -180,11 +240,17 @@ export const data = [ files: {}, userId: 'sampath', }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { - Config: { appId: '' }, + Config: { + appId: '', + }, DestinationDefinition: { DisplayName: 'Heap.io', ID: '1WTbl0l5GjOQKOvfmcGwk0T49kV', @@ -202,13 +268,19 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://heapanalytics.com/api/track', - headers: { 'Content-Type': 'application/json', Accept: 'application/json' }, + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + }, params: {}, body: { JSON: { identity: 'sampath', event: 'Send Transactional Email', - properties: { subject: 'Welcome to My App!', variation: 'A' }, + properties: { + subject: 'Welcome to My App!', + variation: 'A', + }, app_id: '', timestamp: '2020-01-16T18:53:20.866+05:30', }, @@ -219,11 +291,17 @@ export const data = [ files: {}, userId: 'sampath', }, - metadata: [{ jobId: 3, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { - Config: { appId: '' }, + Config: { + appId: '', + }, DestinationDefinition: { DisplayName: 'Heap.io', ID: '1WTbl0l5GjOQKOvfmcGwk0T49kV', @@ -241,13 +319,19 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://heapanalytics.com/api/track', - headers: { 'Content-Type': 'application/json', Accept: 'application/json' }, + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + }, params: {}, body: { JSON: { identity: 'sampath', event: 'Send Transactional Email', - properties: { subject: 'Welcome to My App!', variation: 'A' }, + properties: { + subject: 'Welcome to My App!', + variation: 'A', + }, app_id: '', timestamp: '2020-01-16T18:53:20.866+05:30', idempotency_key: '1234', @@ -259,11 +343,17 @@ export const data = [ files: {}, userId: 'sampath', }, - metadata: [{ jobId: 4, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { - Config: { appId: '' }, + Config: { + appId: '', + }, DestinationDefinition: { DisplayName: 'Heap.io', ID: '1WTbl0l5GjOQKOvfmcGwk0T49kV', @@ -292,7 +382,9 @@ export const data = [ input: [ { destination: { - Config: { appId: '' }, + Config: { + appId: '', + }, DestinationDefinition: { DisplayName: 'Heap.io', ID: '1WTbl0l5GjOQKOvfmcGwk0T49kV', @@ -303,7 +395,9 @@ export const data = [ Name: 'heap test', Transformations: [], }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, message: { anonymousId: 'sampath', channel: 'web', @@ -315,15 +409,28 @@ export const data = [ version: '1.0.0', }, ip: '0.0.0.0', - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, locale: 'en-US', - os: { name: '', version: '' }, - screen: { density: 2 }, + 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.88 Safari/537.36', }, - integrations: { All: true }, - traits: { anonymousId: 'sampath', email: 'sampath@gmail.com' }, + integrations: { + All: true, + }, + traits: { + anonymousId: 'sampath', + email: 'sampath@gmail.com', + }, messageId: 'fca2e71a-5d30-48e1-ba45-761c16e3820f', originalTimestamp: '2020-01-16T13:21:59.076Z', receivedAt: '2020-01-16T18:52:03.871+05:30', @@ -336,7 +443,9 @@ export const data = [ }, { destination: { - Config: { appId: '' }, + Config: { + appId: '', + }, DestinationDefinition: { DisplayName: 'Heap.io', ID: '1WTbl0l5GjOQKOvfmcGwk0T49kV', @@ -347,7 +456,9 @@ export const data = [ Name: 'heap test', Transformations: [], }, - metadata: { jobId: 3, userId: 'u1' }, + metadata: { + jobId: 2, + }, message: { anonymousId: 'sampath', channel: 'web', @@ -359,19 +470,35 @@ export const data = [ version: '1.0.0', }, ip: '0.0.0.0', - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, locale: 'en-US', - os: { name: '', version: '' }, - screen: { density: 2 }, - traits: { anonymousId: 'sampath', email: 'sampath@gmail.com' }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + anonymousId: 'sampath', + email: 'sampath@gmail.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', }, event: 'Send Transactional Email', - integrations: { All: true }, + integrations: { + All: true, + }, messageId: 'c0c5b892-0d54-449f-b85f-ebb39ff04e67', originalTimestamp: '2020-01-16T13:23:20.844Z', - properties: { subject: 'Welcome to My App!', variation: 'A' }, + properties: { + subject: 'Welcome to My App!', + variation: 'A', + }, receivedAt: '2020-01-16T18:53:23.804+05:30', request_ip: '[::1]:62312', sentAt: '2020-01-16T13:23:23.782Z', @@ -382,7 +509,9 @@ export const data = [ }, { destination: { - Config: { appId: '' }, + Config: { + appId: '', + }, DestinationDefinition: { DisplayName: 'Heap.io', ID: '1WTbl0l5GjOQKOvfmcGwk0T49kV', @@ -393,7 +522,9 @@ export const data = [ Name: 'heap test', Transformations: [], }, - metadata: { jobId: 4, userId: 'u1' }, + metadata: { + jobId: 4, + }, message: { anonymousId: 'sampath', channel: 'web', @@ -405,15 +536,28 @@ export const data = [ version: '1.0.0', }, ip: '0.0.0.0', - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, locale: 'en-US', - os: { name: '', version: '' }, - screen: { density: 2 }, + 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.88 Safari/537.36', }, - integrations: { All: true }, - traits: { anonymousId: 'sampath', email: 'sampath@gmail.com' }, + integrations: { + All: true, + }, + traits: { + anonymousId: 'sampath', + email: 'sampath@gmail.com', + }, messageId: 'fca2e71a-5d30-48e1-ba45-761c16e3820f', originalTimestamp: '2020-01-16T13:21:59.076Z', receivedAt: '2020-01-16T18:52:03.871+05:30', @@ -425,7 +569,9 @@ export const data = [ }, { destination: { - Config: { appId: '' }, + Config: { + appId: '', + }, DestinationDefinition: { DisplayName: 'Heap.io', ID: '1WTbl0l5GjOQKOvfmcGwk0T49kV', @@ -436,7 +582,9 @@ export const data = [ Name: 'heap test', Transformations: [], }, - metadata: { jobId: 5, userId: 'u1' }, + metadata: { + jobId: 5, + }, message: { anonymousId: 'sampath', channel: 'web', @@ -448,19 +596,35 @@ export const data = [ version: '1.0.0', }, ip: '0.0.0.0', - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, locale: 'en-US', - os: { name: '', version: '' }, - screen: { density: 2 }, - traits: { anonymousId: 'sampath', email: 'sampath@gmail.com' }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + anonymousId: 'sampath', + email: 'sampath@gmail.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', }, event: 'Send Transactional Email', - integrations: { All: true }, + integrations: { + All: true, + }, messageId: 'c0c5b892-0d54-449f-b85f-ebb39ff04e67', originalTimestamp: '2020-01-16T13:23:20.844Z', - properties: { subject: 'Welcome to My App!', variation: 'A' }, + properties: { + subject: 'Welcome to My App!', + variation: 'A', + }, receivedAt: '2020-01-16T18:53:23.804+05:30', request_ip: '[::1]:62312', sentAt: '2020-01-16T13:23:23.782Z', @@ -485,12 +649,18 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://heapanalytics.com/api/add_user_properties', - headers: { 'Content-Type': 'application/json', Accept: 'application/json' }, + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + }, params: {}, body: { JSON: { identity: 'sampath', - properties: { anonymousId: 'sampath', email: 'sampath@gmail.com' }, + properties: { + anonymousId: 'sampath', + email: 'sampath@gmail.com', + }, app_id: '', }, XML: {}, @@ -500,11 +670,17 @@ export const data = [ files: {}, userId: 'sampath', }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { - Config: { appId: '' }, + Config: { + appId: '', + }, DestinationDefinition: { DisplayName: 'Heap.io', ID: '1WTbl0l5GjOQKOvfmcGwk0T49kV', @@ -522,13 +698,19 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://heapanalytics.com/api/track', - headers: { 'Content-Type': 'application/json', Accept: 'application/json' }, + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + }, params: {}, body: { JSON: { identity: 'sampath', event: 'Send Transactional Email', - properties: { subject: 'Welcome to My App!', variation: 'A' }, + properties: { + subject: 'Welcome to My App!', + variation: 'A', + }, app_id: '', timestamp: '2020-01-16T18:53:20.866+05:30', }, @@ -539,11 +721,17 @@ export const data = [ files: {}, userId: 'sampath', }, - metadata: [{ jobId: 3, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { - Config: { appId: '' }, + Config: { + appId: '', + }, DestinationDefinition: { DisplayName: 'Heap.io', ID: '1WTbl0l5GjOQKOvfmcGwk0T49kV', @@ -557,7 +745,9 @@ export const data = [ }, { destination: { - Config: { appId: '' }, + Config: { + appId: '', + }, DestinationDefinition: { DisplayName: 'Heap.io', ID: '1WTbl0l5GjOQKOvfmcGwk0T49kV', @@ -568,7 +758,11 @@ export const data = [ Name: 'heap test', Transformations: [], }, - metadata: [{ jobId: 4, userId: 'u1' }], + metadata: [ + { + jobId: 4, + }, + ], batched: false, statusCode: 400, error: 'invalid message type for heap', @@ -583,7 +777,9 @@ export const data = [ }, { destination: { - Config: { appId: '' }, + Config: { + appId: '', + }, DestinationDefinition: { DisplayName: 'Heap.io', ID: '1WTbl0l5GjOQKOvfmcGwk0T49kV', @@ -594,7 +790,11 @@ export const data = [ Name: 'heap test', Transformations: [], }, - metadata: [{ jobId: 5, userId: 'u1' }], + metadata: [ + { + jobId: 5, + }, + ], batched: false, statusCode: 400, error: 'message type page not supported for heap', diff --git a/test/integrations/destinations/hs/router/data.ts b/test/integrations/destinations/hs/router/data.ts index 2f81700871..95d9d88212 100644 --- a/test/integrations/destinations/hs/router/data.ts +++ b/test/integrations/destinations/hs/router/data.ts @@ -21,7 +21,14 @@ export const data = [ message: { type: 'identify', sentAt: '2022-08-23T05:59:38.214Z', - traits: { to: { id: 1 }, from: { id: 9405415215 } }, + traits: { + to: { + id: 1, + }, + from: { + id: 9405415215, + }, + }, userId: '1', channel: 'sources', context: { @@ -53,7 +60,9 @@ export const data = [ request_ip: '10.1.90.32', originalTimestamp: '2022-08-23T05:59:38.214Z', }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, }, ], destType: 'hs', @@ -73,17 +82,36 @@ export const data = [ method: 'POST', endpoint: 'https://api.hubapi.com/crm/v3/associations/companies/contacts/batch/create', - headers: { 'Content-Type': 'application/json', Authorization: 'Bearer pat-123' }, + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer pat-123', + }, params: {}, body: { - JSON: { inputs: [{ to: { id: 1 }, from: { id: 9405415215 }, type: 'engineer' }] }, + JSON: { + inputs: [ + { + to: { + id: 1, + }, + from: { + id: 9405415215, + }, + type: 'engineer', + }, + ], + }, JSON_ARRAY: {}, XML: {}, FORM: {}, }, files: {}, }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: true, statusCode: 200, destination: { @@ -125,26 +153,47 @@ export const data = [ firstname: 'Test Hubspot1', anonymousId: '1111', }, - library: { name: 'RudderLabs JavaScript SDK', 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: '' }, + 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 }, + integrations: { + All: true, + }, sentAt: '2019-10-14T09:03:22.563Z', }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, destination: { - Config: { apiKey: 'dummy-apikey', hubID: 'dummy-hubId' }, + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, secretConfig: {}, ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', name: 'Hubspot', @@ -175,14 +224,25 @@ export const data = [ 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' }, + 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 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, }, type: 'track', messageId: '08829772-d991-427c-b976-b4c4f4430b4e', @@ -196,9 +256,75 @@ export const data = [ }, sentAt: '2019-10-14T11:15:53.296Z', }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, destination: { - Config: { apiKey: 'dummy-apikey', hubID: 'dummy-hubId' }, + 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', @@ -234,26 +360,47 @@ export const data = [ firstname: 'Test Hubspot4', anonymousId: '4444', }, - library: { name: 'RudderLabs JavaScript SDK', 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: '' }, + 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 }, + integrations: { + All: true, + }, sentAt: '2019-10-14T09:03:22.563Z', }, - metadata: { jobId: 4, userId: 'u1' }, + metadata: { + jobId: 4, + }, destination: { - Config: { apiKey: 'rate-limit-id', hubID: 'dummy-hubId' }, + Config: { + apiKey: 'rate-limit-id', + hubID: 'dummy-hubId', + }, secretConfig: {}, ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', name: 'Hubspot', @@ -291,8 +438,12 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://api.hubapi.com/contacts/v1/contact/batch/', - headers: { 'Content-Type': 'application/json' }, - params: { hapikey: 'dummy-apikey' }, + headers: { + 'Content-Type': 'application/json', + }, + params: { + hapikey: 'dummy-apikey', + }, body: { JSON: {}, JSON_ARRAY: { @@ -305,13 +456,23 @@ export const data = [ files: {}, }, metadata: [ - { jobId: 1, userId: 'u1' }, - { jobId: 4, userId: 'u1' }, + { + jobId: 3, + }, + { + jobId: 1, + }, + { + jobId: 4, + }, ], batched: true, statusCode: 200, destination: { - Config: { apiKey: 'dummy-apikey', hubID: 'dummy-hubId' }, + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, secretConfig: {}, ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', name: 'Hubspot', @@ -338,21 +499,35 @@ export const data = [ type: 'REST', method: 'GET', endpoint: 'https://track.hubspot.com/v1/event', - headers: { 'Content-Type': 'application/json' }, + 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: {} }, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, files: {}, }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { - Config: { apiKey: 'dummy-apikey', hubID: 'dummy-hubId' }, + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, secretConfig: {}, ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', name: 'Hubspot', @@ -394,7 +569,11 @@ export const data = [ context: { mappedToDestination: true, externalId: [ - { identifierType: 'email', id: 'testhubspot2@email.com', type: 'HS-lead' }, + { + identifierType: 'email', + id: 'testhubspot2@email.com', + type: 'HS-lead', + }, ], sources: { job_id: '24c5HJxHomh6YCngEOCgjS5r1KX/Syncher', @@ -406,16 +585,25 @@ export const data = [ }, }, type: 'identify', - traits: { firstname: 'Test Hubspot', anonymousId: '12345', country: 'India' }, + 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 }, + integrations: { + All: true, + }, sentAt: '2019-10-14T09:03:22.563Z', }, destination: { - Config: { apiKey: 'dummy-apikey', hubID: 'dummy-hubId' }, + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, secretConfig: {}, ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', name: 'Hubspot', @@ -435,7 +623,9 @@ export const data = [ isConnectionEnabled: true, isProcessorEnabled: true, }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, }, { message: { @@ -443,7 +633,11 @@ export const data = [ context: { mappedToDestination: true, externalId: [ - { identifierType: 'email', id: 'testhubspot@email.com', type: 'HS-lead' }, + { + identifierType: 'email', + id: 'testhubspot@email.com', + type: 'HS-lead', + }, ], sources: { job_id: '24c5HJxHomh6YCngEOCgjS5r1KX/Syncher', @@ -455,16 +649,25 @@ export const data = [ }, }, type: 'identify', - traits: { firstname: 'Test Hubspot 1', anonymousId: '123451', country: 'India 1' }, + 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 }, + integrations: { + All: true, + }, sentAt: '2019-10-14T09:03:22.563Z', }, destination: { - Config: { apiKey: 'dummy-apikey', hubID: 'dummy-hubId' }, + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, secretConfig: {}, ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', name: 'Hubspot', @@ -484,7 +687,9 @@ export const data = [ isConnectionEnabled: true, isProcessorEnabled: true, }, - metadata: { jobId: 3, userId: 'u1' }, + metadata: { + jobId: 3, + }, }, ], destType: 'hs', @@ -503,8 +708,12 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://api.hubapi.com/crm/v3/objects/lead/batch/create', - headers: { 'Content-Type': 'application/json' }, - params: { hapikey: 'dummy-apikey' }, + headers: { + 'Content-Type': 'application/json', + }, + params: { + hapikey: 'dummy-apikey', + }, body: { JSON: { inputs: [ @@ -524,11 +733,18 @@ export const data = [ }, files: {}, }, - metadata: [{ jobId: 3, userId: 'u1' }], + metadata: [ + { + jobId: 3, + }, + ], batched: true, statusCode: 200, destination: { - Config: { apiKey: 'dummy-apikey', hubID: 'dummy-hubId' }, + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, secretConfig: {}, ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', name: 'Hubspot', @@ -555,8 +771,12 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://api.hubapi.com/crm/v3/objects/lead/batch/update', - headers: { 'Content-Type': 'application/json' }, - params: { hapikey: 'dummy-apikey' }, + headers: { + 'Content-Type': 'application/json', + }, + params: { + hapikey: 'dummy-apikey', + }, body: { JSON: { inputs: [ @@ -577,11 +797,18 @@ export const data = [ }, files: {}, }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: true, statusCode: 200, destination: { - Config: { apiKey: 'dummy-apikey', hubID: 'dummy-hubId' }, + Config: { + apiKey: 'dummy-apikey', + hubID: 'dummy-hubId', + }, secretConfig: {}, ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', name: 'Hubspot', @@ -623,7 +850,11 @@ export const data = [ context: { mappedToDestination: true, externalId: [ - { identifierType: 'email', id: 'testhubspot2@email.com', type: 'HS-lead' }, + { + identifierType: 'email', + id: 'testhubspot2@email.com', + type: 'HS-lead', + }, ], sources: { job_id: '24c5HJxHomh6YCngEOCgjS5r1KX/Syncher', @@ -635,12 +866,18 @@ export const data = [ }, }, type: 'identify', - traits: { firstname: 'Test Hubspot', anonymousId: '12345', country: 'India' }, + 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 }, + integrations: { + All: true, + }, sentAt: '2019-10-14T09:03:22.563Z', }, destination: { @@ -656,22 +893,42 @@ export const data = [ rsEventName: 'Purchase', hubspotEventName: 'pedummy-hubId_rs_hub_test', eventProperties: [ - { from: 'Revenue', to: 'value' }, - { from: 'Price', to: 'cost' }, + { + 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' }, + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, ], }, ], eventFilteringOption: 'disable', - blacklistedEvents: [{ eventName: '' }], - whitelistedEvents: [{ eventName: '' }], + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], }, secretConfig: {}, ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', @@ -692,7 +949,9 @@ export const data = [ isConnectionEnabled: true, isProcessorEnabled: true, }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, }, { message: { @@ -700,7 +959,11 @@ export const data = [ context: { mappedToDestination: true, externalId: [ - { identifierType: 'email', id: 'testhubspot@email.com', type: 'HS-lead' }, + { + identifierType: 'email', + id: 'testhubspot@email.com', + type: 'HS-lead', + }, ], sources: { job_id: '24c5HJxHomh6YCngEOCgjS5r1KX/Syncher', @@ -712,12 +975,18 @@ export const data = [ }, }, type: 'identify', - traits: { firstname: 'Test Hubspot 1', anonymousId: '123451', country: 'India 1' }, + 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 }, + integrations: { + All: true, + }, sentAt: '2019-10-14T09:03:22.563Z', }, destination: { @@ -733,22 +1002,42 @@ export const data = [ rsEventName: 'Purchase', hubspotEventName: 'pedummy-hubId_rs_hub_test', eventProperties: [ - { from: 'Revenue', to: 'value' }, - { from: 'Price', to: 'cost' }, + { + 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' }, + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, ], }, ], eventFilteringOption: 'disable', - blacklistedEvents: [{ eventName: '' }], - whitelistedEvents: [{ eventName: '' }], + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], }, secretConfig: {}, ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', @@ -769,7 +1058,9 @@ export const data = [ isConnectionEnabled: true, isProcessorEnabled: true, }, - metadata: { jobId: 3, userId: 'u1' }, + metadata: { + jobId: 3, + }, }, { message: { @@ -805,7 +1096,9 @@ export const data = [ originalTimestamp: '2019-10-15T09:35:31.288Z', anonymousId: '00000000000000000000000000', userId: '12345', - integrations: { All: true }, + integrations: { + All: true, + }, sentAt: '2019-10-14T09:03:22.563Z', }, destination: { @@ -821,22 +1114,42 @@ export const data = [ rsEventName: 'Purchase', hubspotEventName: 'pedummy-hubId_rs_hub_test', eventProperties: [ - { from: 'Revenue', to: 'value' }, - { from: 'Price', to: 'cost' }, + { + 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' }, + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, ], }, ], eventFilteringOption: 'disable', - blacklistedEvents: [{ eventName: '' }], - whitelistedEvents: [{ eventName: '' }], + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], }, secretConfig: {}, ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', @@ -857,7 +1170,9 @@ export const data = [ isConnectionEnabled: true, isProcessorEnabled: true, }, - metadata: { jobId: 4, userId: 'u1' }, + metadata: { + jobId: 4, + }, }, ], destType: 'hs', @@ -912,8 +1227,12 @@ export const data = [ files: {}, }, metadata: [ - { jobId: 3, userId: 'u1' }, - { jobId: 4, userId: 'u1' }, + { + jobId: 3, + }, + { + jobId: 4, + }, ], batched: true, statusCode: 200, @@ -930,22 +1249,42 @@ export const data = [ rsEventName: 'Purchase', hubspotEventName: 'pedummy-hubId_rs_hub_test', eventProperties: [ - { from: 'Revenue', to: 'value' }, - { from: 'Price', to: 'cost' }, + { + 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' }, + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, ], }, ], eventFilteringOption: 'disable', - blacklistedEvents: [{ eventName: '' }], - whitelistedEvents: [{ eventName: '' }], + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], }, secretConfig: {}, ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', @@ -998,7 +1337,11 @@ export const data = [ }, files: {}, }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: true, statusCode: 200, destination: { @@ -1014,22 +1357,42 @@ export const data = [ rsEventName: 'Purchase', hubspotEventName: 'pedummy-hubId_rs_hub_test', eventProperties: [ - { from: 'Revenue', to: 'value' }, - { from: 'Price', to: 'cost' }, + { + 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' }, + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, ], }, ], eventFilteringOption: 'disable', - blacklistedEvents: [{ eventName: '' }], - whitelistedEvents: [{ eventName: '' }], + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], }, secretConfig: {}, ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', @@ -1081,24 +1444,42 @@ export const data = [ firstname: 'Test Hubspot22', anonymousId: '4444', }, - library: { name: 'RudderLabs JavaScript SDK', 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: '' }, + 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 }, + integrations: { + All: true, + }, sentAt: '2019-10-14T09:03:22.563Z', }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, destination: { Config: { authorizationType: 'newPrivateAppApi', @@ -1112,22 +1493,42 @@ export const data = [ rsEventName: 'Purchase', hubspotEventName: 'pedummy-hubId_rs_hub_test', eventProperties: [ - { from: 'Revenue', to: 'value' }, - { from: 'Price', to: 'cost' }, + { + 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' }, + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, ], }, ], eventFilteringOption: 'disable', - blacklistedEvents: [{ eventName: '' }], - whitelistedEvents: [{ eventName: '' }], + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], }, secretConfig: {}, ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', @@ -1164,24 +1565,42 @@ export const data = [ firstname: 'Test Hubspot44', anonymousId: '4444', }, - library: { name: 'RudderLabs JavaScript SDK', 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: '' }, + 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 }, + integrations: { + All: true, + }, sentAt: '2019-10-14T09:03:22.563Z', }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, destination: { Config: { authorizationType: 'newPrivateAppApi', @@ -1195,22 +1614,42 @@ export const data = [ rsEventName: 'Purchase', hubspotEventName: 'pedummy-hubId_rs_hub_test', eventProperties: [ - { from: 'Revenue', to: 'value' }, - { from: 'Price', to: 'cost' }, + { + 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' }, + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, ], }, ], eventFilteringOption: 'disable', - blacklistedEvents: [{ eventName: '' }], - whitelistedEvents: [{ eventName: '' }], + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], }, secretConfig: {}, ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', @@ -1246,9 +1685,13 @@ export const data = [ ], }, event: 'Purchase', - properties: { Revenue: 'name1' }, + properties: { + Revenue: 'name1', + }, + }, + metadata: { + jobId: 3, }, - metadata: { jobId: 3, userId: 'u1' }, destination: { Config: { authorizationType: 'newPrivateAppApi', @@ -1262,22 +1705,42 @@ export const data = [ rsEventName: 'Purchase', hubspotEventName: 'pedummy-hubId_rs_hub_test', eventProperties: [ - { from: 'Revenue', to: 'value' }, - { from: 'Price', to: 'cost' }, + { + 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' }, + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, ], }, ], eventFilteringOption: 'disable', - blacklistedEvents: [{ eventName: '' }], - whitelistedEvents: [{ eventName: '' }], + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], }, secretConfig: {}, ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', @@ -1314,24 +1777,42 @@ export const data = [ firstname: 'Test Hubspot22', anonymousId: '4444', }, - library: { name: 'RudderLabs JavaScript SDK', 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: '' }, + 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 }, + integrations: { + All: true, + }, sentAt: '2019-10-14T09:03:22.563Z', }, - metadata: { jobId: 4, userId: 'u1' }, + metadata: { + jobId: 4, + }, destination: { Config: { authorizationType: 'newPrivateAppApi', @@ -1345,22 +1826,42 @@ export const data = [ rsEventName: 'Purchase', hubspotEventName: 'pedummy-hubId_rs_hub_test', eventProperties: [ - { from: 'Revenue', to: 'value' }, - { from: 'Price', to: 'cost' }, + { + 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' }, + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, ], }, ], eventFilteringOption: 'disable', - blacklistedEvents: [{ eventName: '' }], - whitelistedEvents: [{ eventName: '' }], + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], }, secretConfig: {}, ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', @@ -1397,24 +1898,42 @@ export const data = [ firstname: 'Test Hubspot44', anonymousId: '4444', }, - library: { name: 'RudderLabs JavaScript SDK', 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: '' }, + 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 }, + integrations: { + All: true, + }, sentAt: '2019-10-14T09:03:22.563Z', }, - metadata: { jobId: 5, userId: 'u1' }, + metadata: { + jobId: 5, + }, destination: { Config: { authorizationType: 'newPrivateAppApi', @@ -1428,22 +1947,42 @@ export const data = [ rsEventName: 'Purchase', hubspotEventName: 'pedummy-hubId_rs_hub_test', eventProperties: [ - { from: 'Revenue', to: 'value' }, - { from: 'Price', to: 'cost' }, + { + 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' }, + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, ], }, ], eventFilteringOption: 'disable', - blacklistedEvents: [{ eventName: '' }], - whitelistedEvents: [{ eventName: '' }], + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], }, secretConfig: {}, ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', @@ -1490,9 +2029,17 @@ export const data = [ body: { JSON: { inputs: [ - { properties: { email: 'noname@email.com', firstname: 'Test Hubspot44' } }, { - properties: { email: 'testhubspot@email.com', firstname: 'Test Hubspot44' }, + properties: { + email: 'noname@email.com', + firstname: 'Test Hubspot44', + }, + }, + { + properties: { + email: 'testhubspot@email.com', + firstname: 'Test Hubspot44', + }, }, ], }, @@ -1503,10 +2050,18 @@ export const data = [ files: {}, }, metadata: [ - { jobId: 1, userId: 'u1' }, - { jobId: 2, userId: 'u1' }, - { jobId: 4, userId: 'u1' }, - { jobId: 5, userId: 'u1' }, + { + jobId: 1, + }, + { + jobId: 2, + }, + { + jobId: 4, + }, + { + jobId: 5, + }, ], batched: true, statusCode: 200, @@ -1523,22 +2078,42 @@ export const data = [ rsEventName: 'Purchase', hubspotEventName: 'pedummy-hubId_rs_hub_test', eventProperties: [ - { from: 'Revenue', to: 'value' }, - { from: 'Price', to: 'cost' }, + { + 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' }, + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, ], }, ], eventFilteringOption: 'disable', - blacklistedEvents: [{ eventName: '' }], - whitelistedEvents: [{ eventName: '' }], + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], }, secretConfig: {}, ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', @@ -1575,7 +2150,9 @@ export const data = [ JSON: { email: 'osvaldocostaferreira98@gmail.com', eventName: 'pedummy-hubId_rs_hub_test', - properties: { value: 'name1' }, + properties: { + value: 'name1', + }, }, JSON_ARRAY: {}, XML: {}, @@ -1583,7 +2160,11 @@ export const data = [ }, files: {}, }, - metadata: [{ jobId: 3, userId: 'u1' }], + metadata: [ + { + jobId: 3, + }, + ], batched: false, statusCode: 200, destination: { @@ -1599,22 +2180,42 @@ export const data = [ rsEventName: 'Purchase', hubspotEventName: 'pedummy-hubId_rs_hub_test', eventProperties: [ - { from: 'Revenue', to: 'value' }, - { from: 'Price', to: 'cost' }, + { + 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' }, + { + from: 'firstName', + to: 'first_name', + }, + { + from: 'lastName', + to: 'last_name', + }, ], }, ], eventFilteringOption: 'disable', - blacklistedEvents: [{ eventName: '' }], - whitelistedEvents: [{ eventName: '' }], + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], }, secretConfig: {}, ID: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', diff --git a/test/integrations/destinations/impact/router/data.ts b/test/integrations/destinations/impact/router/data.ts index e9120ae03d..1e9cd9cc6e 100644 --- a/test/integrations/destinations/impact/router/data.ts +++ b/test/integrations/destinations/impact/router/data.ts @@ -18,8 +18,18 @@ export const data = [ impactAppId: '2323', eventTypeId: '56446', enableEmailHashing: true, - rudderToImpactProperty: [{ from: 'profit', to: 'Money1' }], - productsMapping: [{ from: 'sku', to: 'ItemSku' }], + rudderToImpactProperty: [ + { + from: 'profit', + to: 'Money1', + }, + ], + productsMapping: [ + { + from: 'sku', + to: 'ItemSku', + }, + ], enableIdentifyEvents: true, enablePageEvents: false, enableScreenEvents: false, @@ -27,24 +37,40 @@ export const data = [ installEventNames: [{ eventName: 'App Installed' }], }, }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, message: { type: 'identify', sentAt: '2021-01-03T17:02:53.195Z', userId: 'user123', channel: 'web', context: { - os: { name: 'android', version: '1.12.3' }, + os: { + name: 'android', + version: '1.12.3', + }, app: { name: 'RudderLabs JavaScript SDK', build: '1.0.0', version: '1.1.11', namespace: 'com.rudderlabs.javascript', }, - traits: { email: 'user123@email.com', phone: '+917836362334', userId: 'user123' }, + traits: { + email: 'user123@email.com', + phone: '+917836362334', + userId: 'user123', + }, locale: 'en-US', - device: { token: 'token', id: 'id', type: 'ios' }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.1.11' }, + device: { + token: 'token', + id: 'id', + type: 'ios', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.11', + }, userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0', }, @@ -77,7 +103,10 @@ export const data = [ ], }, context: { - os: { name: '', version: '' }, + os: { + name: '', + version: '', + }, app: { name: 'RudderLabs JavaScript SDK', build: '1.0.0', @@ -85,8 +114,13 @@ export const data = [ namespace: 'com.rudderlabs.javascript', }, locale: 'en-US', - screen: { density: 2 }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.1.11' }, + 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', @@ -96,7 +130,9 @@ export const data = [ anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', originalTimestamp: 'NOW', }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, destination: { Config: { accountSID: 'dfsgertrtff3erfc34rfwf', @@ -105,8 +141,18 @@ export const data = [ impactAppId: '2323', eventTypeId: '56446', enableEmailHashing: true, - rudderToImpactProperty: [{ from: 'properties.profit', to: 'Money1' }], - productsMapping: [{ from: 'variant', to: 'ItemCategory' }], + rudderToImpactProperty: [ + { + from: 'properties.profit', + to: 'Money1', + }, + ], + productsMapping: [ + { + from: 'variant', + to: 'ItemCategory', + }, + ], enableIdentifyEvents: false, enablePageEvents: false, enableScreenEvents: false, @@ -162,7 +208,11 @@ export const data = [ version: '1', endpoint: 'https://trkapi.impact.com/PageLoad', }, - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [ + { + jobId: 1, + }, + ], batched: false, statusCode: 200, destination: { @@ -173,8 +223,18 @@ export const data = [ impactAppId: '2323', eventTypeId: '56446', enableEmailHashing: true, - rudderToImpactProperty: [{ from: 'profit', to: 'Money1' }], - productsMapping: [{ from: 'sku', to: 'ItemSku' }], + rudderToImpactProperty: [ + { + from: 'profit', + to: 'Money1', + }, + ], + productsMapping: [ + { + from: 'sku', + to: 'ItemSku', + }, + ], enableIdentifyEvents: true, enablePageEvents: false, enableScreenEvents: false, @@ -227,7 +287,11 @@ export const data = [ endpoint: 'https://api.impact.com/Advertisers/dfsgertrtff3erfc34rfwf/Conversions', }, ], - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { @@ -238,8 +302,18 @@ export const data = [ impactAppId: '2323', eventTypeId: '56446', enableEmailHashing: true, - rudderToImpactProperty: [{ from: 'properties.profit', to: 'Money1' }], - productsMapping: [{ from: 'variant', to: 'ItemCategory' }], + rudderToImpactProperty: [ + { + from: 'properties.profit', + to: 'Money1', + }, + ], + productsMapping: [ + { + from: 'variant', + to: 'ItemCategory', + }, + ], enableIdentifyEvents: false, enablePageEvents: false, enableScreenEvents: false, diff --git a/test/integrations/destinations/indicative/router/data.ts b/test/integrations/destinations/indicative/router/data.ts index 88e0665e62..037d5d5c3d 100644 --- a/test/integrations/destinations/indicative/router/data.ts +++ b/test/integrations/destinations/indicative/router/data.ts @@ -10,8 +10,14 @@ export const data = [ body: { input: [ { - destination: { Config: { apiKey: 'abcde' } }, - metadata: { jobId: 2, userId: 'u1' }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + metadata: { + jobId: 2, + }, message: { anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', context: { @@ -21,15 +27,25 @@ export const data = [ model: 'Redmi 6', name: 'xiaomi', }, - network: { carrier: 'Banglalink' }, - os: { name: 'android', version: '8.1.0' }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, traits: { - address: { city: 'Dhaka', country: 'Bangladesh' }, + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', }, }, event: 'spin_result', - integrations: { AM: true }, + integrations: { + AM: true, + }, message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', properties: { additional_bet_index: 0, @@ -74,8 +90,14 @@ export const data = [ }, }, { - destination: { Config: { apiKey: 'abcde' } }, - metadata: { jobId: 3, userId: 'u1' }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, + metadata: { + jobId: 2, + }, message: { channel: 'web', context: { @@ -85,13 +107,21 @@ 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 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', locale: 'en-US', ip: '0.0.0.0', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, }, messageId: '84e26acc-56a5-4835-8233-591137fca468', session_id: '3049dc4c-5a95-4ccd-a3e7-d74a7e411f22', @@ -110,7 +140,9 @@ export const data = [ street: '', }, }, - integrations: { All: true }, + integrations: { + All: true, + }, sentAt: '2019-10-14T09:03:22.563Z', }, }, @@ -188,10 +220,18 @@ export const data = [ userId: 'test_user_id', }, ], - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, - destination: { Config: { apiKey: 'abcde' } }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, }, { batchedRequest: [ @@ -240,7 +280,11 @@ export const data = [ }, params: {}, body: { - JSON: { previousId: 'anon_id', newId: '123456', apiKey: 'abcde' }, + JSON: { + previousId: 'anon_id', + newId: '123456', + apiKey: 'abcde', + }, XML: {}, JSON_ARRAY: {}, FORM: {}, @@ -249,10 +293,18 @@ export const data = [ userId: '123456', }, ], - metadata: [{ jobId: 3, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, - destination: { Config: { apiKey: 'abcde' } }, + destination: { + Config: { + apiKey: 'abcde', + }, + }, }, ], }, diff --git a/test/integrations/destinations/intercom/dataDelivery/data.ts b/test/integrations/destinations/intercom/dataDelivery/data.ts index db7aafc963..23bcdc6af2 100644 --- a/test/integrations/destinations/intercom/dataDelivery/data.ts +++ b/test/integrations/destinations/intercom/dataDelivery/data.ts @@ -1,91 +1,90 @@ export const data = [ { - name: 'intercom', - description: 'Test 0', - feature: 'dataDelivery', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - 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', + "name": "intercom", + "description": "Test 0", + "feature": "dataDelivery", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "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', - }, + "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: {}, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} }, - files: {}, - userId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', + "files": {}, + "userId": "58b21c2d-f8d5-4410-a2d0-b268a26b7e33" }, - method: 'POST', - }, + "method": "POST" + } }, - output: { - response: { - status: 500, - body: { - output: { - status: 500, - message: - '[Intercom Response Handler] Request failed for destination intercom with status: 408', - destinationResponse: { - response: { - type: 'error.list', - request_id: '000on04msi4jpk7d3u60', - errors: [ + "output": { + "response": { + "status": 500, + "body": { + "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', - }, - ], + "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', + "status": 408 }, - }, - }, - }, - }, - }, -]; + "statTags": { + "destType": "INTERCOM", + "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/intercom/network.ts b/test/integrations/destinations/intercom/network.ts index 6ecd52a9d1..e3bba3f260 100644 --- a/test/integrations/destinations/intercom/network.ts +++ b/test/integrations/destinations/intercom/network.ts @@ -142,3 +142,4 @@ const deliveryCallsData = [ }, ]; export const networkCallsData = [...deleteNwData, ...deliveryCallsData]; + diff --git a/test/integrations/destinations/intercom/router/data.ts b/test/integrations/destinations/intercom/router/data.ts index 766161bac8..74c514d082 100644 --- a/test/integrations/destinations/intercom/router/data.ts +++ b/test/integrations/destinations/intercom/router/data.ts @@ -27,7 +27,10 @@ export const data = [ name: 'iPod touch (7th generation)', type: 'iOS', }, - library: { name: 'test-ios-library', version: '1.0.7' }, + library: { + name: 'test-ios-library', + version: '1.0.7', + }, locale: 'en-US', network: { bluetooth: false, @@ -35,8 +38,15 @@ export const data = [ cellular: false, wifi: true, }, - os: { name: 'iOS', version: '14.0' }, - screen: { density: 2, height: 320, width: 568 }, + os: { + name: 'iOS', + version: '14.0', + }, + screen: { + density: 2, + height: 320, + width: 568, + }, timezone: 'Asia/Kolkata', traits: { anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', @@ -52,7 +62,9 @@ export const data = [ userAgent: 'unknown', }, event: 'Test Event 2', - integrations: { All: true }, + 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', @@ -61,7 +73,9 @@ export const data = [ timestamp: '2020-10-01T00:41:01.324+05:30', type: 'identify', }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, destination: { Config: { apiKey: 'intercomApiKey', @@ -88,7 +102,10 @@ export const data = [ name: 'iPod touch (7th generation)', type: 'iOS', }, - library: { name: 'test-ios-library', version: '1.0.7' }, + library: { + name: 'test-ios-library', + version: '1.0.7', + }, locale: 'en-US', network: { bluetooth: false, @@ -96,8 +113,15 @@ export const data = [ cellular: false, wifi: true, }, - os: { name: 'iOS', version: '14.0' }, - screen: { density: 2, height: 320, width: 568 }, + os: { + name: 'iOS', + version: '14.0', + }, + screen: { + density: 2, + height: 320, + width: 568, + }, timezone: 'Asia/Kolkata', traits: { anonymousId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', @@ -111,7 +135,9 @@ export const data = [ userAgent: 'unknown', }, event: 'Test Event 2', - integrations: { All: true }, + 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', @@ -120,7 +146,9 @@ export const data = [ timestamp: '2020-10-01T00:41:01.324+05:30', type: 'identify', }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, destination: { Config: { apiKey: 'intercomApiKey', @@ -173,7 +201,11 @@ export const data = [ files: {}, userId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', }, - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [ + { + jobId: 1, + }, + ], batched: false, statusCode: 200, destination: { @@ -217,7 +249,11 @@ export const data = [ files: {}, userId: '58b21c2d-f8d5-4410-a2d0-b268a26b7e33', }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { diff --git a/test/integrations/destinations/iterable/router/data.ts b/test/integrations/destinations/iterable/router/data.ts index 62a4811834..7cd19381d6 100644 --- a/test/integrations/destinations/iterable/router/data.ts +++ b/test/integrations/destinations/iterable/router/data.ts @@ -15,7 +15,10 @@ export const data = [ sentAt: '2022-09-27T11:13:03.777Z', messageId: '9ad41366-8060-4c9f-b181-f6bea67d5469', originalTimestamp: '2022-09-27T11:13:03.777Z', - traits: { ruchira: 'donaldbaker@ellis.com', new_field2: 'GB' }, + traits: { + ruchira: 'donaldbaker@ellis.com', + new_field2: 'GB', + }, channel: 'sources', rudderId: '3d51640c-ab09-42c1-b7b2-db6ab433b35e', context: { @@ -29,7 +32,11 @@ export const data = [ }, mappedToDestination: 'true', externalId: [ - { id: 'Tiffany', type: 'ITERABLE-test-ruchira', identifierType: 'itemId' }, + { + id: 'Tiffany', + type: 'ITERABLE-test-ruchira', + identifierType: 'itemId', + }, ], }, timestamp: '2022-09-27T11:12:59.079Z', @@ -38,9 +45,14 @@ export const data = [ recordId: '10', request_ip: '10.1.86.248', }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, destination: { - Config: { apiKey: '583af2f8-15ba-49c0-8511-76383e7de07e', hubID: '22066036' }, + Config: { + apiKey: '583af2f8-15ba-49c0-8511-76383e7de07e', + hubID: '22066036', + }, Enabled: true, }, }, @@ -50,7 +62,10 @@ export const data = [ sentAt: '2022-09-27T11:13:03.777Z', messageId: '9ad41366-8060-4c9f-b181-f6bea67d5469', originalTimestamp: '2022-09-27T11:13:03.777Z', - traits: { ruchira: 'abc@ellis.com', new_field2: 'GB1' }, + traits: { + ruchira: 'abc@ellis.com', + new_field2: 'GB1', + }, channel: 'sources', rudderId: '3d51640c-ab09-42c1-b7b2-db6ab433b35e', context: { @@ -64,7 +79,11 @@ export const data = [ }, mappedToDestination: 'true', externalId: [ - { id: 'ABC', type: 'ITERABLE-test-ruchira', identifierType: 'itemId' }, + { + id: 'ABC', + type: 'ITERABLE-test-ruchira', + identifierType: 'itemId', + }, ], }, timestamp: '2022-09-27T11:12:59.079Z', @@ -73,9 +92,14 @@ export const data = [ recordId: '10', request_ip: '10.1.86.248', }, - metadata: { jobId: 3, userId: 'u1' }, + metadata: { + jobId: 2, + }, destination: { - Config: { apiKey: '583af2f8-15ba-49c0-8511-76383e7de07e', hubID: '22066036' }, + Config: { + apiKey: '583af2f8-15ba-49c0-8511-76383e7de07e', + hubID: '22066036', + }, Enabled: true, }, }, @@ -103,8 +127,14 @@ export const data = [ body: { JSON: { documents: { - Tiffany: { ruchira: 'donaldbaker@ellis.com', new_field2: 'GB' }, - ABC: { ruchira: 'abc@ellis.com', new_field2: 'GB1' }, + Tiffany: { + ruchira: 'donaldbaker@ellis.com', + new_field2: 'GB', + }, + ABC: { + ruchira: 'abc@ellis.com', + new_field2: 'GB1', + }, }, replaceUploadedFieldsOnly: true, }, @@ -115,13 +145,20 @@ export const data = [ files: {}, }, metadata: [ - { jobId: 2, userId: 'u1' }, - { jobId: 3, userId: 'u1' }, + { + jobId: 2, + }, + { + jobId: 2, + }, ], batched: true, statusCode: 200, destination: { - Config: { apiKey: '583af2f8-15ba-49c0-8511-76383e7de07e', hubID: '22066036' }, + Config: { + apiKey: '583af2f8-15ba-49c0-8511-76383e7de07e', + hubID: '22066036', + }, Enabled: true, }, }, @@ -145,8 +182,15 @@ export const data = [ type: 'track', event: 'Email Opened', sentAt: '2020-08-28T16:26:16.473Z', - context: { library: { name: 'analytics-node', version: '0.0.3' } }, - _metadata: { nodeVersion: '10.22.0' }, + context: { + library: { + name: 'analytics-node', + version: '0.0.3', + }, + }, + _metadata: { + nodeVersion: '10.22.0', + }, messageId: 'node-570110489d3e99b234b18af9a9eca9d4-6009779e-82d7-469d-aaeb-5ccf162b0453', properties: { @@ -157,7 +201,9 @@ export const data = [ anonymousId: 'abcdeeeeeeeexxxx102', originalTimestamp: '2020-08-28T16:26:06.468Z', }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, destination: { Config: { apiKey: '62d12498c37c4fd8a1a546c2d35c2f60', @@ -187,15 +233,22 @@ export const data = [ email: 'manashi@website.com', country: 'India', }, - library: { name: 'analytics-node', version: '0.0.3' }, + library: { + name: 'analytics-node', + version: '0.0.3', + }, + }, + _metadata: { + nodeVersion: '10.22.0', }, - _metadata: { nodeVersion: '10.22.0' }, messageId: 'node-cc3ef811f686139ee527b806ee0129ef-163a3a88-266f-447e-8cce-34a8f42f8dcd', anonymousId: 'abcdeeeeeeeexxxx102', originalTimestamp: '2020-08-28T16:26:06.462Z', }, - metadata: { jobId: 3, userId: 'u1' }, + metadata: { + jobId: 3, + }, destination: { Config: { apiKey: '62d12498c37c4fd8a1a546c2d35c2f60', @@ -217,14 +270,24 @@ export const data = [ namespace: 'com.rudderlabs.javascript', version: '1.0.0', }, - traits: { email: 'sayan@gmail.com' }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + traits: { + email: 'sayan@gmail.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', ip: '0.0.0.0', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, }, type: 'page', messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', @@ -239,11 +302,15 @@ export const data = [ url: '', category: 'test-category', }, - integrations: { All: true }, + integrations: { + All: true, + }, name: 'ApplicationLoaded', sentAt: '2019-10-14T11:15:53.296Z', }, - metadata: { jobId: 4, userId: 'u1' }, + metadata: { + jobId: 4, + }, destination: { Config: { apiKey: '12345', @@ -275,7 +342,9 @@ export const data = [ task_run_id: 'c5tar6cqgmgmcjvupdi0', version: 'release.v1.6.8', }, - device: { token: 54321 }, + device: { + token: 54321, + }, }, messageId: '2f052f7c-f694-4849-a7ed-a432f7ffa0a4', originalTimestamp: '2021-10-28T14:03:50.503Z', @@ -296,7 +365,9 @@ export const data = [ type: 'identify', userId: 'lynnanderson@smith.net', }, - metadata: { jobId: 5, userId: 'u1' }, + metadata: { + jobId: 5, + }, destination: { ID: '1zia9wKshXt80YksLmUdJnr7IHI', Name: 'test_iterable', @@ -349,7 +420,9 @@ export const data = [ IsProcessorEnabled: true, }, libraries: [], - request: { query: {} }, + request: { + query: {}, + }, }, { message: { @@ -361,14 +434,24 @@ export const data = [ namespace: 'com.rudderlabs.javascript', version: '1.0.0', }, - traits: { email: 'sayan@gmail.com' }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + traits: { + email: 'sayan@gmail.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', ip: '0.0.0.0', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, }, event: 'product added', type: 'track', @@ -406,11 +489,15 @@ export const data = [ }, ], }, - integrations: { All: true }, + integrations: { + All: true, + }, name: 'ApplicationLoaded', sentAt: '2019-10-14T11:15:53.296Z', }, - metadata: { jobId: 6, userId: 'u1' }, + metadata: { + jobId: 6, + }, destination: { Config: { apiKey: '62d12498c37c4fd8a1a546c2d35c2f60', @@ -426,8 +513,15 @@ export const data = [ message: { type: 'page', sentAt: '2020-08-28T16:26:16.473Z', - context: { library: { name: 'analytics-node', version: '0.0.3' } }, - _metadata: { nodeVersion: '10.22.0' }, + context: { + library: { + name: 'analytics-node', + version: '0.0.3', + }, + }, + _metadata: { + nodeVersion: '10.22.0', + }, messageId: 'node-6f62b91e789a636929ca38aed01c5f6e-103c720d-81bd-4742-98d6-d45a65aed23e', properties: { @@ -438,7 +532,9 @@ export const data = [ anonymousId: 'abcdeeeeeeeexxxx102', originalTimestamp: '2020-08-28T16:26:06.468Z', }, - metadata: { jobId: 7, userId: 'u1' }, + metadata: { + jobId: 7, + }, destination: { Config: { apiKey: '62d12498c37c4fd8a1a546c2d35c2f60', @@ -454,8 +550,15 @@ export const data = [ message: { type: 'alias', sentAt: '2020-08-28T16:26:16.473Z', - context: { library: { name: 'analytics-node', version: '0.0.3' } }, - _metadata: { nodeVersion: '10.22.0' }, + context: { + library: { + name: 'analytics-node', + version: '0.0.3', + }, + }, + _metadata: { + nodeVersion: '10.22.0', + }, messageId: 'node-6f62b91e789a636929ca38aed01c5f6e-103c720d-81bd-4742-98d6-d45a65aed23e', properties: { @@ -468,7 +571,9 @@ export const data = [ anonymousId: 'abcdeeeeeeeexxxx102', originalTimestamp: '2020-08-28T16:26:06.468Z', }, - metadata: { jobId: 8, userId: 'u1' }, + metadata: { + jobId: 8, + }, destination: { Config: { apiKey: '62d12498c37c4fd8a1a546c2d35c2f60', @@ -522,7 +627,11 @@ export const data = [ }, files: {}, }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: true, statusCode: 200, destination: { @@ -570,7 +679,11 @@ export const data = [ }, files: {}, }, - metadata: [{ jobId: 3, userId: 'u1' }], + metadata: [ + { + jobId: 3, + }, + ], batched: true, statusCode: 200, destination: { @@ -590,7 +703,10 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://api.iterable.com/api/events/trackBulk', - headers: { 'Content-Type': 'application/json', api_key: '12345' }, + headers: { + 'Content-Type': 'application/json', + api_key: '12345', + }, params: {}, body: { JSON: { @@ -617,7 +733,11 @@ export const data = [ }, files: {}, }, - metadata: [{ jobId: 4, userId: 'u1' }], + metadata: [ + { + jobId: 4, + }, + ], batched: true, statusCode: 200, destination: { @@ -646,7 +766,9 @@ export const data = [ JSON: { user: { email: 'sayan@gmail.com', - dataFields: { email: 'sayan@gmail.com' }, + dataFields: { + email: 'sayan@gmail.com', + }, userId: '12345', preferUserId: true, mergeNestedObjects: true, @@ -680,7 +802,11 @@ export const data = [ }, files: {}, }, - metadata: [{ jobId: 6, userId: 'u1' }], + metadata: [ + { + jobId: 6, + }, + ], batched: false, statusCode: 200, destination: { @@ -726,7 +852,11 @@ export const data = [ }, files: {}, }, - metadata: [{ jobId: 7, userId: 'u1' }], + metadata: [ + { + jobId: 7, + }, + ], batched: true, statusCode: 200, destination: { @@ -752,14 +882,21 @@ export const data = [ }, params: {}, body: { - JSON: { currentEmail: 'old@email.com', newEmail: 'new@email.com' }, + JSON: { + currentEmail: 'old@email.com', + newEmail: 'new@email.com', + }, JSON_ARRAY: {}, XML: {}, FORM: {}, }, files: {}, }, - metadata: [{ jobId: 8, userId: 'u1' }], + metadata: [ + { + jobId: 8, + }, + ], batched: false, statusCode: 200, destination: { @@ -779,7 +916,10 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://api.iterable.com/api/users/bulkUpdate', - headers: { 'Content-Type': 'application/json', api_key: '12345' }, + headers: { + 'Content-Type': 'application/json', + api_key: '12345', + }, params: {}, body: { JSON: { @@ -807,7 +947,11 @@ export const data = [ }, files: {}, }, - metadata: [{ jobId: 5, userId: 'u1' }], + metadata: [ + { + jobId: 5, + }, + ], batched: true, statusCode: 200, destination: { diff --git a/test/integrations/destinations/june/router/data.ts b/test/integrations/destinations/june/router/data.ts index 81e5c6eb5a..cf8c4f0011 100644 --- a/test/integrations/destinations/june/router/data.ts +++ b/test/integrations/destinations/june/router/data.ts @@ -10,29 +10,49 @@ export const data = [ body: { input: [ { - destination: { Config: { apiKey: '93EMyDLvfpbRxxYn' }, ID: 'june123' }, - metadata: { jobId: 1, userId: 'u1' }, + destination: { + Config: { + apiKey: '93EMyDLvfpbRxxYn', + }, + ID: 'june123', + }, + 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 } }, + 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: '93EMyDLvfpbRxxYn' }, ID: 'june123' }, - metadata: { jobId: 2, userId: 'u1' }, + destination: { + Config: { + apiKey: '93EMyDLvfpbRxxYn', + }, + ID: 'june123', + }, + metadata: { + jobId: 2, + }, message: { type: 'track', event: 'Product Reviewed', properties: { review_id: '12345', product_id: '123', - rating: 3, + rating: 3.0, review_body: 'Average product, expected much more.', groupId: '91Yb32830', }, @@ -60,7 +80,11 @@ export const data = [ JSON: { anonymousId: 'bf412108-0357-4330-b119-7305e767823c', timestamp: '2022-01-20T13:39:21.032Z', - traits: { age: 25, email: 'johndoe@gmail.com', name: 'John Doe' }, + traits: { + age: 25, + email: 'johndoe@gmail.com', + name: 'John Doe', + }, userId: '5136633649', }, JSON_ARRAY: {}, @@ -77,15 +101,33 @@ export const data = [ type: 'REST', version: '1', }, - destination: { Config: { apiKey: '93EMyDLvfpbRxxYn' }, ID: 'june123' }, - metadata: [{ jobId: 1, userId: 'u1' }], + destination: { + Config: { + apiKey: '93EMyDLvfpbRxxYn', + }, + ID: 'june123', + }, + metadata: [ + { + jobId: 1, + }, + ], statusCode: 200, }, { - destination: { Config: { apiKey: '93EMyDLvfpbRxxYn' }, ID: 'june123' }, + destination: { + Config: { + apiKey: '93EMyDLvfpbRxxYn', + }, + ID: 'june123', + }, batched: false, error: 'Missing required value from "userIdOnly"', - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], statTags: { destType: 'JUNE', errorCategory: 'dataValidation', diff --git a/test/integrations/destinations/kafka/batch/data.ts b/test/integrations/destinations/kafka/batch/data.ts index 131833b23c..0cc1d75c24 100644 --- a/test/integrations/destinations/kafka/batch/data.ts +++ b/test/integrations/destinations/kafka/batch/data.ts @@ -19,8 +19,12 @@ export const data = [ userId: 'user1', context: { ip: '14.5.67.21', - traits: { trait1: 'new-val' }, - library: { name: 'http' }, + traits: { + trait1: 'new-val', + }, + library: { + name: 'http', + }, }, messageId: '6f27a4da-cefb-4800-acf1-f467e8aab91c', timestamp: '2020-02-02T00:23:09.544Z', @@ -31,7 +35,10 @@ export const data = [ }, topic: 'new-topic', }, - metadata: { rudderId: 'user1<<>>new-topic', jobId: 1, userId: 'u1' }, + metadata: { + rudderId: 'user1<<>>new-topic', + jobId: 1, + }, destination: { ID: '1uzGR4rn915R6Xts9KRfWAzmgGL', Name: 'local-kafka-test', @@ -98,8 +105,12 @@ export const data = [ userId: 'user2', context: { ip: '14.5.67.21', - traits: { trait1: 'new-val' }, - library: { name: 'http' }, + traits: { + trait1: 'new-val', + }, + library: { + name: 'http', + }, }, messageId: 'fe182d9e-e86e-4db5-ae12-f4b399555fcc', timestamp: '2020-02-02T00:23:09.544Z', @@ -110,7 +121,10 @@ export const data = [ }, topic: 'new-topic', }, - metadata: { rudderId: 'user2<<>>new-topic', jobId: 2, userId: 'u1' }, + metadata: { + rudderId: 'user2<<>>new-topic', + jobId: 2, + }, destination: { ID: '1uzGR4rn915R6Xts9KRfWAzmgGL', Name: 'local-kafka-test', @@ -177,8 +191,12 @@ export const data = [ userId: 'user3', context: { ip: '14.5.67.21', - traits: { trait1: 'new-val' }, - library: { name: 'http' }, + traits: { + trait1: 'new-val', + }, + library: { + name: 'http', + }, }, messageId: '2803e656-77ff-47ca-9606-90663f9aed38', timestamp: '2020-02-02T00:23:09.544Z', @@ -189,7 +207,10 @@ export const data = [ }, topic: 'new-topic', }, - metadata: { rudderId: 'user3<<>>new-topic', jobId: 3, userId: 'u1' }, + metadata: { + rudderId: 'user3<<>>new-topic', + jobId: 3, + }, destination: { ID: '1uzGR4rn915R6Xts9KRfWAzmgGL', Name: 'local-kafka-test', @@ -256,8 +277,12 @@ export const data = [ userId: 'user4', context: { ip: '14.5.67.21', - traits: { trait1: 'new-val' }, - library: { name: 'http' }, + traits: { + trait1: 'new-val', + }, + library: { + name: 'http', + }, }, messageId: '87c98fc2-561b-4631-8cd6-1d02cdd1429f', timestamp: '2020-02-02T00:23:09.544Z', @@ -268,7 +293,10 @@ export const data = [ }, topic: 'new-topic', }, - metadata: { rudderId: 'user4<<>>new-topic', jobId: 4, userId: 'u1' }, + metadata: { + rudderId: 'user4<<>>new-topic', + jobId: 4, + }, destination: { ID: '1uzGR4rn915R6Xts9KRfWAzmgGL', Name: 'local-kafka-test', @@ -335,10 +363,19 @@ export const data = [ userId: 'user5', context: { ip: '14.5.67.21', - traits: { trait1: 'new-val' }, - library: { name: 'http' }, + traits: { + trait1: 'new-val', + }, + library: { + name: 'http', + }, + }, + integrations: { + All: true, + KAFKA: { + schemaId: 'schema001', + }, }, - integrations: { All: true, KAFKA: { schemaId: 'schema001' } }, messageId: '87c98fc2-561b-4631-8cd6-1d02cdd1429f', timestamp: '2020-02-02T00:23:09.544Z', receivedAt: '2021-07-08T02:45:06.851+05:30', @@ -349,7 +386,10 @@ export const data = [ schemaId: 'schema001', topic: 'new-topic', }, - metadata: { rudderId: 'user5<<>>new-topic', jobId: 5, userId: 'u1' }, + metadata: { + rudderId: 'user5<<>>new-topic', + jobId: 5, + }, destination: { ID: '1uzGR4rn915R6Xts9KRfWAzmgGL', Name: 'local-kafka-test', @@ -416,10 +456,19 @@ export const data = [ userId: 'user6', context: { ip: '14.5.67.21', - traits: { trait1: 'new-val' }, - library: { name: 'http' }, + traits: { + trait1: 'new-val', + }, + library: { + name: 'http', + }, + }, + integrations: { + All: true, + KAFKA: { + topic: 'topic-1', + }, }, - integrations: { All: true, KAFKA: { topic: 'topic-1' } }, messageId: '87c98fc2-561b-4631-8cd6-1d02cdd1429f', timestamp: '2020-02-02T00:23:09.544Z', receivedAt: '2021-07-08T02:45:06.851+05:30', @@ -429,7 +478,10 @@ export const data = [ }, topic: 'topic-1', }, - metadata: { rudderId: 'user6<<>>topic-1', jobId: 6, userId: 'u1' }, + metadata: { + rudderId: 'user6<<>>topic-1', + jobId: 6, + }, destination: { ID: '1uzGR4rn915R6Xts9KRfWAzmgGL', Name: 'local-kafka-test', @@ -496,10 +548,19 @@ export const data = [ userId: 'user7', context: { ip: '14.5.67.21', - traits: { trait1: 'new-val' }, - library: { name: 'http' }, + traits: { + trait1: 'new-val', + }, + library: { + name: 'http', + }, + }, + integrations: { + All: true, + KAFKA: { + topic: 'topic-1', + }, }, - integrations: { All: true, KAFKA: { topic: 'topic-1' } }, messageId: '87c98fc2-561b-4631-8cd6-1d02cdd1429f', timestamp: '2020-02-02T00:23:09.544Z', receivedAt: '2021-07-08T02:45:06.851+05:30', @@ -509,7 +570,10 @@ export const data = [ }, topic: 'topic-1', }, - metadata: { rudderId: 'user7<<>>topic-1', jobId: 7, userId: 'u1' }, + metadata: { + rudderId: 'user7<<>>topic-1', + jobId: 7, + }, destination: { ID: '1uzGR4rn915R6Xts9KRfWAzmgGL', Name: 'local-kafka-test', @@ -576,10 +640,19 @@ export const data = [ userId: 'user8', context: { ip: '14.5.67.21', - traits: { trait1: 'new-val' }, - library: { name: 'http' }, + traits: { + trait1: 'new-val', + }, + library: { + name: 'http', + }, + }, + integrations: { + All: true, + KAFKA: { + topic: 'topic-2', + }, }, - integrations: { All: true, KAFKA: { topic: 'topic-2' } }, messageId: '87c98fc2-561b-4631-8cd6-1d02cdd1429f', timestamp: '2020-02-02T00:23:09.544Z', receivedAt: '2021-07-08T02:45:06.851+05:30', @@ -589,7 +662,10 @@ export const data = [ }, topic: 'topic-2', }, - metadata: { rudderId: 'user8<<>>topic-2', jobId: 8, userId: 'u1' }, + metadata: { + rudderId: 'user8<<>>topic-2', + jobId: 8, + }, destination: { ID: '1uzGR4rn915R6Xts9KRfWAzmgGL', Name: 'local-kafka-test', @@ -656,10 +732,19 @@ export const data = [ userId: 'user8', context: { ip: '14.5.67.21', - traits: { trait1: 'new-val' }, - library: { name: 'http' }, + traits: { + trait1: 'new-val', + }, + library: { + name: 'http', + }, + }, + integrations: { + All: true, + KAFKA: { + topic: 'topic-2', + }, }, - integrations: { All: true, KAFKA: { topic: 'topic-2' } }, messageId: '87c98fc2-561b-4631-8cd6-1d02cdd1429f', timestamp: '2020-02-02T00:23:09.544Z', receivedAt: '2021-07-08T02:45:06.851+05:30', @@ -669,7 +754,10 @@ export const data = [ }, topic: 'topic-2', }, - metadata: { rudderId: 'user8<<>>topic-2', jobId: 9, userId: 'u1' }, + metadata: { + rudderId: 'user8<<>>topic-2', + jobId: 9, + }, destination: { ID: '1uzGR4rn915R6Xts9KRfWAzmgGL', Name: 'local-kafka-test', @@ -736,10 +824,19 @@ export const data = [ userId: 'user8', context: { ip: '14.5.67.21', - traits: { trait1: 'new-val' }, - library: { name: 'http' }, + traits: { + trait1: 'new-val', + }, + library: { + name: 'http', + }, + }, + integrations: { + All: true, + KAFKA: { + topic: 'topic-3', + }, }, - integrations: { All: true, KAFKA: { topic: 'topic-3' } }, messageId: '87c98fc2-561b-4631-8cd6-1d02cdd1429f', timestamp: '2020-02-02T00:23:09.544Z', receivedAt: '2021-07-08T02:45:06.851+05:30', @@ -749,7 +846,10 @@ export const data = [ }, topic: 'topic-3', }, - metadata: { rudderId: 'user8<<>>topic-3', jobId: 10, userId: 'u1' }, + metadata: { + rudderId: 'user8<<>>topic-3', + jobId: 10, + }, destination: { ID: '1uzGR4rn915R6Xts9KRfWAzmgGL', Name: 'local-kafka-test', @@ -827,8 +927,12 @@ export const data = [ userId: 'user1', context: { ip: '14.5.67.21', - traits: { trait1: 'new-val' }, - library: { name: 'http' }, + traits: { + trait1: 'new-val', + }, + library: { + name: 'http', + }, }, messageId: '6f27a4da-cefb-4800-acf1-f467e8aab91c', timestamp: '2020-02-02T00:23:09.544Z', @@ -847,8 +951,12 @@ export const data = [ userId: 'user2', context: { ip: '14.5.67.21', - traits: { trait1: 'new-val' }, - library: { name: 'http' }, + traits: { + trait1: 'new-val', + }, + library: { + name: 'http', + }, }, messageId: 'fe182d9e-e86e-4db5-ae12-f4b399555fcc', timestamp: '2020-02-02T00:23:09.544Z', @@ -867,8 +975,12 @@ export const data = [ userId: 'user3', context: { ip: '14.5.67.21', - traits: { trait1: 'new-val' }, - library: { name: 'http' }, + traits: { + trait1: 'new-val', + }, + library: { + name: 'http', + }, }, messageId: '2803e656-77ff-47ca-9606-90663f9aed38', timestamp: '2020-02-02T00:23:09.544Z', @@ -887,8 +999,12 @@ export const data = [ userId: 'user4', context: { ip: '14.5.67.21', - traits: { trait1: 'new-val' }, - library: { name: 'http' }, + traits: { + trait1: 'new-val', + }, + library: { + name: 'http', + }, }, messageId: '87c98fc2-561b-4631-8cd6-1d02cdd1429f', timestamp: '2020-02-02T00:23:09.544Z', @@ -907,10 +1023,19 @@ export const data = [ userId: 'user5', context: { ip: '14.5.67.21', - traits: { trait1: 'new-val' }, - library: { name: 'http' }, + traits: { + trait1: 'new-val', + }, + library: { + name: 'http', + }, + }, + integrations: { + All: true, + KAFKA: { + schemaId: 'schema001', + }, }, - integrations: { All: true, KAFKA: { schemaId: 'schema001' } }, messageId: '87c98fc2-561b-4631-8cd6-1d02cdd1429f', timestamp: '2020-02-02T00:23:09.544Z', receivedAt: '2021-07-08T02:45:06.851+05:30', @@ -923,11 +1048,23 @@ export const data = [ }, ], metadata: [ - { rudderId: 'user1<<>>new-topic', jobId: 1, userId: 'u1' }, - { rudderId: 'user2<<>>new-topic', jobId: 2, userId: 'u1' }, - { rudderId: 'user3<<>>new-topic', jobId: 3, userId: 'u1' }, - { rudderId: 'user4<<>>new-topic', jobId: 4, userId: 'u1' }, - { rudderId: 'user5<<>>new-topic', jobId: 5, userId: 'u1' }, + { rudderId: 'user1<<>>new-topic', jobId: 1 }, + { + rudderId: 'user2<<>>new-topic', + jobId: 2, + }, + { + rudderId: 'user3<<>>new-topic', + jobId: 3, + }, + { + rudderId: 'user4<<>>new-topic', + jobId: 4, + }, + { + rudderId: 'user5<<>>new-topic', + jobId: 5, + }, ], destination: { ID: '1uzGR4rn915R6Xts9KRfWAzmgGL', @@ -998,10 +1135,19 @@ export const data = [ userId: 'user6', context: { ip: '14.5.67.21', - traits: { trait1: 'new-val' }, - library: { name: 'http' }, + traits: { + trait1: 'new-val', + }, + library: { + name: 'http', + }, + }, + integrations: { + All: true, + KAFKA: { + topic: 'topic-1', + }, }, - integrations: { All: true, KAFKA: { topic: 'topic-1' } }, messageId: '87c98fc2-561b-4631-8cd6-1d02cdd1429f', timestamp: '2020-02-02T00:23:09.544Z', receivedAt: '2021-07-08T02:45:06.851+05:30', @@ -1019,10 +1165,19 @@ export const data = [ userId: 'user7', context: { ip: '14.5.67.21', - traits: { trait1: 'new-val' }, - library: { name: 'http' }, + traits: { + trait1: 'new-val', + }, + library: { + name: 'http', + }, + }, + integrations: { + All: true, + KAFKA: { + topic: 'topic-1', + }, }, - integrations: { All: true, KAFKA: { topic: 'topic-1' } }, messageId: '87c98fc2-561b-4631-8cd6-1d02cdd1429f', timestamp: '2020-02-02T00:23:09.544Z', receivedAt: '2021-07-08T02:45:06.851+05:30', @@ -1034,8 +1189,14 @@ export const data = [ }, ], metadata: [ - { rudderId: 'user6<<>>topic-1', jobId: 6, userId: 'u1' }, - { rudderId: 'user7<<>>topic-1', jobId: 7, userId: 'u1' }, + { + rudderId: 'user6<<>>topic-1', + jobId: 6, + }, + { + rudderId: 'user7<<>>topic-1', + jobId: 7, + }, ], destination: { ID: '1uzGR4rn915R6Xts9KRfWAzmgGL', @@ -1106,10 +1267,19 @@ export const data = [ userId: 'user8', context: { ip: '14.5.67.21', - traits: { trait1: 'new-val' }, - library: { name: 'http' }, + traits: { + trait1: 'new-val', + }, + library: { + name: 'http', + }, + }, + integrations: { + All: true, + KAFKA: { + topic: 'topic-2', + }, }, - integrations: { All: true, KAFKA: { topic: 'topic-2' } }, messageId: '87c98fc2-561b-4631-8cd6-1d02cdd1429f', timestamp: '2020-02-02T00:23:09.544Z', receivedAt: '2021-07-08T02:45:06.851+05:30', @@ -1127,10 +1297,19 @@ export const data = [ userId: 'user8', context: { ip: '14.5.67.21', - traits: { trait1: 'new-val' }, - library: { name: 'http' }, + traits: { + trait1: 'new-val', + }, + library: { + name: 'http', + }, + }, + integrations: { + All: true, + KAFKA: { + topic: 'topic-2', + }, }, - integrations: { All: true, KAFKA: { topic: 'topic-2' } }, messageId: '87c98fc2-561b-4631-8cd6-1d02cdd1429f', timestamp: '2020-02-02T00:23:09.544Z', receivedAt: '2021-07-08T02:45:06.851+05:30', @@ -1142,8 +1321,14 @@ export const data = [ }, ], metadata: [ - { rudderId: 'user8<<>>topic-2', jobId: 8, userId: 'u1' }, - { rudderId: 'user8<<>>topic-2', jobId: 9, userId: 'u1' }, + { + rudderId: 'user8<<>>topic-2', + jobId: 8, + }, + { + rudderId: 'user8<<>>topic-2', + jobId: 9, + }, ], destination: { ID: '1uzGR4rn915R6Xts9KRfWAzmgGL', @@ -1214,10 +1399,19 @@ export const data = [ userId: 'user8', context: { ip: '14.5.67.21', - traits: { trait1: 'new-val' }, - library: { name: 'http' }, + traits: { + trait1: 'new-val', + }, + library: { + name: 'http', + }, + }, + integrations: { + All: true, + KAFKA: { + topic: 'topic-3', + }, }, - integrations: { All: true, KAFKA: { topic: 'topic-3' } }, messageId: '87c98fc2-561b-4631-8cd6-1d02cdd1429f', timestamp: '2020-02-02T00:23:09.544Z', receivedAt: '2021-07-08T02:45:06.851+05:30', @@ -1228,7 +1422,12 @@ export const data = [ topic: 'topic-3', }, ], - metadata: [{ rudderId: 'user8<<>>topic-3', jobId: 10, userId: 'u1' }], + metadata: [ + { + rudderId: 'user8<<>>topic-3', + jobId: 10, + }, + ], destination: { ID: '1uzGR4rn915R6Xts9KRfWAzmgGL', Name: 'local-kafka-test', diff --git a/test/integrations/destinations/keen/router/data.ts b/test/integrations/destinations/keen/router/data.ts index a88fc5dcce..d46d2363e2 100644 --- a/test/integrations/destinations/keen/router/data.ts +++ b/test/integrations/destinations/keen/router/data.ts @@ -19,13 +19,24 @@ export const data = [ namespace: 'com.rudderlabs.javascript', version: '1.0.0', }, - traits: { email: 'sayan@gmail.com', anonymousId: '12345' }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + traits: { + email: 'sayan@gmail.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 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, }, type: 'track', messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', @@ -40,11 +51,18 @@ export const data = [ user_actual_id: 12345, user_time_spent: 50000, }, - integrations: { All: true }, - traits: { email: 'test@gmail.com', anonymousId: 'anon-id' }, + integrations: { + All: true, + }, + traits: { + email: 'test@gmail.com', + anonymousId: 'anon-id', + }, sentAt: '2019-10-14T11:15:53.296Z', }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, destination: { Config: { projectID: 'abcde', @@ -66,14 +84,25 @@ export const data = [ namespace: 'com.rudderlabs.javascript', version: '1.0.0', }, - traits: { email: 'sayan@gmail.com', anonymousId: '12345' }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + traits: { + email: 'sayan@gmail.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 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, }, type: 'page', messageId: '5e10d13a-bf9a-44bf-b884-43a9e591ea71', @@ -88,12 +117,19 @@ export const data = [ title: 'Test Page', url: 'www.rudderlabs.com', }, - traits: { email: 'test@gmail.com', anonymousId: 'anon-id' }, - integrations: { All: true }, + traits: { + email: 'test@gmail.com', + anonymousId: 'anon-id', + }, + integrations: { + All: true, + }, name: 'ApplicationLoaded', sentAt: '2019-10-14T11:15:53.296Z', }, - metadata: { jobId: 3, userId: 'u1' }, + metadata: { + jobId: 2, + }, destination: { Config: { projectID: 'abcde', @@ -129,12 +165,16 @@ export const data = [ keen: { addons: [ { - input: { ip: 'request_ip' }, + input: { + ip: 'request_ip', + }, name: 'keen:ip_to_geo', output: 'ip_geo_info', }, { - input: { ua_string: 'user_agent' }, + input: { + ua_string: 'user_agent', + }, name: 'keen:ua_parser', output: 'parsed_user_agent', }, @@ -142,7 +182,10 @@ export const data = [ }, anonymousId: '00000000000000000000000000', user: { - traits: { anonymousId: 'anon-id', email: 'test@gmail.com' }, + traits: { + anonymousId: 'anon-id', + email: 'test@gmail.com', + }, userId: '12345', }, user_agent: @@ -153,14 +196,21 @@ export const data = [ files: {}, endpoint: 'https://api.keen.io/3.0/projects/abcde/events/test track event', userId: '12345', - headers: { 'Content-Type': 'application/json', Authorization: 'xyz' }, + headers: { + 'Content-Type': 'application/json', + Authorization: 'xyz', + }, version: '1', params: {}, type: 'REST', method: 'POST', statusCode: 200, }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { @@ -189,12 +239,16 @@ export const data = [ keen: { addons: [ { - input: { ip: 'request_ip' }, + input: { + ip: 'request_ip', + }, name: 'keen:ip_to_geo', output: 'ip_geo_info', }, { - input: { ua_string: 'user_agent' }, + input: { + ua_string: 'user_agent', + }, name: 'keen:ua_parser', output: 'parsed_user_agent', }, @@ -202,7 +256,10 @@ export const data = [ }, anonymousId: '00000000000000000000000000', user: { - traits: { anonymousId: 'anon-id', email: 'test@gmail.com' }, + traits: { + anonymousId: 'anon-id', + email: 'test@gmail.com', + }, userId: '12345', }, path: '/test', @@ -215,14 +272,21 @@ export const data = [ endpoint: 'https://api.keen.io/3.0/projects/abcde/events/Viewed ApplicationLoaded page', userId: '12345', - headers: { 'Content-Type': 'application/json', Authorization: 'xyz' }, + headers: { + 'Content-Type': 'application/json', + Authorization: 'xyz', + }, version: '1', params: {}, type: 'REST', method: 'POST', statusCode: 200, }, - metadata: [{ jobId: 3, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { diff --git a/test/integrations/destinations/kissmetrics/router/data.ts b/test/integrations/destinations/kissmetrics/router/data.ts index 827a493ae5..bba00edf96 100644 --- a/test/integrations/destinations/kissmetrics/router/data.ts +++ b/test/integrations/destinations/kissmetrics/router/data.ts @@ -37,15 +37,25 @@ export const data = [ version: '1.0.5', }, ip: '0.0.0.0', - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.5' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, locale: 'en-GB', - os: { name: '', version: '' }, - screen: { density: 2 }, + 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 }, + integrations: { + All: true, + }, messageId: 'dd266c67-9199-4a52-ba32-f46ddde67312', originalTimestamp: '2020-01-24T06:29:02.358Z', properties: { @@ -69,7 +79,6 @@ export const data = [ jobId: 1, messageId: 'dd266c67-9199-4a52-ba32-f46ddde67312', sourceId: '1WjrlZIy1d41MCceOrFbDVPnOPY', - userId: 'u1', }, }, { @@ -100,10 +109,18 @@ export const data = [ version: '1.0.5', }, ip: '0.0.0.0', - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.5' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, locale: 'en-GB', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, traits: { city: 'Disney', country: 'USA', @@ -113,7 +130,9 @@ 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.117 Safari/537.36', }, - integrations: { All: true }, + integrations: { + All: true, + }, traits: { city: 'Disney-1', country: 'India', @@ -136,7 +155,6 @@ export const data = [ jobId: 2, messageId: '2536eda4-d638-4c93-8014-8ffe3f083214', sourceId: '1WjrlZIy1d41MCceOrFbDVPnOPY', - userId: 'u1', }, }, ], @@ -169,7 +187,12 @@ export const data = [ _t: '1579847342', _d: 1, }, - body: { JSON: {}, XML: {}, JSON_ARRAY: {}, FORM: {} }, + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, files: {}, userId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', statusCode: 200, @@ -183,7 +206,6 @@ export const data = [ jobId: 1, messageId: 'dd266c67-9199-4a52-ba32-f46ddde67312', sourceId: '1WjrlZIy1d41MCceOrFbDVPnOPY', - userId: 'u1', }, ], batched: false, @@ -223,7 +245,12 @@ export const data = [ _t: '1579847342', _d: 1, }, - body: { JSON: {}, XML: {}, JSON_ARRAY: {}, FORM: {} }, + body: { + JSON: {}, + XML: {}, + JSON_ARRAY: {}, + FORM: {}, + }, files: {}, userId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', statusCode: 200, @@ -237,7 +264,6 @@ export const data = [ jobId: 2, messageId: '2536eda4-d638-4c93-8014-8ffe3f083214', sourceId: '1WjrlZIy1d41MCceOrFbDVPnOPY', - userId: 'u1', }, ], batched: false, diff --git a/test/integrations/destinations/klaviyo/network.ts b/test/integrations/destinations/klaviyo/network.ts index d76d235c6f..aa788a60da 100644 --- a/test/integrations/destinations/klaviyo/network.ts +++ b/test/integrations/destinations/klaviyo/network.ts @@ -1,73 +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', + { + httpReq: { + url: 'https://a.klaviyo.com/api/v2/list/XUepkK/subscribe', + method: 'GET', + }, + httpRes: { + status: 200 }, - }, - }, - 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/v2/list/XUepkK/members', + method: 'GET', + }, + httpRes: { + status: 200 }, - }, }, - }, - { - httpReq: { - url: 'https://a.klaviyo.com/api/profiles', - method: 'POST', - headers: { Authorization: 'Klaviyo-API-Key dummyPrivateApiKeyforfailure' }, + { + httpReq: { + url: 'https://a.klaviyo.com/api/profiles', + method: 'GET', + data: { + attributes: { + email: "test3@rudderstack.com" + } + } + }, + httpRes: { + status: 409, + data: { + } + }, }, - httpRes: {}, - }, - { - httpReq: { - url: 'https://a.klaviyo.com/api/profiles', - method: 'POST', + { + httpReq: { + url: 'https://a.klaviyo.com/api/profiles', + method: 'GET', + }, + httpRes: { + status: 201, + data: { + data: { + id: '01GW3PHVY0MTCDGS0A1612HARX', + attributes: {} + }, + } + }, }, - 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 index b262ee645d..2025957716 100644 --- a/test/integrations/destinations/klaviyo/processor/data.ts +++ b/test/integrations/destinations/klaviyo/processor/data.ts @@ -1,2393 +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, - }, - ], - }, - }, - }, -]; + { + "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 index 355293c512..0fb735d6bf 100644 --- a/test/integrations/destinations/klaviyo/router/data.ts +++ b/test/integrations/destinations/klaviyo/router/data.ts @@ -11,16 +11,24 @@ export const data = [ input: [ { destination: { - Config: { publicApiKey: 'dummyPublicApiKey', privateApiKey: 'dummyPrivateApiKey' }, + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, + }, + metadata: { + jobId: 1, }, - metadata: { jobId: 1, userId: 'u1' }, message: { type: 'identify', sentAt: '2021-01-03T17:02:53.195Z', userId: 'test', channel: 'web', context: { - os: { name: '', version: '' }, + os: { + name: '', + version: '', + }, app: { name: 'RudderLabs JavaScript SDK', build: '1.0.0', @@ -41,11 +49,18 @@ export const data = [ zip: '100-0001', Flagged: false, Residence: 'Shibuya', - properties: { consent: ['email', 'sms'] }, + properties: { + consent: ['email', 'sms'], + }, }, locale: 'en-US', - screen: { density: 2 }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.1.11' }, + 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', @@ -53,22 +68,32 @@ export const data = [ rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', - integrations: { All: true }, + integrations: { + All: true, + }, originalTimestamp: '2021-01-03T17:02:53.193Z', }, }, { destination: { - Config: { publicApiKey: 'dummyPublicApiKey', privateApiKey: 'dummyPrivateApiKey' }, + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, + }, + metadata: { + jobId: 2, }, - metadata: { jobId: 2, userId: 'u1' }, message: { type: 'identify', sentAt: '2021-01-03T17:02:53.195Z', userId: 'test', channel: 'web', context: { - os: { name: '', version: '' }, + os: { + name: '', + version: '', + }, app: { name: 'RudderLabs JavaScript SDK', build: '1.0.0', @@ -89,11 +114,20 @@ export const data = [ zip: '100-0001', Flagged: false, Residence: 'Shibuya', - properties: { listId: 'XUepkK', subscribe: true, consent: ['email', 'sms'] }, + properties: { + listId: 'XUepkK', + subscribe: true, + consent: ['email', 'sms'], + }, }, locale: 'en-US', - screen: { density: 2 }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.1.11' }, + 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', @@ -101,20 +135,29 @@ export const data = [ rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', - integrations: { All: true }, + integrations: { + All: true, + }, originalTimestamp: '2021-01-03T17:02:53.193Z', }, }, { destination: { - Config: { publicApiKey: 'dummyPublicApiKey', privateApiKey: 'dummyPrivateApiKey' }, + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, + }, + metadata: { + jobId: 3, }, - metadata: { jobId: 3, userId: 'u1' }, message: { userId: 'user123', type: 'group', groupId: 'XUepkK', - traits: { subscribe: true }, + traits: { + subscribe: true, + }, context: { traits: { email: 'test@rudderstack.com', @@ -122,21 +165,30 @@ export const data = [ consent: ['email'], }, ip: '14.5.67.21', - library: { name: 'http' }, + library: { + name: 'http', + }, }, timestamp: '2020-01-21T00:21:34.208Z', }, }, { destination: { - Config: { publicApiKey: 'dummyPublicApiKey', privateApiKey: 'dummyPrivateApiKey' }, + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, + }, + metadata: { + jobId: 4, }, - metadata: { jobId: 4, userId: 'u1' }, message: { userId: 'user123', type: 'random', groupId: 'XUepkK', - traits: { subscribe: true }, + traits: { + subscribe: true, + }, context: { traits: { email: 'test@rudderstack.com', @@ -144,21 +196,30 @@ export const data = [ consent: 'email', }, ip: '14.5.67.21', - library: { name: 'http' }, + library: { + name: 'http', + }, }, timestamp: '2020-01-21T00:21:34.208Z', }, }, { destination: { - Config: { publicApiKey: 'dummyPublicApiKey', privateApiKey: 'dummyPrivateApiKey' }, + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, + }, + metadata: { + jobId: 5, }, - metadata: { jobId: 5, userId: 'u1' }, message: { userId: 'user123', type: 'group', groupId: '', - traits: { subscribe: true }, + traits: { + subscribe: true, + }, context: { traits: { email: 'test@rudderstack.com', @@ -166,7 +227,9 @@ export const data = [ consent: 'email', }, ip: '14.5.67.21', - library: { name: 'http' }, + library: { + name: 'http', + }, }, timestamp: '2020-01-21T00:21:34.208Z', }, @@ -202,11 +265,17 @@ export const data = [ attributes: { list_id: 'XUepkK', subscriptions: [ - { email: 'test@rudderstack.com', phone_number: '+12 345 678 900' }, + { + 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'] }, + channels: { + email: ['MARKETING'], + sms: ['MARKETING'], + }, }, ], }, @@ -248,7 +317,10 @@ export const data = [ country: 'JP', zip: '100-0001', }, - properties: { Flagged: false, Residence: 'Shibuya' }, + properties: { + Flagged: false, + Residence: 'Shibuya', + }, }, id: '01GW3PHVY0MTCDGS0A1612HARX', }, @@ -261,13 +333,20 @@ export const data = [ }, ], metadata: [ - { jobId: 2, userId: 'u1' }, - { jobId: 3, userId: 'u1' }, + { + jobId: 3, + }, + { + jobId: 2, + }, ], batched: true, statusCode: 200, destination: { - Config: { publicApiKey: 'dummyPublicApiKey', privateApiKey: 'dummyPrivateApiKey' }, + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, }, }, { @@ -301,7 +380,10 @@ export const data = [ country: 'JP', zip: '100-0001', }, - properties: { Flagged: false, Residence: 'Shibuya' }, + properties: { + Flagged: false, + Residence: 'Shibuya', + }, }, id: '01GW3PHVY0MTCDGS0A1612HARX', }, @@ -312,15 +394,26 @@ export const data = [ }, files: {}, }, - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [ + { + jobId: 1, + }, + ], batched: false, statusCode: 200, destination: { - Config: { publicApiKey: 'dummyPublicApiKey', privateApiKey: 'dummyPrivateApiKey' }, + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, }, }, { - metadata: [{ jobId: 4, userId: 'u1' }], + metadata: [ + { + jobId: 4, + }, + ], batched: false, statusCode: 400, error: 'Event type random is not supported', @@ -333,11 +426,18 @@ export const data = [ module: 'destination', }, destination: { - Config: { publicApiKey: 'dummyPublicApiKey', privateApiKey: 'dummyPrivateApiKey' }, + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, }, }, { - metadata: [{ jobId: 5, userId: 'u1' }], + metadata: [ + { + jobId: 5, + }, + ], batched: false, statusCode: 400, error: 'groupId is a required field for group events', @@ -350,7 +450,10 @@ export const data = [ module: 'destination', }, destination: { - Config: { publicApiKey: 'dummyPublicApiKey', privateApiKey: 'dummyPrivateApiKey' }, + Config: { + publicApiKey: 'dummyPublicApiKey', + privateApiKey: 'dummyPrivateApiKey', + }, }, }, ], diff --git a/test/integrations/destinations/kustomer/router/data.ts b/test/integrations/destinations/kustomer/router/data.ts index 06f6243cf2..6dae5d5e76 100644 --- a/test/integrations/destinations/kustomer/router/data.ts +++ b/test/integrations/destinations/kustomer/router/data.ts @@ -75,9 +75,15 @@ export const data = [ integrations: { All: true }, originalTimestamp: '2021-01-03T17:02:53.193Z', }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, destination: { - Config: { apiKey: 'dummyApiKey', genericPage: false, genericScreen: false }, + Config: { + apiKey: 'dummyApiKey', + genericPage: false, + genericScreen: false, + }, }, }, { @@ -122,9 +128,15 @@ export const data = [ integrations: { All: true }, originalTimestamp: '2021-01-03T17:02:53.195Z', }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, destination: { - Config: { apiKey: 'dummyApiKey', genericPage: false, genericScreen: false }, + Config: { + apiKey: 'dummyApiKey', + genericPage: false, + genericScreen: false, + }, }, }, { @@ -169,7 +181,9 @@ export const data = [ integrations: { All: true }, originalTimestamp: '2021-01-03T17:02:53.195Z', }, - metadata: { jobId: 3, userId: 'u1' }, + metadata: { + jobId: 2, + }, destination: { Config: { baseEndpoint: 'https://api.prod2.kustomerapp.com', @@ -231,10 +245,29 @@ export const data = [ }, ], 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' }], + 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: {}, @@ -242,11 +275,19 @@ export const data = [ }, files: {}, }, - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [ + { + jobId: 1, + }, + ], batched: false, statusCode: 200, destination: { - Config: { apiKey: 'dummyApiKey', genericPage: false, genericScreen: false }, + Config: { + apiKey: 'dummyApiKey', + genericPage: false, + genericScreen: false, + }, }, }, { @@ -262,12 +303,17 @@ export const data = [ params: {}, body: { JSON: { - identity: { externalId: 'user@doe' }, + identity: { + externalId: 'user@doe', + }, event: { name: 'Tracking-Weekender', sessionId: '63nsa22', trackingId: 'sahetwiac', - meta: { YearServicedNum: 211, region: 'strapis' }, + meta: { + YearServicedNum: 211, + region: 'strapis', + }, }, }, XML: {}, @@ -276,11 +322,19 @@ export const data = [ }, files: {}, }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { - Config: { apiKey: 'dummyApiKey', genericPage: false, genericScreen: false }, + Config: { + apiKey: 'dummyApiKey', + genericPage: false, + genericScreen: false, + }, }, }, { @@ -296,12 +350,17 @@ export const data = [ params: {}, body: { JSON: { - identity: { externalId: 'user@doe' }, + identity: { + externalId: 'user@doe', + }, event: { name: 'Tracking-Weekender', sessionId: '63nsa22', trackingId: 'sahetwiac', - meta: { YearServicedNum: 211, region: 'strapis' }, + meta: { + YearServicedNum: 211, + region: 'strapis', + }, }, }, XML: {}, @@ -310,7 +369,11 @@ export const data = [ }, files: {}, }, - metadata: [{ jobId: 3, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { diff --git a/test/integrations/destinations/lambda/router/data.ts b/test/integrations/destinations/lambda/router/data.ts index dd7d6493bc..37b13e4d2a 100644 --- a/test/integrations/destinations/lambda/router/data.ts +++ b/test/integrations/destinations/lambda/router/data.ts @@ -8115,7 +8115,9 @@ export const data = [ ], trait1: 'new-val', }, - library: { name: 'http' }, + library: { + name: 'http', + }, }, rudderId: 'daf823fb-e8d3-413a-8313-d34cd756f968', messageId: 'c864b4cd-8f07-4922-b3d0-82ef04c987d3', @@ -8126,7 +8128,7 @@ export const data = [ originalTimestamp: '2022-08-18T08:43:15.539+05:30', }, metadata: { - userId: 'u1', + userId: 'anon-id-new<<>>identified user id', jobId: 31, sourceId: '2DTlLPQxignYp4ag9sISgGN2uY7', destinationId: '2DTozIMGtBwTGNJtuvdPByFSL2Z', @@ -16530,7 +16532,9 @@ export const data = [ ], trait1: 'new-val', }, - library: { name: 'http' }, + library: { + name: 'http', + }, }, rudderId: 'daf823fb-e8d3-413a-8313-d34cd756f968', messageId: 'c864b4cd-8f07-4922-b3d0-82ef04c987d3', @@ -16651,7 +16655,12 @@ export const data = [ event: 'Product Purchased new', sentAt: '2022-08-18T08:43:15.539+05:30', userId: 'identified user id', - context: { ip: '14.5.67.21', library: { name: 'http' } }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, rudderId: 'daf823fb-e8d3-413a-8313-d34cd756f968', messageId: '9f8fb785-c720-4381-a009-bf22a13f4ced', timestamp: '2020-02-02T00:23:09.544Z', @@ -20589,7 +20598,7 @@ export const data = [ originalTimestamp: '2022-08-18T08:43:15.539+05:30', }, metadata: { - userId: 'u1', + userId: 'anon-id-new<<>>identified user id', jobId: 32, sourceId: '2DTlLPQxignYp4ag9sISgGN2uY7', destinationId: '2DTozIMGtBwTGNJtuvdPByFSL2Z', @@ -20613,7 +20622,12 @@ export const data = [ event: 'Product Purchased new', sentAt: '2022-08-18T08:43:15.539+05:30', userId: 'identified user id', - context: { ip: '14.5.67.21', library: { name: 'http' } }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, rudderId: 'daf823fb-e8d3-413a-8313-d34cd756f968', messageId: '9f8fb785-c720-4381-a009-bf22a13f4ced', timestamp: '2020-02-02T00:23:09.544Z', @@ -24849,18 +24863,26 @@ export const data = [ type: 'page', sentAt: '2022-08-18T08:43:15.539+05:30', userId: 'identified user id', - context: { ip: '14.5.67.21', library: { name: 'http' } }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, rudderId: 'daf823fb-e8d3-413a-8313-d34cd756f968', messageId: '5f58d1f7-cbd6-4bff-8571-9933be7210b1', timestamp: '2020-02-02T00:23:09.544Z', - properties: { path: '/', title: 'Home' }, + properties: { + path: '/', + title: 'Home', + }, receivedAt: '2022-08-18T08:43:13.521+05:30', request_ip: '[::1]', anonymousId: 'anon-id-new', originalTimestamp: '2022-08-18T08:43:15.539+05:30', }, metadata: { - userId: 'u1', + userId: 'anon-id-new<<>>identified user id', jobId: 33, sourceId: '2DTlLPQxignYp4ag9sISgGN2uY7', destinationId: '2DTozIMGtBwTGNJtuvdPByFSL2Z', @@ -24884,11 +24906,19 @@ export const data = [ type: 'page', sentAt: '2022-08-18T08:43:15.539+05:30', userId: 'identified user id', - context: { ip: '14.5.67.21', library: { name: 'http' } }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, rudderId: 'daf823fb-e8d3-413a-8313-d34cd756f968', messageId: '5f58d1f7-cbd6-4bff-8571-9933be7210b1', timestamp: '2020-02-02T00:23:09.544Z', - properties: { path: '/', title: 'Home' }, + properties: { + path: '/', + title: 'Home', + }, receivedAt: '2022-08-18T08:43:13.521+05:30', request_ip: '[::1]', anonymousId: 'anon-id-new', @@ -25005,18 +25035,25 @@ export const data = [ type: 'screen', sentAt: '2022-08-18T08:43:15.539+05:30', userId: 'identified user id', - context: { ip: '14.5.67.21', library: { name: 'http' } }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, rudderId: 'daf823fb-e8d3-413a-8313-d34cd756f968', messageId: '1b8ee4c3-ffad-4457-b453-31b32da1dfea', timestamp: '2020-02-02T00:23:09.544Z', - properties: { prop1: '5' }, + properties: { + prop1: '5', + }, receivedAt: '2022-08-18T08:43:13.521+05:30', request_ip: '[::1]', anonymousId: 'anon-id-new', originalTimestamp: '2022-08-18T08:43:15.539+05:30', }, metadata: { - userId: 'u1', + userId: 'anon-id-new<<>>identified user id', jobId: 34, sourceId: '2DTlLPQxignYp4ag9sISgGN2uY7', destinationId: '2DTozIMGtBwTGNJtuvdPByFSL2Z', @@ -25040,11 +25077,18 @@ export const data = [ type: 'screen', sentAt: '2022-08-18T08:43:15.539+05:30', userId: 'identified user id', - context: { ip: '14.5.67.21', library: { name: 'http' } }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, rudderId: 'daf823fb-e8d3-413a-8313-d34cd756f968', messageId: '1b8ee4c3-ffad-4457-b453-31b32da1dfea', timestamp: '2020-02-02T00:23:09.544Z', - properties: { prop1: '5' }, + properties: { + prop1: '5', + }, receivedAt: '2022-08-18T08:43:13.521+05:30', request_ip: '[::1]', anonymousId: 'anon-id-new', @@ -25159,12 +25203,20 @@ export const data = [ message: { type: 'group', sentAt: '2022-08-18T08:43:15.539+05:30', - traits: { name: 'Company', industry: 'Industry', employees: 123 }, + traits: { + name: 'Company', + industry: 'Industry', + employees: 123, + }, userId: 'user123', context: { ip: '14.5.67.21', - traits: { trait1: 'new-val' }, - library: { name: 'http' }, + traits: { + trait1: 'new-val', + }, + library: { + name: 'http', + }, }, groupId: 'group1', rudderId: 'bda76e3e-87eb-4153-9d1e-e9c2ed48b7a5', @@ -25175,7 +25227,7 @@ export const data = [ originalTimestamp: '2022-08-18T08:43:15.539+05:30', }, metadata: { - userId: 'u1', + userId: 'anon-id-new<<>>identified user id', jobId: 35, sourceId: '2DTlLPQxignYp4ag9sISgGN2uY7', destinationId: '2DTozIMGtBwTGNJtuvdPByFSL2Z', @@ -25197,12 +25249,20 @@ export const data = [ EventPayload: { type: 'group', sentAt: '2022-08-18T08:43:15.539+05:30', - traits: { name: 'Company', industry: 'Industry', employees: 123 }, + traits: { + name: 'Company', + industry: 'Industry', + employees: 123, + }, userId: 'user123', context: { ip: '14.5.67.21', - traits: { trait1: 'new-val' }, - library: { name: 'http' }, + traits: { + trait1: 'new-val', + }, + library: { + name: 'http', + }, }, groupId: 'group1', rudderId: 'bda76e3e-87eb-4153-9d1e-e9c2ed48b7a5', @@ -25324,8 +25384,12 @@ export const data = [ userId: 'user123', context: { ip: '14.5.67.21', - traits: { trait1: 'new-val' }, - library: { name: 'http' }, + traits: { + trait1: 'new-val', + }, + library: { + name: 'http', + }, }, rudderId: 'bda76e3e-87eb-4153-9d1e-e9c2ed48b7a5', messageId: '3ff8d400-b6d4-43a4-a0ff-1bc7ae8b5f7d', @@ -25336,7 +25400,7 @@ export const data = [ originalTimestamp: '2022-08-18T08:43:15.539+05:30', }, metadata: { - userId: 'u1', + userId: 'anon-id-new<<>>identified user id', jobId: 36, sourceId: '2DTlLPQxignYp4ag9sISgGN2uY7', destinationId: '2DTozIMGtBwTGNJtuvdPByFSL2Z', @@ -25361,8 +25425,12 @@ export const data = [ userId: 'user123', context: { ip: '14.5.67.21', - traits: { trait1: 'new-val' }, - library: { name: 'http' }, + traits: { + trait1: 'new-val', + }, + library: { + name: 'http', + }, }, rudderId: 'bda76e3e-87eb-4153-9d1e-e9c2ed48b7a5', messageId: '3ff8d400-b6d4-43a4-a0ff-1bc7ae8b5f7d', @@ -25492,11 +25560,15 @@ export const data = [ batchedRequest: { payload: '[{"type":"track","event":"Product Purchased new","sentAt":"2022-08-18T08:43:15.539+05:30","userId":"identified user id","context":{"ip":"14.5.67.21","library":{"name":"http"}},"rudderId":"daf823fb-e8d3-413a-8313-d34cd756f968","messageId":"9f8fb785-c720-4381-a009-bf22a13f4ced","timestamp":"2020-02-02T00:23:09.544Z","properties":{"data":[{"id":6104546,"url":"https://api.github.com/repos/mralexgray/-REPONAME","fork":false,"name":"-REPONAME","size":48,"forks":0,"owner":{"id":262517,"url":"https://api.github.com/users/mralexgray","type":"User","login":"mralexgray","node_id":"MDQ6VXNlcjI2MjUxNw==","html_url":"https://github.com/mralexgray","gists_url":"https://api.github.com/users/mralexgray/gists{/gist_id}","repos_url":"https://api.github.com/users/mralexgray/repos","avatar_url":"https://avatars.githubusercontent.com/u/262517?v=4","events_url":"https://api.github.com/users/mralexgray/events{/privacy}","site_admin":false,"gravatar_id":"","starred_url":"https://api.github.com/users/mralexgray/starred{/owner}{/repo}","followers_url":"https://api.github.com/users/mralexgray/followers","following_url":"https://api.github.com/users/mralexgray/following{/other_user}","organizations_url":"https://api.github.com/users/mralexgray/orgs","subscriptions_url":"https://api.github.com/users/mralexgray/subscriptions","received_events_url":"https://api.github.com/users/mralexgray/received_events"},"topics":[],"git_url":"git://github.com/mralexgray/-REPONAME.git","license":null,"node_id":"MDEwOlJlcG9zaXRvcnk2MTA0NTQ2","private":false,"ssh_url":"git@github.com:mralexgray/-REPONAME.git","svn_url":"https://github.com/mralexgray/-REPONAME","archived":false,"disabled":false,"has_wiki":true,"homepage":null,"html_url":"https://github.com/mralexgray/-REPONAME","keys_url":"https://api.github.com/repos/mralexgray/-REPONAME/keys{/key_id}","language":null,"tags_url":"https://api.github.com/repos/mralexgray/-REPONAME/tags","watchers":0,"blobs_url":"https://api.github.com/repos/mralexgray/-REPONAME/git/blobs{/sha}","clone_url":"https://github.com/mralexgray/-REPONAME.git","forks_url":"https://api.github.com/repos/mralexgray/-REPONAME/forks","full_name":"mralexgray/-REPONAME","has_pages":false,"hooks_url":"https://api.github.com/repos/mralexgray/-REPONAME/hooks","pulls_url":"https://api.github.com/repos/mralexgray/-REPONAME/pulls{/number}","pushed_at":"2012-10-06T16:37:39Z","teams_url":"https://api.github.com/repos/mralexgray/-REPONAME/teams","trees_url":"https://api.github.com/repos/mralexgray/-REPONAME/git/trees{/sha}","created_at":"2012-10-06T16:37:39Z","events_url":"https://api.github.com/repos/mralexgray/-REPONAME/events","has_issues":true,"issues_url":"https://api.github.com/repos/mralexgray/-REPONAME/issues{/number}","labels_url":"https://api.github.com/repos/mralexgray/-REPONAME/labels{/name}","merges_url":"https://api.github.com/repos/mralexgray/-REPONAME/merges","mirror_url":null,"updated_at":"2013-01-12T13:39:30Z","visibility":"public","archive_url":"https://api.github.com/repos/mralexgray/-REPONAME/{archive_format}{/ref}","commits_url":"https://api.github.com/repos/mralexgray/-REPONAME/commits{/sha}","compare_url":"https://api.github.com/repos/mralexgray/-REPONAME/compare/{base}...{head}","description":null,"forks_count":0,"is_template":false,"open_issues":0,"branches_url":"https://api.github.com/repos/mralexgray/-REPONAME/branches{/branch}","comments_url":"https://api.github.com/repos/mralexgray/-REPONAME/comments{/number}","contents_url":"https://api.github.com/repos/mralexgray/-REPONAME/contents/{+path}","git_refs_url":"https://api.github.com/repos/mralexgray/-REPONAME/git/refs{/sha}","git_tags_url":"https://api.github.com/repos/mralexgray/-REPONAME/git/tags{/sha}","has_projects":true,"releases_url":"https://api.github.com/repos/mralexgray/-REPONAME/releases{/id}","statuses_url":"https://api.github.com/repos/mralexgray/-REPONAME/statuses/{sha}","allow_forking":true,"assignees_url":"https://api.github.com/repos/mralexgray/-REPONAME/assignees{/user}","downloads_url":"https://api.github.com/repos/mralexgray/-REPONAME/downloads","has_downloads":true,"languages_url":"https://api.github.com/repos/mralexgray/-REPONAME/languages","default_branch":"master","milestones_url":"https://api.github.com/repos/mralexgray/-REPONAME/milestones{/number}","stargazers_url":"https://api.github.com/repos/mralexgray/-REPONAME/stargazers","watchers_count":0,"deployments_url":"https://api.github.com/repos/mralexgray/-REPONAME/deployments","git_commits_url":"https://api.github.com/repos/mralexgray/-REPONAME/git/commits{/sha}","subscribers_url":"https://api.github.com/repos/mralexgray/-REPONAME/subscribers","contributors_url":"https://api.github.com/repos/mralexgray/-REPONAME/contributors","issue_events_url":"https://api.github.com/repos/mralexgray/-REPONAME/issues/events{/number}","stargazers_count":0,"subscription_url":"https://api.github.com/repos/mralexgray/-REPONAME/subscription","collaborators_url":"https://api.github.com/repos/mralexgray/-REPONAME/collaborators{/collaborator}","issue_comment_url":"https://api.github.com/repos/mralexgray/-REPONAME/issues/comments{/number}","notifications_url":"https://api.github.com/repos/mralexgray/-REPONAME/notifications{?since,all,participating}","open_issues_count":0,"web_commit_signoff_required":false},{"id":104510411,"url":"https://api.github.com/repos/mralexgray/...","fork":true,"name":"...","size":113,"forks":0,"owner":{"id":262517,"url":"https://api.github.com/users/mralexgray","type":"User","login":"mralexgray","node_id":"MDQ6VXNlcjI2MjUxNw==","html_url":"https://github.com/mralexgray","gists_url":"https://api.github.com/users/mralexgray/gists{/gist_id}","repos_url":"https://api.github.com/users/mralexgray/repos","avatar_url":"https://avatars.githubusercontent.com/u/262517?v=4","events_url":"https://api.github.com/users/mralexgray/events{/privacy}","site_admin":false,"gravatar_id":"","starred_url":"https://api.github.com/users/mralexgray/starred{/owner}{/repo}","followers_url":"https://api.github.com/users/mralexgray/followers","following_url":"https://api.github.com/users/mralexgray/following{/other_user}","organizations_url":"https://api.github.com/users/mralexgray/orgs","subscriptions_url":"https://api.github.com/users/mralexgray/subscriptions","received_events_url":"https://api.github.com/users/mralexgray/received_events"},"topics":[],"git_url":"git://github.com/mralexgray/....git","license":{"key":"mit","url":"https://api.github.com/licenses/mit","name":"MIT License","node_id":"MDc6TGljZW5zZTEz","spdx_id":"MIT"},"node_id":"MDEwOlJlcG9zaXRvcnkxMDQ1MTA0MTE=","private":false,"ssh_url":"git@github.com:mralexgray/....git","svn_url":"https://github.com/mralexgray/...","archived":false,"disabled":false,"has_wiki":false,"homepage":"https://driesvints.com/blog/getting-started-with-dotfiles","html_url":"https://github.com/mralexgray/...","keys_url":"https://api.github.com/repos/mralexgray/.../keys{/key_id}","language":"Shell","tags_url":"https://api.github.com/repos/mralexgray/.../tags","watchers":0,"blobs_url":"https://api.github.com/repos/mralexgray/.../git/blobs{/sha}","clone_url":"https://github.com/mralexgray/....git","forks_url":"https://api.github.com/repos/mralexgray/.../forks","full_name":"mralexgray/...","has_pages":false,"hooks_url":"https://api.github.com/repos/mralexgray/.../hooks","pulls_url":"https://api.github.com/repos/mralexgray/.../pulls{/number}","pushed_at":"2017-09-15T08:27:32Z","teams_url":"https://api.github.com/repos/mralexgray/.../teams","trees_url":"https://api.github.com/repos/mralexgray/.../git/trees{/sha}","created_at":"2017-09-22T19:19:42Z","events_url":"https://api.github.com/repos/mralexgray/.../events","has_issues":false,"issues_url":"https://api.github.com/repos/mralexgray/.../issues{/number}","labels_url":"https://api.github.com/repos/mralexgray/.../labels{/name}","merges_url":"https://api.github.com/repos/mralexgray/.../merges","mirror_url":null,"updated_at":"2017-09-22T19:20:22Z","visibility":"public","archive_url":"https://api.github.com/repos/mralexgray/.../{archive_format}{/ref}","commits_url":"https://api.github.com/repos/mralexgray/.../commits{/sha}","compare_url":"https://api.github.com/repos/mralexgray/.../compare/{base}...{head}","description":":computer: Public repo for my personal dotfiles.","forks_count":0,"is_template":false,"open_issues":0,"branches_url":"https://api.github.com/repos/mralexgray/.../branches{/branch}","comments_url":"https://api.github.com/repos/mralexgray/.../comments{/number}","contents_url":"https://api.github.com/repos/mralexgray/.../contents/{+path}","git_refs_url":"https://api.github.com/repos/mralexgray/.../git/refs{/sha}","git_tags_url":"https://api.github.com/repos/mralexgray/.../git/tags{/sha}","has_projects":true,"releases_url":"https://api.github.com/repos/mralexgray/.../releases{/id}","statuses_url":"https://api.github.com/repos/mralexgray/.../statuses/{sha}","allow_forking":true,"assignees_url":"https://api.github.com/repos/mralexgray/.../assignees{/user}","downloads_url":"https://api.github.com/repos/mralexgray/.../downloads","has_downloads":true,"languages_url":"https://api.github.com/repos/mralexgray/.../languages","default_branch":"master","milestones_url":"https://api.github.com/repos/mralexgray/.../milestones{/number}","stargazers_url":"https://api.github.com/repos/mralexgray/.../stargazers","watchers_count":0,"deployments_url":"https://api.github.com/repos/mralexgray/.../deployments","git_commits_url":"https://api.github.com/repos/mralexgray/.../git/commits{/sha}","subscribers_url":"https://api.github.com/repos/mralexgray/.../subscribers","contributors_url":"https://api.github.com/repos/mralexgray/.../contributors","issue_events_url":"https://api.github.com/repos/mralexgray/.../issues/events{/number}","stargazers_count":0,"subscription_url":"https://api.github.com/repos/mralexgray/.../subscription","collaborators_url":"https://api.github.com/repos/mralexgray/.../collaborators{/collaborator}","issue_comment_url":"https://api.github.com/repos/mralexgray/.../issues/comments{/number}","notifications_url":"https://api.github.com/repos/mralexgray/.../notifications{?since,all,participating}","open_issues_count":0,"web_commit_signoff_required":false},{"id":58656723,"url":"https://api.github.com/repos/mralexgray/2200087-Serial-Protocol","fork":true,"name":"2200087-Serial-Protocol","size":41,"forks":1,"owner":{"id":262517,"url":"https://api.github.com/users/mralexgray","type":"User","login":"mralexgray","node_id":"MDQ6VXNlcjI2MjUxNw==","html_url":"https://github.com/mralexgray","gists_url":"https://api.github.com/users/mralexgray/gists{/gist_id}","repos_url":"https://api.github.com/users/mralexgray/repos","avatar_url":"https://avatars.githubusercontent.com/u/262517?v=4","events_url":"https://api.github.com/users/mralexgray/events{/privacy}","site_admin":false,"gravatar_id":"","starred_url":"https://api.github.com/users/mralexgray/starred{/owner}{/repo}","followers_url":"https://api.github.com/users/mralexgray/followers","following_url":"https://api.github.com/users/mralexgray/following{/other_user}","organizations_url":"https://api.github.com/users/mralexgray/orgs","subscriptions_url":"https://api.github.com/users/mralexgray/subscriptions","received_events_url":"https://api.github.com/users/mralexgray/received_events"},"topics":[],"git_url":"git://github.com/mralexgray/2200087-Serial-Protocol.git","license":{"key":"gpl-2.0","url":"https://api.github.com/licenses/gpl-2.0","name":"GNU General Public License v2.0","node_id":"MDc6TGljZW5zZTg=","spdx_id":"GPL-2.0"},"node_id":"MDEwOlJlcG9zaXRvcnk1ODY1NjcyMw==","private":false,"ssh_url":"git@github.com:mralexgray/2200087-Serial-Protocol.git","svn_url":"https://github.com/mralexgray/2200087-Serial-Protocol","archived":false,"disabled":false,"has_wiki":true,"homepage":"http://daviddworken.com","html_url":"https://github.com/mralexgray/2200087-Serial-Protocol","keys_url":"https://api.github.com/repos/mralexgray/2200087-Serial-Protocol/keys{/key_id}","language":"Python","tags_url":"https://api.github.com/repos/mralexgray/2200087-Serial-Protocol/tags","watchers":0,"blobs_url":"https://api.github.com/repos/mralexgray/2200087-Serial-Protocol/git/blobs{/sha}","clone_url":"https://github.com/mralexgray/2200087-Serial-Protocol.git","forks_url":"https://api.github.com/repos/mralexgray/2200087-Serial-Protocol/forks","full_name":"mralexgray/2200087-Serial-Protocol","has_pages":false,"hooks_url":"https://api.github.com/repos/mralexgray/2200087-Serial-Protocol/hooks","pulls_url":"https://api.github.com/repos/mralexgray/2200087-Serial-Protocol/pulls{/number}","pushed_at":"2016-05-12T16:07:24Z","teams_url":"https://api.github.com/repos/mralexgray/2200087-Serial-Protocol/teams","trees_url":"https://api.github.com/repos/mralexgray/2200087-Serial-Protocol/git/trees{/sha}","created_at":"2016-05-12T16:05:28Z","events_url":"https://api.github.com/repos/mralexgray/2200087-Serial-Protocol/events","has_issues":false,"issues_url":"https://api.github.com/repos/mralexgray/2200087-Serial-Protocol/issues{/number}","labels_url":"https://api.github.com/repos/mralexgray/2200087-Serial-Protocol/labels{/name}","merges_url":"https://api.github.com/repos/mralexgray/2200087-Serial-Protocol/merges","mirror_url":null,"updated_at":"2016-05-12T16:05:30Z","visibility":"public","archive_url":"https://api.github.com/repos/mralexgray/2200087-Serial-Protocol/{archive_format}{/ref}","commits_url":"https://api.github.com/repos/mralexgray/2200087-Serial-Protocol/commits{/sha}","compare_url":"https://api.github.com/repos/mralexgray/2200087-Serial-Protocol/compare/{base}...{head}","description":"A reverse engineered protocol description and accompanying code for Radioshack\'s 2200087 multimeter","forks_count":1,"is_template":false,"open_issues":0,"branches_url":"https://api.github.com/repos/mralexgray/2200087-Serial-Protocol/branches{/branch}","comments_url":"https://api.github.com/repos/mralexgray/2200087-Serial-Protocol/comments{/number}","contents_url":"https://api.github.com/repos/mralexgray/2200087-Serial-Protocol/contents/{+path}","git_refs_url":"https://api.github.com/repos/mralexgray/2200087-Serial-Protocol/git/refs{/sha}","git_tags_url":"https://api.github.com/repos/mralexgray/2200087-Serial-Protocol/git/tags{/sha}","has_projects":true,"releases_url":"https://api.github.com/repos/mralexgray/2200087-Serial-Protocol/releases{/id}","statuses_url":"https://api.github.com/repos/mralexgray/2200087-Serial-Protocol/statuses/{sha}","allow_forking":true,"assignees_url":"https://api.github.com/repos/mralexgray/2200087-Serial-Protocol/assignees{/user}","downloads_url":"https://api.github.com/repos/mralexgray/2200087-Serial-Protocol/downloads","has_downloads":true,"languages_url":"https://api.github.com/repos/mralexgray/2200087-Serial-Protocol/languages","default_branch":"master","milestones_url":"https://api.github.com/repos/mralexgray/2200087-Serial-Protocol/milestones{/number}","stargazers_url":"https://api.github.com/repos/mralexgray/2200087-Serial-Protocol/stargazers","watchers_count":0,"deployments_url":"https://api.github.com/repos/mralexgray/2200087-Serial-Protocol/deployments","git_commits_url":"https://api.github.com/repos/mralexgray/2200087-Serial-Protocol/git/commits{/sha}","subscribers_url":"https://api.github.com/repos/mralexgray/2200087-Serial-Protocol/subscribers","contributors_url":"https://api.github.com/repos/mralexgray/2200087-Serial-Protocol/contributors","issue_events_url":"https://api.github.com/repos/mralexgray/2200087-Serial-Protocol/issues/events{/number}","stargazers_count":0,"subscription_url":"https://api.github.com/repos/mralexgray/2200087-Serial-Protocol/subscription","collaborators_url":"https://api.github.com/repos/mralexgray/2200087-Serial-Protocol/collaborators{/collaborator}","issue_comment_url":"https://api.github.com/repos/mralexgray/2200087-Serial-Protocol/issues/comments{/number}","notifications_url":"https://api.github.com/repos/mralexgray/2200087-Serial-Protocol/notifications{?since,all,participating}","open_issues_count":0,"web_commit_signoff_required":false},{"id":13121042,"url":"https://api.github.com/repos/mralexgray/ace","fork":true,"name":"ace","size":21080,"forks":1,"owner":{"id":262517,"url":"https://api.github.com/users/mralexgray","type":"User","login":"mralexgray","node_id":"MDQ6VXNlcjI2MjUxNw==","html_url":"https://github.com/mralexgray","gists_url":"https://api.github.com/users/mralexgray/gists{/gist_id}","repos_url":"https://api.github.com/users/mralexgray/repos","avatar_url":"https://avatars.githubusercontent.com/u/262517?v=4","events_url":"https://api.github.com/users/mralexgray/events{/privacy}","site_admin":false,"gravatar_id":"","starred_url":"https://api.github.com/users/mralexgray/starred{/owner}{/repo}","followers_url":"https://api.github.com/users/mralexgray/followers","following_url":"https://api.github.com/users/mralexgray/following{/other_user}","organizations_url":"https://api.github.com/users/mralexgray/orgs","subscriptions_url":"https://api.github.com/users/mralexgray/subscriptions","received_events_url":"https://api.github.com/users/mralexgray/received_events"},"topics":[],"git_url":"git://github.com/mralexgray/ace.git","license":{"key":"other","url":null,"name":"Other","node_id":"MDc6TGljZW5zZTA=","spdx_id":"NOASSERTION"},"node_id":"MDEwOlJlcG9zaXRvcnkxMzEyMTA0Mg==","private":false,"ssh_url":"git@github.com:mralexgray/ace.git","svn_url":"https://github.com/mralexgray/ace","archived":false,"disabled":false,"has_wiki":true,"homepage":"http://ace.c9.io","html_url":"https://github.com/mralexgray/ace","keys_url":"https://api.github.com/repos/mralexgray/ace/keys{/key_id}","language":"JavaScript","tags_url":"https://api.github.com/repos/mralexgray/ace/tags","watchers":0,"blobs_url":"https://api.github.com/repos/mralexgray/ace/git/blobs{/sha}","clone_url":"https://github.com/mralexgray/ace.git","forks_url":"https://api.github.com/repos/mralexgray/ace/forks","full_name":"mralexgray/ace","has_pages":false,"hooks_url":"https://api.github.com/repos/mralexgray/ace/hooks","pulls_url":"https://api.github.com/repos/mralexgray/ace/pulls{/number}","pushed_at":"2013-10-26T12:34:48Z","teams_url":"https://api.github.com/repos/mralexgray/ace/teams","trees_url":"https://api.github.com/repos/mralexgray/ace/git/trees{/sha}","created_at":"2013-09-26T11:58:10Z","events_url":"https://api.github.com/repos/mralexgray/ace/events","has_issues":false,"issues_url":"https://api.github.com/repos/mralexgray/ace/issues{/number}","labels_url":"https://api.github.com/repos/mralexgray/ace/labels{/name}","merges_url":"https://api.github.com/repos/mralexgray/ace/merges","mirror_url":null,"updated_at":"2013-10-26T12:34:49Z","visibility":"public","archive_url":"https://api.github.com/repos/mralexgray/ace/{archive_format}{/ref}","commits_url":"https://api.github.com/repos/mralexgray/ace/commits{/sha}","compare_url":"https://api.github.com/repos/mralexgray/ace/compare/{base}...{head}","description":"Ace (Ajax.org Cloud9 Editor)","forks_count":1,"is_template":false,"open_issues":0,"branches_url":"https://api.github.com/repos/mralexgray/ace/branches{/branch}","comments_url":"https://api.github.com/repos/mralexgray/ace/comments{/number}","contents_url":"https://api.github.com/repos/mralexgray/ace/contents/{+path}","git_refs_url":"https://api.github.com/repos/mralexgray/ace/git/refs{/sha}","git_tags_url":"https://api.github.com/repos/mralexgray/ace/git/tags{/sha}","has_projects":true,"releases_url":"https://api.github.com/repos/mralexgray/ace/releases{/id}","statuses_url":"https://api.github.com/repos/mralexgray/ace/statuses/{sha}","allow_forking":true,"assignees_url":"https://api.github.com/repos/mralexgray/ace/assignees{/user}","downloads_url":"https://api.github.com/repos/mralexgray/ace/downloads","has_downloads":true,"languages_url":"https://api.github.com/repos/mralexgray/ace/languages","default_branch":"master","milestones_url":"https://api.github.com/repos/mralexgray/ace/milestones{/number}","stargazers_url":"https://api.github.com/repos/mralexgray/ace/stargazers","watchers_count":0,"deployments_url":"https://api.github.com/repos/mralexgray/ace/deployments","git_commits_url":"https://api.github.com/repos/mralexgray/ace/git/commits{/sha}","subscribers_url":"https://api.github.com/repos/mralexgray/ace/subscribers","contributors_url":"https://api.github.com/repos/mralexgray/ace/contributors","issue_events_url":"https://api.github.com/repos/mralexgray/ace/issues/events{/number}","stargazers_count":0,"subscription_url":"https://api.github.com/repos/mralexgray/ace/subscription","collaborators_url":"https://api.github.com/repos/mralexgray/ace/collaborators{/collaborator}","issue_comment_url":"https://api.github.com/repos/mralexgray/ace/issues/comments{/number}","notifications_url":"https://api.github.com/repos/mralexgray/ace/notifications{?since,all,participating}","open_issues_count":0,"web_commit_signoff_required":false},{"id":10791045,"url":"https://api.github.com/repos/mralexgray/ACEView","fork":true,"name":"ACEView","size":1733,"forks":1,"owner":{"id":262517,"url":"https://api.github.com/users/mralexgray","type":"User","login":"mralexgray","node_id":"MDQ6VXNlcjI2MjUxNw==","html_url":"https://github.com/mralexgray","gists_url":"https://api.github.com/users/mralexgray/gists{/gist_id}","repos_url":"https://api.github.com/users/mralexgray/repos","avatar_url":"https://avatars.githubusercontent.com/u/262517?v=4","events_url":"https://api.github.com/users/mralexgray/events{/privacy}","site_admin":false,"gravatar_id":"","starred_url":"https://api.github.com/users/mralexgray/starred{/owner}{/repo}","followers_url":"https://api.github.com/users/mralexgray/followers","following_url":"https://api.github.com/users/mralexgray/following{/other_user}","organizations_url":"https://api.github.com/users/mralexgray/orgs","subscriptions_url":"https://api.github.com/users/mralexgray/subscriptions","received_events_url":"https://api.github.com/users/mralexgray/received_events"},"topics":[],"git_url":"git://github.com/mralexgray/ACEView.git","license":{"key":"other","url":null,"name":"Other","node_id":"MDc6TGljZW5zZTA=","spdx_id":"NOASSERTION"},"node_id":"MDEwOlJlcG9zaXRvcnkxMDc5MTA0NQ==","private":false,"ssh_url":"git@github.com:mralexgray/ACEView.git","svn_url":"https://github.com/mralexgray/ACEView","archived":false,"disabled":false,"has_wiki":true,"homepage":null,"html_url":"https://github.com/mralexgray/ACEView","keys_url":"https://api.github.com/repos/mralexgray/ACEView/keys{/key_id}","language":"Objective-C","tags_url":"https://api.github.com/repos/mralexgray/ACEView/tags","watchers":0,"blobs_url":"https://api.github.com/repos/mralexgray/ACEView/git/blobs{/sha}","clone_url":"https://github.com/mralexgray/ACEView.git","forks_url":"https://api.github.com/repos/mralexgray/ACEView/forks","full_name":"mralexgray/ACEView","has_pages":false,"hooks_url":"https://api.github.com/repos/mralexgray/ACEView/hooks","pulls_url":"https://api.github.com/repos/mralexgray/ACEView/pulls{/number}","pushed_at":"2014-05-09T01:36:23Z","teams_url":"https://api.github.com/repos/mralexgray/ACEView/teams","trees_url":"https://api.github.com/repos/mralexgray/ACEView/git/trees{/sha}","created_at":"2013-06-19T12:15:04Z","events_url":"https://api.github.com/repos/mralexgray/ACEView/events","has_issues":false,"issues_url":"https://api.github.com/repos/mralexgray/ACEView/issues{/number}","labels_url":"https://api.github.com/repos/mralexgray/ACEView/labels{/name}","merges_url":"https://api.github.com/repos/mralexgray/ACEView/merges","mirror_url":null,"updated_at":"2015-11-24T01:14:10Z","visibility":"public","archive_url":"https://api.github.com/repos/mralexgray/ACEView/{archive_format}{/ref}","commits_url":"https://api.github.com/repos/mralexgray/ACEView/commits{/sha}","compare_url":"https://api.github.com/repos/mralexgray/ACEView/compare/{base}...{head}","description":"Use the wonderful ACE editor in your Cocoa applications","forks_count":1,"is_template":false,"open_issues":0,"branches_url":"https://api.github.com/repos/mralexgray/ACEView/branches{/branch}","comments_url":"https://api.github.com/repos/mralexgray/ACEView/comments{/number}","contents_url":"https://api.github.com/repos/mralexgray/ACEView/contents/{+path}","git_refs_url":"https://api.github.com/repos/mralexgray/ACEView/git/refs{/sha}","git_tags_url":"https://api.github.com/repos/mralexgray/ACEView/git/tags{/sha}","has_projects":true,"releases_url":"https://api.github.com/repos/mralexgray/ACEView/releases{/id}","statuses_url":"https://api.github.com/repos/mralexgray/ACEView/statuses/{sha}","allow_forking":true,"assignees_url":"https://api.github.com/repos/mralexgray/ACEView/assignees{/user}","downloads_url":"https://api.github.com/repos/mralexgray/ACEView/downloads","has_downloads":true,"languages_url":"https://api.github.com/repos/mralexgray/ACEView/languages","default_branch":"master","milestones_url":"https://api.github.com/repos/mralexgray/ACEView/milestones{/number}","stargazers_url":"https://api.github.com/repos/mralexgray/ACEView/stargazers","watchers_count":0,"deployments_url":"https://api.github.com/repos/mralexgray/ACEView/deployments","git_commits_url":"https://api.github.com/repos/mralexgray/ACEView/git/commits{/sha}","subscribers_url":"https://api.github.com/repos/mralexgray/ACEView/subscribers","contributors_url":"https://api.github.com/repos/mralexgray/ACEView/contributors","issue_events_url":"https://api.github.com/repos/mralexgray/ACEView/issues/events{/number}","stargazers_count":0,"subscription_url":"https://api.github.com/repos/mralexgray/ACEView/subscription","collaborators_url":"https://api.github.com/repos/mralexgray/ACEView/collaborators{/collaborator}","issue_comment_url":"https://api.github.com/repos/mralexgray/ACEView/issues/comments{/number}","notifications_url":"https://api.github.com/repos/mralexgray/ACEView/notifications{?since,all,participating}","open_issues_count":0,"web_commit_signoff_required":false},{"id":13623648,"url":"https://api.github.com/repos/mralexgray/ActiveLog","fork":true,"name":"ActiveLog","size":60,"forks":0,"owner":{"id":262517,"url":"https://api.github.com/users/mralexgray","type":"User","login":"mralexgray","node_id":"MDQ6VXNlcjI2MjUxNw==","html_url":"https://github.com/mralexgray","gists_url":"https://api.github.com/users/mralexgray/gists{/gist_id}","repos_url":"https://api.github.com/users/mralexgray/repos","avatar_url":"https://avatars.githubusercontent.com/u/262517?v=4","events_url":"https://api.github.com/users/mralexgray/events{/privacy}","site_admin":false,"gravatar_id":"","starred_url":"https://api.github.com/users/mralexgray/starred{/owner}{/repo}","followers_url":"https://api.github.com/users/mralexgray/followers","following_url":"https://api.github.com/users/mralexgray/following{/other_user}","organizations_url":"https://api.github.com/users/mralexgray/orgs","subscriptions_url":"https://api.github.com/users/mralexgray/subscriptions","received_events_url":"https://api.github.com/users/mralexgray/received_events"},"topics":[],"git_url":"git://github.com/mralexgray/ActiveLog.git","license":null,"node_id":"MDEwOlJlcG9zaXRvcnkxMzYyMzY0OA==","private":false,"ssh_url":"git@github.com:mralexgray/ActiveLog.git","svn_url":"https://github.com/mralexgray/ActiveLog","archived":false,"disabled":false,"has_wiki":true,"homepage":"http://deepitpro.com/en/articles/ActiveLog/info/","html_url":"https://github.com/mralexgray/ActiveLog","keys_url":"https://api.github.com/repos/mralexgray/ActiveLog/keys{/key_id}","language":"Objective-C","tags_url":"https://api.github.com/repos/mralexgray/ActiveLog/tags","watchers":0,"blobs_url":"https://api.github.com/repos/mralexgray/ActiveLog/git/blobs{/sha}","clone_url":"https://github.com/mralexgray/ActiveLog.git","forks_url":"https://api.github.com/repos/mralexgray/ActiveLog/forks","full_name":"mralexgray/ActiveLog","has_pages":false,"hooks_url":"https://api.github.com/repos/mralexgray/ActiveLog/hooks","pulls_url":"https://api.github.com/repos/mralexgray/ActiveLog/pulls{/number}","pushed_at":"2011-07-03T06:28:59Z","teams_url":"https://api.github.com/repos/mralexgray/ActiveLog/teams","trees_url":"https://api.github.com/repos/mralexgray/ActiveLog/git/trees{/sha}","created_at":"2013-10-16T15:52:37Z","events_url":"https://api.github.com/repos/mralexgray/ActiveLog/events","has_issues":false,"issues_url":"https://api.github.com/repos/mralexgray/ActiveLog/issues{/number}","labels_url":"https://api.github.com/repos/mralexgray/ActiveLog/labels{/name}","merges_url":"https://api.github.com/repos/mralexgray/ActiveLog/merges","mirror_url":null,"updated_at":"2013-10-16T15:52:37Z","visibility":"public","archive_url":"https://api.github.com/repos/mralexgray/ActiveLog/{archive_format}{/ref}","commits_url":"https://api.github.com/repos/mralexgray/ActiveLog/commits{/sha}","compare_url":"https://api.github.com/repos/mralexgray/ActiveLog/compare/{base}...{head}","description":"Shut up all logs with active filter.","forks_count":0,"is_template":false,"open_issues":0,"branches_url":"https://api.github.com/repos/mralexgray/ActiveLog/branches{/branch}","comments_url":"https://api.github.com/repos/mralexgray/ActiveLog/comments{/number}","contents_url":"https://api.github.com/repos/mralexgray/ActiveLog/contents/{+path}","git_refs_url":"https://api.github.com/repos/mralexgray/ActiveLog/git/refs{/sha}","git_tags_url":"https://api.github.com/repos/mralexgray/ActiveLog/git/tags{/sha}","has_projects":true,"releases_url":"https://api.github.com/repos/mralexgray/ActiveLog/releases{/id}","statuses_url":"https://api.github.com/repos/mralexgray/ActiveLog/statuses/{sha}","allow_forking":true,"assignees_url":"https://api.github.com/repos/mralexgray/ActiveLog/assignees{/user}","downloads_url":"https://api.github.com/repos/mralexgray/ActiveLog/downloads","has_downloads":true,"languages_url":"https://api.github.com/repos/mralexgray/ActiveLog/languages","default_branch":"master","milestones_url":"https://api.github.com/repos/mralexgray/ActiveLog/milestones{/number}","stargazers_url":"https://api.github.com/repos/mralexgray/ActiveLog/stargazers","watchers_count":0,"deployments_url":"https://api.github.com/repos/mralexgray/ActiveLog/deployments","git_commits_url":"https://api.github.com/repos/mralexgray/ActiveLog/git/commits{/sha}","subscribers_url":"https://api.github.com/repos/mralexgray/ActiveLog/subscribers","contributors_url":"https://api.github.com/repos/mralexgray/ActiveLog/contributors","issue_events_url":"https://api.github.com/repos/mralexgray/ActiveLog/issues/events{/number}","stargazers_count":0,"subscription_url":"https://api.github.com/repos/mralexgray/ActiveLog/subscription","collaborators_url":"https://api.github.com/repos/mralexgray/ActiveLog/collaborators{/collaborator}","issue_comment_url":"https://api.github.com/repos/mralexgray/ActiveLog/issues/comments{/number}","notifications_url":"https://api.github.com/repos/mralexgray/ActiveLog/notifications{?since,all,participating}","open_issues_count":0,"web_commit_signoff_required":false},{"id":9716210,"url":"https://api.github.com/repos/mralexgray/adium","fork":false,"name":"adium","size":277719,"forks":37,"owner":{"id":262517,"url":"https://api.github.com/users/mralexgray","type":"User","login":"mralexgray","node_id":"MDQ6VXNlcjI2MjUxNw==","html_url":"https://github.com/mralexgray","gists_url":"https://api.github.com/users/mralexgray/gists{/gist_id}","repos_url":"https://api.github.com/users/mralexgray/repos","avatar_url":"https://avatars.githubusercontent.com/u/262517?v=4","events_url":"https://api.github.com/users/mralexgray/events{/privacy}","site_admin":false,"gravatar_id":"","starred_url":"https://api.github.com/users/mralexgray/starred{/owner}{/repo}","followers_url":"https://api.github.com/users/mralexgray/followers","following_url":"https://api.github.com/users/mralexgray/following{/other_user}","organizations_url":"https://api.github.com/users/mralexgray/orgs","subscriptions_url":"https://api.github.com/users/mralexgray/subscriptions","received_events_url":"https://api.github.com/users/mralexgray/received_events"},"topics":[],"git_url":"git://github.com/mralexgray/adium.git","license":{"key":"other","url":null,"name":"Other","node_id":"MDc6TGljZW5zZTA=","spdx_id":"NOASSERTION"},"node_id":"MDEwOlJlcG9zaXRvcnk5NzE2MjEw","private":false,"ssh_url":"git@github.com:mralexgray/adium.git","svn_url":"https://github.com/mralexgray/adium","archived":false,"disabled":false,"has_wiki":false,"homepage":null,"html_url":"https://github.com/mralexgray/adium","keys_url":"https://api.github.com/repos/mralexgray/adium/keys{/key_id}","language":"Objective-C","tags_url":"https://api.github.com/repos/mralexgray/adium/tags","watchers":0,"blobs_url":"https://api.github.com/repos/mralexgray/adium/git/blobs{/sha}","clone_url":"https://github.com/mralexgray/adium.git","forks_url":"https://api.github.com/repos/mralexgray/adium/forks","full_name":"mralexgray/adium","has_pages":false,"hooks_url":"https://api.github.com/repos/mralexgray/adium/hooks","pulls_url":"https://api.github.com/repos/mralexgray/adium/pulls{/number}","pushed_at":"2013-04-26T16:43:53Z","teams_url":"https://api.github.com/repos/mralexgray/adium/teams","trees_url":"https://api.github.com/repos/mralexgray/adium/git/trees{/sha}","created_at":"2013-04-27T14:59:33Z","events_url":"https://api.github.com/repos/mralexgray/adium/events","has_issues":false,"issues_url":"https://api.github.com/repos/mralexgray/adium/issues{/number}","labels_url":"https://api.github.com/repos/mralexgray/adium/labels{/name}","merges_url":"https://api.github.com/repos/mralexgray/adium/merges","mirror_url":null,"updated_at":"2019-12-11T06:51:45Z","visibility":"public","archive_url":"https://api.github.com/repos/mralexgray/adium/{archive_format}{/ref}","commits_url":"https://api.github.com/repos/mralexgray/adium/commits{/sha}","compare_url":"https://api.github.com/repos/mralexgray/adium/compare/{base}...{head}","description":"Official mirror of hg.adium.im","forks_count":37,"is_template":false,"open_issues":0,"branches_url":"https://api.github.com/repos/mralexgray/adium/branches{/branch}","comments_url":"https://api.github.com/repos/mralexgray/adium/comments{/number}","contents_url":"https://api.github.com/repos/mralexgray/adium/contents/{+path}","git_refs_url":"https://api.github.com/repos/mralexgray/adium/git/refs{/sha}","git_tags_url":"https://api.github.com/repos/mralexgray/adium/git/tags{/sha}","has_projects":true,"releases_url":"https://api.github.com/repos/mralexgray/adium/releases{/id}","statuses_url":"https://api.github.com/repos/mralexgray/adium/statuses/{sha}","allow_forking":true,"assignees_url":"https://api.github.com/repos/mralexgray/adium/assignees{/user}","downloads_url":"https://api.github.com/repos/mralexgray/adium/downloads","has_downloads":true,"languages_url":"https://api.github.com/repos/mralexgray/adium/languages","default_branch":"master","milestones_url":"https://api.github.com/repos/mralexgray/adium/milestones{/number}","stargazers_url":"https://api.github.com/repos/mralexgray/adium/stargazers","watchers_count":0,"deployments_url":"https://api.github.com/repos/mralexgray/adium/deployments","git_commits_url":"https://api.github.com/repos/mralexgray/adium/git/commits{/sha}","subscribers_url":"https://api.github.com/repos/mralexgray/adium/subscribers","contributors_url":"https://api.github.com/repos/mralexgray/adium/contributors","issue_events_url":"https://api.github.com/repos/mralexgray/adium/issues/events{/number}","stargazers_count":0,"subscription_url":"https://api.github.com/repos/mralexgray/adium/subscription","collaborators_url":"https://api.github.com/repos/mralexgray/adium/collaborators{/collaborator}","issue_comment_url":"https://api.github.com/repos/mralexgray/adium/issues/comments{/number}","notifications_url":"https://api.github.com/repos/mralexgray/adium/notifications{?since,all,participating}","open_issues_count":0,"web_commit_signoff_required":false},{"id":12752329,"url":"https://api.github.com/repos/mralexgray/ADLivelyTableView","fork":true,"name":"ADLivelyTableView","size":73,"forks":0,"owner":{"id":262517,"url":"https://api.github.com/users/mralexgray","type":"User","login":"mralexgray","node_id":"MDQ6VXNlcjI2MjUxNw==","html_url":"https://github.com/mralexgray","gists_url":"https://api.github.com/users/mralexgray/gists{/gist_id}","repos_url":"https://api.github.com/users/mralexgray/repos","avatar_url":"https://avatars.githubusercontent.com/u/262517?v=4","events_url":"https://api.github.com/users/mralexgray/events{/privacy}","site_admin":false,"gravatar_id":"","starred_url":"https://api.github.com/users/mralexgray/starred{/owner}{/repo}","followers_url":"https://api.github.com/users/mralexgray/followers","following_url":"https://api.github.com/users/mralexgray/following{/other_user}","organizations_url":"https://api.github.com/users/mralexgray/orgs","subscriptions_url":"https://api.github.com/users/mralexgray/subscriptions","received_events_url":"https://api.github.com/users/mralexgray/received_events"},"topics":[],"git_url":"git://github.com/mralexgray/ADLivelyTableView.git","license":{"key":"other","url":null,"name":"Other","node_id":"MDc6TGljZW5zZTA=","spdx_id":"NOASSERTION"},"node_id":"MDEwOlJlcG9zaXRvcnkxMjc1MjMyOQ==","private":false,"ssh_url":"git@github.com:mralexgray/ADLivelyTableView.git","svn_url":"https://github.com/mralexgray/ADLivelyTableView","archived":false,"disabled":false,"has_wiki":true,"homepage":"http://applidium.com/en/news/lively_uitableview/","html_url":"https://github.com/mralexgray/ADLivelyTableView","keys_url":"https://api.github.com/repos/mralexgray/ADLivelyTableView/keys{/key_id}","language":"Objective-C","tags_url":"https://api.github.com/repos/mralexgray/ADLivelyTableView/tags","watchers":0,"blobs_url":"https://api.github.com/repos/mralexgray/ADLivelyTableView/git/blobs{/sha}","clone_url":"https://github.com/mralexgray/ADLivelyTableView.git","forks_url":"https://api.github.com/repos/mralexgray/ADLivelyTableView/forks","full_name":"mralexgray/ADLivelyTableView","has_pages":false,"hooks_url":"https://api.github.com/repos/mralexgray/ADLivelyTableView/hooks","pulls_url":"https://api.github.com/repos/mralexgray/ADLivelyTableView/pulls{/number}","pushed_at":"2012-05-10T10:40:15Z","teams_url":"https://api.github.com/repos/mralexgray/ADLivelyTableView/teams","trees_url":"https://api.github.com/repos/mralexgray/ADLivelyTableView/git/trees{/sha}","created_at":"2013-09-11T09:18:01Z","events_url":"https://api.github.com/repos/mralexgray/ADLivelyTableView/events","has_issues":false,"issues_url":"https://api.github.com/repos/mralexgray/ADLivelyTableView/issues{/number}","labels_url":"https://api.github.com/repos/mralexgray/ADLivelyTableView/labels{/name}","merges_url":"https://api.github.com/repos/mralexgray/ADLivelyTableView/merges","mirror_url":null,"updated_at":"2013-09-11T09:18:03Z","visibility":"public","archive_url":"https://api.github.com/repos/mralexgray/ADLivelyTableView/{archive_format}{/ref}","commits_url":"https://api.github.com/repos/mralexgray/ADLivelyTableView/commits{/sha}","compare_url":"https://api.github.com/repos/mralexgray/ADLivelyTableView/compare/{base}...{head}","description":"Lively UITableView","forks_count":0,"is_template":false,"open_issues":0,"branches_url":"https://api.github.com/repos/mralexgray/ADLivelyTableView/branches{/branch}","comments_url":"https://api.github.com/repos/mralexgray/ADLivelyTableView/comments{/number}","contents_url":"https://api.github.com/repos/mralexgray/ADLivelyTableView/contents/{+path}","git_refs_url":"https://api.github.com/repos/mralexgray/ADLivelyTableView/git/refs{/sha}","git_tags_url":"https://api.github.com/repos/mralexgray/ADLivelyTableView/git/tags{/sha}","has_projects":true,"releases_url":"https://api.github.com/repos/mralexgray/ADLivelyTableView/releases{/id}","statuses_url":"https://api.github.com/repos/mralexgray/ADLivelyTableView/statuses/{sha}","allow_forking":true,"assignees_url":"https://api.github.com/repos/mralexgray/ADLivelyTableView/assignees{/user}","downloads_url":"https://api.github.com/repos/mralexgray/ADLivelyTableView/downloads","has_downloads":true,"languages_url":"https://api.github.com/repos/mralexgray/ADLivelyTableView/languages","default_branch":"master","milestones_url":"https://api.github.com/repos/mralexgray/ADLivelyTableView/milestones{/number}","stargazers_url":"https://api.github.com/repos/mralexgray/ADLivelyTableView/stargazers","watchers_count":0,"deployments_url":"https://api.github.com/repos/mralexgray/ADLivelyTableView/deployments","git_commits_url":"https://api.github.com/repos/mralexgray/ADLivelyTableView/git/commits{/sha}","subscribers_url":"https://api.github.com/repos/mralexgray/ADLivelyTableView/subscribers","contributors_url":"https://api.github.com/repos/mralexgray/ADLivelyTableView/contributors","issue_events_url":"https://api.github.com/repos/mralexgray/ADLivelyTableView/issues/events{/number}","stargazers_count":0,"subscription_url":"https://api.github.com/repos/mralexgray/ADLivelyTableView/subscription","collaborators_url":"https://api.github.com/repos/mralexgray/ADLivelyTableView/collaborators{/collaborator}","issue_comment_url":"https://api.github.com/repos/mralexgray/ADLivelyTableView/issues/comments{/number}","notifications_url":"https://api.github.com/repos/mralexgray/ADLivelyTableView/notifications{?since,all,participating}","open_issues_count":0,"web_commit_signoff_required":false},{"id":5697379,"url":"https://api.github.com/repos/mralexgray/AFIncrementalStore","fork":true,"name":"AFIncrementalStore","size":139,"forks":0,"owner":{"id":262517,"url":"https://api.github.com/users/mralexgray","type":"User","login":"mralexgray","node_id":"MDQ6VXNlcjI2MjUxNw==","html_url":"https://github.com/mralexgray","gists_url":"https://api.github.com/users/mralexgray/gists{/gist_id}","repos_url":"https://api.github.com/users/mralexgray/repos","avatar_url":"https://avatars.githubusercontent.com/u/262517?v=4","events_url":"https://api.github.com/users/mralexgray/events{/privacy}","site_admin":false,"gravatar_id":"","starred_url":"https://api.github.com/users/mralexgray/starred{/owner}{/repo}","followers_url":"https://api.github.com/users/mralexgray/followers","following_url":"https://api.github.com/users/mralexgray/following{/other_user}","organizations_url":"https://api.github.com/users/mralexgray/orgs","subscriptions_url":"https://api.github.com/users/mralexgray/subscriptions","received_events_url":"https://api.github.com/users/mralexgray/received_events"},"topics":[],"git_url":"git://github.com/mralexgray/AFIncrementalStore.git","license":{"key":"mit","url":"https://api.github.com/licenses/mit","name":"MIT License","node_id":"MDc6TGljZW5zZTEz","spdx_id":"MIT"},"node_id":"MDEwOlJlcG9zaXRvcnk1Njk3Mzc5","private":false,"ssh_url":"git@github.com:mralexgray/AFIncrementalStore.git","svn_url":"https://github.com/mralexgray/AFIncrementalStore","archived":false,"disabled":false,"has_wiki":true,"homepage":null,"html_url":"https://github.com/mralexgray/AFIncrementalStore","keys_url":"https://api.github.com/repos/mralexgray/AFIncrementalStore/keys{/key_id}","language":"Objective-C","tags_url":"https://api.github.com/repos/mralexgray/AFIncrementalStore/tags","watchers":0,"blobs_url":"https://api.github.com/repos/mralexgray/AFIncrementalStore/git/blobs{/sha}","clone_url":"https://github.com/mralexgray/AFIncrementalStore.git","forks_url":"https://api.github.com/repos/mralexgray/AFIncrementalStore/forks","full_name":"mralexgray/AFIncrementalStore","has_pages":false,"hooks_url":"https://api.github.com/repos/mralexgray/AFIncrementalStore/hooks","pulls_url":"https://api.github.com/repos/mralexgray/AFIncrementalStore/pulls{/number}","pushed_at":"2012-09-01T22:46:25Z","teams_url":"https://api.github.com/repos/mralexgray/AFIncrementalStore/teams","trees_url":"https://api.github.com/repos/mralexgray/AFIncrementalStore/git/trees{/sha}","created_at":"2012-09-06T04:20:33Z","events_url":"https://api.github.com/repos/mralexgray/AFIncrementalStore/events","has_issues":false,"issues_url":"https://api.github.com/repos/mralexgray/AFIncrementalStore/issues{/number}","labels_url":"https://api.github.com/repos/mralexgray/AFIncrementalStore/labels{/name}","merges_url":"https://api.github.com/repos/mralexgray/AFIncrementalStore/merges","mirror_url":null,"updated_at":"2013-01-12T03:15:29Z","visibility":"public","archive_url":"https://api.github.com/repos/mralexgray/AFIncrementalStore/{archive_format}{/ref}","commits_url":"https://api.github.com/repos/mralexgray/AFIncrementalStore/commits{/sha}","compare_url":"https://api.github.com/repos/mralexgray/AFIncrementalStore/compare/{base}...{head}","description":"Core Data Persistence with AFNetworking, Done Right","forks_count":0,"is_template":false,"open_issues":0,"branches_url":"https://api.github.com/repos/mralexgray/AFIncrementalStore/branches{/branch}","comments_url":"https://api.github.com/repos/mralexgray/AFIncrementalStore/comments{/number}","contents_url":"https://api.github.com/repos/mralexgray/AFIncrementalStore/contents/{+path}","git_refs_url":"https://api.github.com/repos/mralexgray/AFIncrementalStore/git/refs{/sha}","git_tags_url":"https://api.github.com/repos/mralexgray/AFIncrementalStore/git/tags{/sha}","has_projects":true,"releases_url":"https://api.github.com/repos/mralexgray/AFIncrementalStore/releases{/id}","statuses_url":"https://api.github.com/repos/mralexgray/AFIncrementalStore/statuses/{sha}","allow_forking":true,"assignees_url":"https://api.github.com/repos/mralexgray/AFIncrementalStore/assignees{/user}","downloads_url":"https://api.github.com/repos/mralexgray/AFIncrementalStore/downloads","has_downloads":true,"languages_url":"https://api.github.com/repos/mralexgray/AFIncrementalStore/languages","default_branch":"master","milestones_url":"https://api.github.com/repos/mralexgray/AFIncrementalStore/milestones{/number}","stargazers_url":"https://api.github.com/repos/mralexgray/AFIncrementalStore/stargazers","watchers_count":0,"deployments_url":"https://api.github.com/repos/mralexgray/AFIncrementalStore/deployments","git_commits_url":"https://api.github.com/repos/mralexgray/AFIncrementalStore/git/commits{/sha}","subscribers_url":"https://api.github.com/repos/mralexgray/AFIncrementalStore/subscribers","contributors_url":"https://api.github.com/repos/mralexgray/AFIncrementalStore/contributors","issue_events_url":"https://api.github.com/repos/mralexgray/AFIncrementalStore/issues/events{/number}","stargazers_count":0,"subscription_url":"https://api.github.com/repos/mralexgray/AFIncrementalStore/subscription","collaborators_url":"https://api.github.com/repos/mralexgray/AFIncrementalStore/collaborators{/collaborator}","issue_comment_url":"https://api.github.com/repos/mralexgray/AFIncrementalStore/issues/comments{/number}","notifications_url":"https://api.github.com/repos/mralexgray/AFIncrementalStore/notifications{?since,all,participating}","open_issues_count":0,"web_commit_signoff_required":false},{"id":6969621,"url":"https://api.github.com/repos/mralexgray/AFNetworking","fork":true,"name":"AFNetworking","size":4341,"forks":0,"owner":{"id":262517,"url":"https://api.github.com/users/mralexgray","type":"User","login":"mralexgray","node_id":"MDQ6VXNlcjI2MjUxNw==","html_url":"https://github.com/mralexgray","gists_url":"https://api.github.com/users/mralexgray/gists{/gist_id}","repos_url":"https://api.github.com/users/mralexgray/repos","avatar_url":"https://avatars.githubusercontent.com/u/262517?v=4","events_url":"https://api.github.com/users/mralexgray/events{/privacy}","site_admin":false,"gravatar_id":"","starred_url":"https://api.github.com/users/mralexgray/starred{/owner}{/repo}","followers_url":"https://api.github.com/users/mralexgray/followers","following_url":"https://api.github.com/users/mralexgray/following{/other_user}","organizations_url":"https://api.github.com/users/mralexgray/orgs","subscriptions_url":"https://api.github.com/users/mralexgray/subscriptions","received_events_url":"https://api.github.com/users/mralexgray/received_events"},"topics":[],"git_url":"git://github.com/mralexgray/AFNetworking.git","license":{"key":"mit","url":"https://api.github.com/licenses/mit","name":"MIT License","node_id":"MDc6TGljZW5zZTEz","spdx_id":"MIT"},"node_id":"MDEwOlJlcG9zaXRvcnk2OTY5NjIx","private":false,"ssh_url":"git@github.com:mralexgray/AFNetworking.git","svn_url":"https://github.com/mralexgray/AFNetworking","archived":false,"disabled":false,"has_wiki":true,"homepage":"http://afnetworking.com","html_url":"https://github.com/mralexgray/AFNetworking","keys_url":"https://api.github.com/repos/mralexgray/AFNetworking/keys{/key_id}","language":"Objective-C","tags_url":"https://api.github.com/repos/mralexgray/AFNetworking/tags","watchers":2,"blobs_url":"https://api.github.com/repos/mralexgray/AFNetworking/git/blobs{/sha}","clone_url":"https://github.com/mralexgray/AFNetworking.git","forks_url":"https://api.github.com/repos/mralexgray/AFNetworking/forks","full_name":"mralexgray/AFNetworking","has_pages":false,"hooks_url":"https://api.github.com/repos/mralexgray/AFNetworking/hooks","pulls_url":"https://api.github.com/repos/mralexgray/AFNetworking/pulls{/number}","pushed_at":"2014-01-24T07:14:32Z","teams_url":"https://api.github.com/repos/mralexgray/AFNetworking/teams","trees_url":"https://api.github.com/repos/mralexgray/AFNetworking/git/trees{/sha}","created_at":"2012-12-02T17:00:04Z","events_url":"https://api.github.com/repos/mralexgray/AFNetworking/events","has_issues":false,"issues_url":"https://api.github.com/repos/mralexgray/AFNetworking/issues{/number}","labels_url":"https://api.github.com/repos/mralexgray/AFNetworking/labels{/name}","merges_url":"https://api.github.com/repos/mralexgray/AFNetworking/merges","mirror_url":null,"updated_at":"2014-01-24T07:14:33Z","visibility":"public","archive_url":"https://api.github.com/repos/mralexgray/AFNetworking/{archive_format}{/ref}","commits_url":"https://api.github.com/repos/mralexgray/AFNetworking/commits{/sha}","compare_url":"https://api.github.com/repos/mralexgray/AFNetworking/compare/{base}...{head}","description":"A delightful iOS and OS X networking framework","forks_count":0,"is_template":false,"open_issues":0,"branches_url":"https://api.github.com/repos/mralexgray/AFNetworking/branches{/branch}","comments_url":"https://api.github.com/repos/mralexgray/AFNetworking/comments{/number}","contents_url":"https://api.github.com/repos/mralexgray/AFNetworking/contents/{+path}","git_refs_url":"https://api.github.com/repos/mralexgray/AFNetworking/git/refs{/sha}","git_tags_url":"https://api.github.com/repos/mralexgray/AFNetworking/git/tags{/sha}","has_projects":true,"releases_url":"https://api.github.com/repos/mralexgray/AFNetworking/releases{/id}","statuses_url":"https://api.github.com/repos/mralexgray/AFNetworking/statuses/{sha}","allow_forking":true,"assignees_url":"https://api.github.com/repos/mralexgray/AFNetworking/assignees{/user}","downloads_url":"https://api.github.com/repos/mralexgray/AFNetworking/downloads","has_downloads":true,"languages_url":"https://api.github.com/repos/mralexgray/AFNetworking/languages","default_branch":"master","milestones_url":"https://api.github.com/repos/mralexgray/AFNetworking/milestones{/number}","stargazers_url":"https://api.github.com/repos/mralexgray/AFNetworking/stargazers","watchers_count":2,"deployments_url":"https://api.github.com/repos/mralexgray/AFNetworking/deployments","git_commits_url":"https://api.github.com/repos/mralexgray/AFNetworking/git/commits{/sha}","subscribers_url":"https://api.github.com/repos/mralexgray/AFNetworking/subscribers","contributors_url":"https://api.github.com/repos/mralexgray/AFNetworking/contributors","issue_events_url":"https://api.github.com/repos/mralexgray/AFNetworking/issues/events{/number}","stargazers_count":2,"subscription_url":"https://api.github.com/repos/mralexgray/AFNetworking/subscription","collaborators_url":"https://api.github.com/repos/mralexgray/AFNetworking/collaborators{/collaborator}","issue_comment_url":"https://api.github.com/repos/mralexgray/AFNetworking/issues/comments{/number}","notifications_url":"https://api.github.com/repos/mralexgray/AFNetworking/notifications{?since,all,participating}","open_issues_count":0,"web_commit_signoff_required":false},{"id":9485541,"url":"https://api.github.com/repos/mralexgray/AGNSSplitView","fork":true,"name":"AGNSSplitView","size":68,"forks":0,"owner":{"id":262517,"url":"https://api.github.com/users/mralexgray","type":"User","login":"mralexgray","node_id":"MDQ6VXNlcjI2MjUxNw==","html_url":"https://github.com/mralexgray","gists_url":"https://api.github.com/users/mralexgray/gists{/gist_id}","repos_url":"https://api.github.com/users/mralexgray/repos","avatar_url":"https://avatars.githubusercontent.com/u/262517?v=4","events_url":"https://api.github.com/users/mralexgray/events{/privacy}","site_admin":false,"gravatar_id":"","starred_url":"https://api.github.com/users/mralexgray/starred{/owner}{/repo}","followers_url":"https://api.github.com/users/mralexgray/followers","following_url":"https://api.github.com/users/mralexgray/following{/other_user}","organizations_url":"https://api.github.com/users/mralexgray/orgs","subscriptions_url":"https://api.github.com/users/mralexgray/subscriptions","received_events_url":"https://api.github.com/users/mralexgray/received_events"},"topics":[],"git_url":"git://github.com/mralexgray/AGNSSplitView.git","license":null,"node_id":"MDEwOlJlcG9zaXRvcnk5NDg1NTQx","private":false,"ssh_url":"git@github.com:mralexgray/AGNSSplitView.git","svn_url":"https://github.com/mralexgray/AGNSSplitView","archived":false,"disabled":false,"has_wiki":true,"homepage":null,"html_url":"https://github.com/mralexgray/AGNSSplitView","keys_url":"https://api.github.com/repos/mralexgray/AGNSSplitView/keys{/key_id}","language":"Objective-C","tags_url":"https://api.github.com/repos/mralexgray/AGNSSplitView/tags","watchers":0,"blobs_url":"https://api.github.com/repos/mralexgray/AGNSSplitView/git/blobs{/sha}","clone_url":"https://github.com/mralexgray/AGNSSplitView.git","forks_url":"https://api.github.com/repos/mralexgray/AGNSSplitView/forks","full_name":"mralexgray/AGNSSplitView","has_pages":false,"hooks_url":"https://api.github.com/repos/mralexgray/AGNSSplitView/hooks","pulls_url":"https://api.github.com/repos/mralexgray/AGNSSplitView/pulls{/number}","pushed_at":"2013-02-26T00:32:32Z","teams_url":"https://api.github.com/repos/mralexgray/AGNSSplitView/teams","trees_url":"https://api.github.com/repos/mralexgray/AGNSSplitView/git/trees{/sha}","created_at":"2013-04-17T00:10:13Z","events_url":"https://api.github.com/repos/mralexgray/AGNSSplitView/events","has_issues":false,"issues_url":"https://api.github.com/repos/mralexgray/AGNSSplitView/issues{/number}","labels_url":"https://api.github.com/repos/mralexgray/AGNSSplitView/labels{/name}","merges_url":"https://api.github.com/repos/mralexgray/AGNSSplitView/merges","mirror_url":null,"updated_at":"2013-04-17T00:10:13Z","visibility":"public","archive_url":"https://api.github.com/repos/mralexgray/AGNSSplitView/{archive_format}{/ref}","commits_url":"https://api.github.com/repos/mralexgray/AGNSSplitView/commits{/sha}","compare_url":"https://api.github.com/repos/mralexgray/AGNSSplitView/compare/{base}...{head}","description":"Simple NSSplitView additions.","forks_count":0,"is_template":false,"open_issues":0,"branches_url":"https://api.github.com/repos/mralexgray/AGNSSplitView/branches{/branch}","comments_url":"https://api.github.com/repos/mralexgray/AGNSSplitView/comments{/number}","contents_url":"https://api.github.com/repos/mralexgray/AGNSSplitView/contents/{+path}","git_refs_url":"https://api.github.com/repos/mralexgray/AGNSSplitView/git/refs{/sha}","git_tags_url":"https://api.github.com/repos/mralexgray/AGNSSplitView/git/tags{/sha}","has_projects":true,"releases_url":"https://api.github.com/repos/mralexgray/AGNSSplitView/releases{/id}","statuses_url":"https://api.github.com/repos/mralexgray/AGNSSplitView/statuses/{sha}","allow_forking":true,"assignees_url":"https://api.github.com/repos/mralexgray/AGNSSplitView/assignees{/user}","downloads_url":"https://api.github.com/repos/mralexgray/AGNSSplitView/downloads","has_downloads":true,"languages_url":"https://api.github.com/repos/mralexgray/AGNSSplitView/languages","default_branch":"master","milestones_url":"https://api.github.com/repos/mralexgray/AGNSSplitView/milestones{/number}","stargazers_url":"https://api.github.com/repos/mralexgray/AGNSSplitView/stargazers","watchers_count":0,"deployments_url":"https://api.github.com/repos/mralexgray/AGNSSplitView/deployments","git_commits_url":"https://api.github.com/repos/mralexgray/AGNSSplitView/git/commits{/sha}","subscribers_url":"https://api.github.com/repos/mralexgray/AGNSSplitView/subscribers","contributors_url":"https://api.github.com/repos/mralexgray/AGNSSplitView/contributors","issue_events_url":"https://api.github.com/repos/mralexgray/AGNSSplitView/issues/events{/number}","stargazers_count":0,"subscription_url":"https://api.github.com/repos/mralexgray/AGNSSplitView/subscription","collaborators_url":"https://api.github.com/repos/mralexgray/AGNSSplitView/collaborators{/collaborator}","issue_comment_url":"https://api.github.com/repos/mralexgray/AGNSSplitView/issues/comments{/number}","notifications_url":"https://api.github.com/repos/mralexgray/AGNSSplitView/notifications{?since,all,participating}","open_issues_count":0,"web_commit_signoff_required":false},{"id":12767784,"url":"https://api.github.com/repos/mralexgray/AGScopeBar","fork":true,"name":"AGScopeBar","size":64,"forks":0,"owner":{"id":262517,"url":"https://api.github.com/users/mralexgray","type":"User","login":"mralexgray","node_id":"MDQ6VXNlcjI2MjUxNw==","html_url":"https://github.com/mralexgray","gists_url":"https://api.github.com/users/mralexgray/gists{/gist_id}","repos_url":"https://api.github.com/users/mralexgray/repos","avatar_url":"https://avatars.githubusercontent.com/u/262517?v=4","events_url":"https://api.github.com/users/mralexgray/events{/privacy}","site_admin":false,"gravatar_id":"","starred_url":"https://api.github.com/users/mralexgray/starred{/owner}{/repo}","followers_url":"https://api.github.com/users/mralexgray/followers","following_url":"https://api.github.com/users/mralexgray/following{/other_user}","organizations_url":"https://api.github.com/users/mralexgray/orgs","subscriptions_url":"https://api.github.com/users/mralexgray/subscriptions","received_events_url":"https://api.github.com/users/mralexgray/received_events"},"topics":[],"git_url":"git://github.com/mralexgray/AGScopeBar.git","license":null,"node_id":"MDEwOlJlcG9zaXRvcnkxMjc2Nzc4NA==","private":false,"ssh_url":"git@github.com:mralexgray/AGScopeBar.git","svn_url":"https://github.com/mralexgray/AGScopeBar","archived":false,"disabled":false,"has_wiki":true,"homepage":null,"html_url":"https://github.com/mralexgray/AGScopeBar","keys_url":"https://api.github.com/repos/mralexgray/AGScopeBar/keys{/key_id}","language":"Objective-C","tags_url":"https://api.github.com/repos/mralexgray/AGScopeBar/tags","watchers":0,"blobs_url":"https://api.github.com/repos/mralexgray/AGScopeBar/git/blobs{/sha}","clone_url":"https://github.com/mralexgray/AGScopeBar.git","forks_url":"https://api.github.com/repos/mralexgray/AGScopeBar/forks","full_name":"mralexgray/AGScopeBar","has_pages":false,"hooks_url":"https://api.github.com/repos/mralexgray/AGScopeBar/hooks","pulls_url":"https://api.github.com/repos/mralexgray/AGScopeBar/pulls{/number}","pushed_at":"2013-05-07T03:35:29Z","teams_url":"https://api.github.com/repos/mralexgray/AGScopeBar/teams","trees_url":"https://api.github.com/repos/mralexgray/AGScopeBar/git/trees{/sha}","created_at":"2013-09-11T21:06:54Z","events_url":"https://api.github.com/repos/mralexgray/AGScopeBar/events","has_issues":false,"issues_url":"https://api.github.com/repos/mralexgray/AGScopeBar/issues{/number}","labels_url":"https://api.github.com/repos/mralexgray/AGScopeBar/labels{/name}","merges_url":"https://api.github.com/repos/mralexgray/AGScopeBar/merges","mirror_url":null,"updated_at":"2013-09-11T21:06:54Z","visibility":"public","archive_url":"https://api.github.com/repos/mralexgray/AGScopeBar/{archive_format}{/ref}","commits_url":"https://api.github.com/repos/mralexgray/AGScopeBar/commits{/sha}","compare_url":"https://api.github.com/repos/mralexgray/AGScopeBar/compare/{base}...{head}","description":"Custom scope bar implementation for Cocoa","forks_count":0,"is_template":false,"open_issues":0,"branches_url":"https://api.github.com/repos/mralexgray/AGScopeBar/branches{/branch}","comments_url":"https://api.github.com/repos/mralexgray/AGScopeBar/comments{/number}","contents_url":"https://api.github.com/repos/mralexgray/AGScopeBar/contents/{+path}","git_refs_url":"https://api.github.com/repos/mralexgray/AGScopeBar/git/refs{/sha}","git_tags_url":"https://api.github.com/repos/mralexgray/AGScopeBar/git/tags{/sha}","has_projects":true,"releases_url":"https://api.github.com/repos/mralexgray/AGScopeBar/releases{/id}","statuses_url":"https://api.github.com/repos/mralexgray/AGScopeBar/statuses/{sha}","allow_forking":true,"assignees_url":"https://api.github.com/repos/mralexgray/AGScopeBar/assignees{/user}","downloads_url":"https://api.github.com/repos/mralexgray/AGScopeBar/downloads","has_downloads":true,"languages_url":"https://api.github.com/repos/mralexgray/AGScopeBar/languages","default_branch":"master","milestones_url":"https://api.github.com/repos/mralexgray/AGScopeBar/milestones{/number}","stargazers_url":"https://api.github.com/repos/mralexgray/AGScopeBar/stargazers","watchers_count":0,"deployments_url":"https://api.github.com/repos/mralexgray/AGScopeBar/deployments","git_commits_url":"https://api.github.com/repos/mralexgray/AGScopeBar/git/commits{/sha}","subscribers_url":"https://api.github.com/repos/mralexgray/AGScopeBar/subscribers","contributors_url":"https://api.github.com/repos/mralexgray/AGScopeBar/contributors","issue_events_url":"https://api.github.com/repos/mralexgray/AGScopeBar/issues/events{/number}","stargazers_count":0,"subscription_url":"https://api.github.com/repos/mralexgray/AGScopeBar/subscription","collaborators_url":"https://api.github.com/repos/mralexgray/AGScopeBar/collaborators{/collaborator}","issue_comment_url":"https://api.github.com/repos/mralexgray/AGScopeBar/issues/comments{/number}","notifications_url":"https://api.github.com/repos/mralexgray/AGScopeBar/notifications{?since,all,participating}","open_issues_count":0,"web_commit_signoff_required":false},{"id":31829499,"url":"https://api.github.com/repos/mralexgray/agvtool-xcode-plugin","fork":true,"name":"agvtool-xcode-plugin","size":102,"forks":0,"owner":{"id":262517,"url":"https://api.github.com/users/mralexgray","type":"User","login":"mralexgray","node_id":"MDQ6VXNlcjI2MjUxNw==","html_url":"https://github.com/mralexgray","gists_url":"https://api.github.com/users/mralexgray/gists{/gist_id}","repos_url":"https://api.github.com/users/mralexgray/repos","avatar_url":"https://avatars.githubusercontent.com/u/262517?v=4","events_url":"https://api.github.com/users/mralexgray/events{/privacy}","site_admin":false,"gravatar_id":"","starred_url":"https://api.github.com/users/mralexgray/starred{/owner}{/repo}","followers_url":"https://api.github.com/users/mralexgray/followers","following_url":"https://api.github.com/users/mralexgray/following{/other_user}","organizations_url":"https://api.github.com/users/mralexgray/orgs","subscriptions_url":"https://api.github.com/users/mralexgray/subscriptions","received_events_url":"https://api.github.com/users/mralexgray/received_events"},"topics":[],"git_url":"git://github.com/mralexgray/agvtool-xcode-plugin.git","license":null,"node_id":"MDEwOlJlcG9zaXRvcnkzMTgyOTQ5OQ==","private":false,"ssh_url":"git@github.com:mralexgray/agvtool-xcode-plugin.git","svn_url":"https://github.com/mralexgray/agvtool-xcode-plugin","archived":false,"disabled":false,"has_wiki":true,"homepage":null,"html_url":"https://github.com/mralexgray/agvtool-xcode-plugin","keys_url":"https://api.github.com/repos/mralexgray/agvtool-xcode-plugin/keys{/key_id}","language":"Objective-C","tags_url":"https://api.github.com/repos/mralexgray/agvtool-xcode-plugin/tags","watchers":0,"blobs_url":"https://api.github.com/repos/mralexgray/agvtool-xcode-plugin/git/blobs{/sha}","clone_url":"https://github.com/mralexgray/agvtool-xcode-plugin.git","forks_url":"https://api.github.com/repos/mralexgray/agvtool-xcode-plugin/forks","full_name":"mralexgray/agvtool-xcode-plugin","has_pages":false,"hooks_url":"https://api.github.com/repos/mralexgray/agvtool-xcode-plugin/hooks","pulls_url":"https://api.github.com/repos/mralexgray/agvtool-xcode-plugin/pulls{/number}","pushed_at":"2015-03-08T00:04:31Z","teams_url":"https://api.github.com/repos/mralexgray/agvtool-xcode-plugin/teams","trees_url":"https://api.github.com/repos/mralexgray/agvtool-xcode-plugin/git/trees{/sha}","created_at":"2015-03-07T22:15:38Z","events_url":"https://api.github.com/repos/mralexgray/agvtool-xcode-plugin/events","has_issues":false,"issues_url":"https://api.github.com/repos/mralexgray/agvtool-xcode-plugin/issues{/number}","labels_url":"https://api.github.com/repos/mralexgray/agvtool-xcode-plugin/labels{/name}","merges_url":"https://api.github.com/repos/mralexgray/agvtool-xcode-plugin/merges","mirror_url":null,"updated_at":"2015-03-07T22:15:41Z","visibility":"public","archive_url":"https://api.github.com/repos/mralexgray/agvtool-xcode-plugin/{archive_format}{/ref}","commits_url":"https://api.github.com/repos/mralexgray/agvtool-xcode-plugin/commits{/sha}","compare_url":"https://api.github.com/repos/mralexgray/agvtool-xcode-plugin/compare/{base}...{head}","description":"this is a plugin wrapper for agvtool for xcode.","forks_count":0,"is_template":false,"open_issues":0,"branches_url":"https://api.github.com/repos/mralexgray/agvtool-xcode-plugin/branches{/branch}","comments_url":"https://api.github.com/repos/mralexgray/agvtool-xcode-plugin/comments{/number}","contents_url":"https://api.github.com/repos/mralexgray/agvtool-xcode-plugin/contents/{+path}","git_refs_url":"https://api.github.com/repos/mralexgray/agvtool-xcode-plugin/git/refs{/sha}","git_tags_url":"https://api.github.com/repos/mralexgray/agvtool-xcode-plugin/git/tags{/sha}","has_projects":true,"releases_url":"https://api.github.com/repos/mralexgray/agvtool-xcode-plugin/releases{/id}","statuses_url":"https://api.github.com/repos/mralexgray/agvtool-xcode-plugin/statuses/{sha}","allow_forking":true,"assignees_url":"https://api.github.com/repos/mralexgray/agvtool-xcode-plugin/assignees{/user}","downloads_url":"https://api.github.com/repos/mralexgray/agvtool-xcode-plugin/downloads","has_downloads":true,"languages_url":"https://api.github.com/repos/mralexgray/agvtool-xcode-plugin/languages","default_branch":"master","milestones_url":"https://api.github.com/repos/mralexgray/agvtool-xcode-plugin/milestones{/number}","stargazers_url":"https://api.github.com/repos/mralexgray/agvtool-xcode-plugin/stargazers","watchers_count":0,"deployments_url":"https://api.github.com/repos/mralexgray/agvtool-xcode-plugin/deployments","git_commits_url":"https://api.github.com/repos/mralexgray/agvtool-xcode-plugin/git/commits{/sha}","subscribers_url":"https://api.github.com/repos/mralexgray/agvtool-xcode-plugin/subscribers","contributors_url":"https://api.github.com/repos/mralexgray/agvtool-xcode-plugin/contributors","issue_events_url":"https://api.github.com/repos/mralexgray/agvtool-xcode-plugin/issues/events{/number}","stargazers_count":0,"subscription_url":"https://api.github.com/repos/mralexgray/agvtool-xcode-plugin/subscription","collaborators_url":"https://api.github.com/repos/mralexgray/agvtool-xcode-plugin/collaborators{/collaborator}","issue_comment_url":"https://api.github.com/repos/mralexgray/agvtool-xcode-plugin/issues/comments{/number}","notifications_url":"https://api.github.com/repos/mralexgray/agvtool-xcode-plugin/notifications{?since,all,participating}","open_issues_count":0,"web_commit_signoff_required":false},{"id":9227846,"url":"https://api.github.com/repos/mralexgray/AHContentBrowser","fork":true,"name":"AHContentBrowser","size":223,"forks":0,"owner":{"id":262517,"url":"https://api.github.com/users/mralexgray","type":"User","login":"mralexgray","node_id":"MDQ6VXNlcjI2MjUxNw==","html_url":"https://github.com/mralexgray","gists_url":"https://api.github.com/users/mralexgray/gists{/gist_id}","repos_url":"https://api.github.com/users/mralexgray/repos","avatar_url":"https://avatars.githubusercontent.com/u/262517?v=4","events_url":"https://api.github.com/users/mralexgray/events{/privacy}","site_admin":false,"gravatar_id":"","starred_url":"https://api.github.com/users/mralexgray/starred{/owner}{/repo}","followers_url":"https://api.github.com/users/mralexgray/followers","following_url":"https://api.github.com/users/mralexgray/following{/other_user}","organizations_url":"https://api.github.com/users/mralexgray/orgs","subscriptions_url":"https://api.github.com/users/mralexgray/subscriptions","received_events_url":"https://api.github.com/users/mralexgray/received_events"},"topics":[],"git_url":"git://github.com/mralexgray/AHContentBrowser.git","license":null,"node_id":"MDEwOlJlcG9zaXRvcnk5MjI3ODQ2","private":false,"ssh_url":"git@github.com:mralexgray/AHContentBrowser.git","svn_url":"https://github.com/mralexgray/AHContentBrowser","archived":false,"disabled":false,"has_wiki":true,"homepage":"","html_url":"https://github.com/mralexgray/AHContentBrowser","keys_url":"https://api.github.com/repos/mralexgray/AHContentBrowser/keys{/key_id}","language":"Objective-C","tags_url":"https://api.github.com/repos/mralexgray/AHContentBrowser/tags","watchers":0,"blobs_url":"https://api.github.com/repos/mralexgray/AHContentBrowser/git/blobs{/sha}","clone_url":"https://github.com/mralexgray/AHContentBrowser.git","forks_url":"https://api.github.com/repos/mralexgray/AHContentBrowser/forks","full_name":"mralexgray/AHContentBrowser","has_pages":false,"hooks_url":"https://api.github.com/repos/mralexgray/AHContentBrowser/hooks","pulls_url":"https://api.github.com/repos/mralexgray/AHContentBrowser/pulls{/number}","pushed_at":"2013-03-13T17:38:23Z","teams_url":"https://api.github.com/repos/mralexgray/AHContentBrowser/teams","trees_url":"https://api.github.com/repos/mralexgray/AHContentBrowser/git/trees{/sha}","created_at":"2013-04-04T20:56:16Z","events_url":"https://api.github.com/repos/mralexgray/AHContentBrowser/events","has_issues":false,"issues_url":"https://api.github.com/repos/mralexgray/AHContentBrowser/issues{/number}","labels_url":"https://api.github.com/repos/mralexgray/AHContentBrowser/labels{/name}","merges_url":"https://api.github.com/repos/mralexgray/AHContentBrowser/merges","mirror_url":null,"updated_at":"2015-10-22T05:00:24Z","visibility":"public","archive_url":"https://api.github.com/repos/mralexgray/AHContentBrowser/{archive_format}{/ref}","commits_url":"https://api.github.com/repos/mralexgray/AHContentBrowser/commits{/sha}","compare_url":"https://api.github.com/repos/mralexgray/AHContentBrowser/compare/{base}...{head}","description":"A Mac only webview that loads a fast readable version of the website if available.","forks_count":0,"is_template":false,"open_issues":0,"branches_url":"https://api.github.com/repos/mralexgray/AHContentBrowser/branches{/branch}","comments_url":"https://api.github.com/repos/mralexgray/AHContentBrowser/comments{/number}","contents_url":"https://api.github.com/repos/mralexgray/AHContentBrowser/contents/{+path}","git_refs_url":"https://api.github.com/repos/mralexgray/AHContentBrowser/git/refs{/sha}","git_tags_url":"https://api.github.com/repos/mralexgray/AHContentBrowser/git/tags{/sha}","has_projects":true,"releases_url":"https://api.github.com/repos/mralexgray/AHContentBrowser/releases{/id}","statuses_url":"https://api.github.com/repos/mralexgray/AHContentBrowser/statuses/{sha}","allow_forking":true,"assignees_url":"https://api.github.com/repos/mralexgray/AHContentBrowser/assignees{/user}","downloads_url":"https://api.github.com/repos/mralexgray/AHContentBrowser/downloads","has_downloads":true,"languages_url":"https://api.github.com/repos/mralexgray/AHContentBrowser/languages","default_branch":"master","milestones_url":"https://api.github.com/repos/mralexgray/AHContentBrowser/milestones{/number}","stargazers_url":"https://api.github.com/repos/mralexgray/AHContentBrowser/stargazers","watchers_count":0,"deployments_url":"https://api.github.com/repos/mralexgray/AHContentBrowser/deployments","git_commits_url":"https://api.github.com/repos/mralexgray/AHContentBrowser/git/commits{/sha}","subscribers_url":"https://api.github.com/repos/mralexgray/AHContentBrowser/subscribers","contributors_url":"https://api.github.com/repos/mralexgray/AHContentBrowser/contributors","issue_events_url":"https://api.github.com/repos/mralexgray/AHContentBrowser/issues/events{/number}","stargazers_count":0,"subscription_url":"https://api.github.com/repos/mralexgray/AHContentBrowser/subscription","collaborators_url":"https://api.github.com/repos/mralexgray/AHContentBrowser/collaborators{/collaborator}","issue_comment_url":"https://api.github.com/repos/mralexgray/AHContentBrowser/issues/comments{/number}","notifications_url":"https://api.github.com/repos/mralexgray/AHContentBrowser/notifications{?since,all,participating}","open_issues_count":0,"web_commit_signoff_required":false},{"id":37430328,"url":"https://api.github.com/repos/mralexgray/AHLaunchCtl","fork":true,"name":"AHLaunchCtl","size":592,"forks":0,"owner":{"id":262517,"url":"https://api.github.com/users/mralexgray","type":"User","login":"mralexgray","node_id":"MDQ6VXNlcjI2MjUxNw==","html_url":"https://github.com/mralexgray","gists_url":"https://api.github.com/users/mralexgray/gists{/gist_id}","repos_url":"https://api.github.com/users/mralexgray/repos","avatar_url":"https://avatars.githubusercontent.com/u/262517?v=4","events_url":"https://api.github.com/users/mralexgray/events{/privacy}","site_admin":false,"gravatar_id":"","starred_url":"https://api.github.com/users/mralexgray/starred{/owner}{/repo}","followers_url":"https://api.github.com/users/mralexgray/followers","following_url":"https://api.github.com/users/mralexgray/following{/other_user}","organizations_url":"https://api.github.com/users/mralexgray/orgs","subscriptions_url":"https://api.github.com/users/mralexgray/subscriptions","received_events_url":"https://api.github.com/users/mralexgray/received_events"},"topics":[],"git_url":"git://github.com/mralexgray/AHLaunchCtl.git","license":{"key":"mit","url":"https://api.github.com/licenses/mit","name":"MIT License","node_id":"MDc6TGljZW5zZTEz","spdx_id":"MIT"},"node_id":"MDEwOlJlcG9zaXRvcnkzNzQzMDMyOA==","private":false,"ssh_url":"git@github.com:mralexgray/AHLaunchCtl.git","svn_url":"https://github.com/mralexgray/AHLaunchCtl","archived":false,"disabled":false,"has_wiki":true,"homepage":"","html_url":"https://github.com/mralexgray/AHLaunchCtl","keys_url":"https://api.github.com/repos/mralexgray/AHLaunchCtl/keys{/key_id}","language":"Objective-C","tags_url":"https://api.github.com/repos/mralexgray/AHLaunchCtl/tags","watchers":0,"blobs_url":"https://api.github.com/repos/mralexgray/AHLaunchCtl/git/blobs{/sha}","clone_url":"https://github.com/mralexgray/AHLaunchCtl.git","forks_url":"https://api.github.com/repos/mralexgray/AHLaunchCtl/forks","full_name":"mralexgray/AHLaunchCtl","has_pages":false,"hooks_url":"https://api.github.com/repos/mralexgray/AHLaunchCtl/hooks","pulls_url":"https://api.github.com/repos/mralexgray/AHLaunchCtl/pulls{/number}","pushed_at":"2015-05-26T18:50:48Z","teams_url":"https://api.github.com/repos/mralexgray/AHLaunchCtl/teams","trees_url":"https://api.github.com/repos/mralexgray/AHLaunchCtl/git/trees{/sha}","created_at":"2015-06-14T21:31:03Z","events_url":"https://api.github.com/repos/mralexgray/AHLaunchCtl/events","has_issues":false,"issues_url":"https://api.github.com/repos/mralexgray/AHLaunchCtl/issues{/number}","labels_url":"https://api.github.com/repos/mralexgray/AHLaunchCtl/labels{/name}","merges_url":"https://api.github.com/repos/mralexgray/AHLaunchCtl/merges","mirror_url":null,"updated_at":"2015-06-14T21:31:04Z","visibility":"public","archive_url":"https://api.github.com/repos/mralexgray/AHLaunchCtl/{archive_format}{/ref}","commits_url":"https://api.github.com/repos/mralexgray/AHLaunchCtl/commits{/sha}","compare_url":"https://api.github.com/repos/mralexgray/AHLaunchCtl/compare/{base}...{head}","description":"LaunchD Framework for Cocoa Apps","forks_count":0,"is_template":false,"open_issues":0,"branches_url":"https://api.github.com/repos/mralexgray/AHLaunchCtl/branches{/branch}","comments_url":"https://api.github.com/repos/mralexgray/AHLaunchCtl/comments{/number}","contents_url":"https://api.github.com/repos/mralexgray/AHLaunchCtl/contents/{+path}","git_refs_url":"https://api.github.com/repos/mralexgray/AHLaunchCtl/git/refs{/sha}","git_tags_url":"https://api.github.com/repos/mralexgray/AHLaunchCtl/git/tags{/sha}","has_projects":true,"releases_url":"https://api.github.com/repos/mralexgray/AHLaunchCtl/releases{/id}","statuses_url":"https://api.github.com/repos/mralexgray/AHLaunchCtl/statuses/{sha}","allow_forking":true,"assignees_url":"https://api.github.com/repos/mralexgray/AHLaunchCtl/assignees{/user}","downloads_url":"https://api.github.com/repos/mralexgray/AHLaunchCtl/downloads","has_downloads":true,"languages_url":"https://api.github.com/repos/mralexgray/AHLaunchCtl/languages","default_branch":"master","milestones_url":"https://api.github.com/repos/mralexgray/AHLaunchCtl/milestones{/number}","stargazers_url":"https://api.github.com/repos/mralexgray/AHLaunchCtl/stargazers","watchers_count":0,"deployments_url":"https://api.github.com/repos/mralexgray/AHLaunchCtl/deployments","git_commits_url":"https://api.github.com/repos/mralexgray/AHLaunchCtl/git/commits{/sha}","subscribers_url":"https://api.github.com/repos/mralexgray/AHLaunchCtl/subscribers","contributors_url":"https://api.github.com/repos/mralexgray/AHLaunchCtl/contributors","issue_events_url":"https://api.github.com/repos/mralexgray/AHLaunchCtl/issues/events{/number}","stargazers_count":0,"subscription_url":"https://api.github.com/repos/mralexgray/AHLaunchCtl/subscription","collaborators_url":"https://api.github.com/repos/mralexgray/AHLaunchCtl/collaborators{/collaborator}","issue_comment_url":"https://api.github.com/repos/mralexgray/AHLaunchCtl/issues/comments{/number}","notifications_url":"https://api.github.com/repos/mralexgray/AHLaunchCtl/notifications{?since,all,participating}","open_issues_count":0,"web_commit_signoff_required":false},{"id":9167473,"url":"https://api.github.com/repos/mralexgray/AHLayout","fork":true,"name":"AHLayout","size":359,"forks":0,"owner":{"id":262517,"url":"https://api.github.com/users/mralexgray","type":"User","login":"mralexgray","node_id":"MDQ6VXNlcjI2MjUxNw==","html_url":"https://github.com/mralexgray","gists_url":"https://api.github.com/users/mralexgray/gists{/gist_id}","repos_url":"https://api.github.com/users/mralexgray/repos","avatar_url":"https://avatars.githubusercontent.com/u/262517?v=4","events_url":"https://api.github.com/users/mralexgray/events{/privacy}","site_admin":false,"gravatar_id":"","starred_url":"https://api.github.com/users/mralexgray/starred{/owner}{/repo}","followers_url":"https://api.github.com/users/mralexgray/followers","following_url":"https://api.github.com/users/mralexgray/following{/other_user}","organizations_url":"https://api.github.com/users/mralexgray/orgs","subscriptions_url":"https://api.github.com/users/mralexgray/subscriptions","received_events_url":"https://api.github.com/users/mralexgray/received_events"},"topics":[],"git_url":"git://github.com/mralexgray/AHLayout.git","license":null,"node_id":"MDEwOlJlcG9zaXRvcnk5MTY3NDcz","private":false,"ssh_url":"git@github.com:mralexgray/AHLayout.git","svn_url":"https://github.com/mralexgray/AHLayout","archived":false,"disabled":false,"has_wiki":true,"homepage":null,"html_url":"https://github.com/mralexgray/AHLayout","keys_url":"https://api.github.com/repos/mralexgray/AHLayout/keys{/key_id}","language":"Objective-C","tags_url":"https://api.github.com/repos/mralexgray/AHLayout/tags","watchers":0,"blobs_url":"https://api.github.com/repos/mralexgray/AHLayout/git/blobs{/sha}","clone_url":"https://github.com/mralexgray/AHLayout.git","forks_url":"https://api.github.com/repos/mralexgray/AHLayout/forks","full_name":"mralexgray/AHLayout","has_pages":false,"hooks_url":"https://api.github.com/repos/mralexgray/AHLayout/hooks","pulls_url":"https://api.github.com/repos/mralexgray/AHLayout/pulls{/number}","pushed_at":"2013-07-08T02:31:14Z","teams_url":"https://api.github.com/repos/mralexgray/AHLayout/teams","trees_url":"https://api.github.com/repos/mralexgray/AHLayout/git/trees{/sha}","created_at":"2013-04-02T10:10:30Z","events_url":"https://api.github.com/repos/mralexgray/AHLayout/events","has_issues":false,"issues_url":"https://api.github.com/repos/mralexgray/AHLayout/issues{/number}","labels_url":"https://api.github.com/repos/mralexgray/AHLayout/labels{/name}","merges_url":"https://api.github.com/repos/mralexgray/AHLayout/merges","mirror_url":null,"updated_at":"2013-07-08T02:31:17Z","visibility":"public","archive_url":"https://api.github.com/repos/mralexgray/AHLayout/{archive_format}{/ref}","commits_url":"https://api.github.com/repos/mralexgray/AHLayout/commits{/sha}","compare_url":"https://api.github.com/repos/mralexgray/AHLayout/compare/{base}...{head}","description":"AHLayout","forks_count":0,"is_template":false,"open_issues":0,"branches_url":"https://api.github.com/repos/mralexgray/AHLayout/branches{/branch}","comments_url":"https://api.github.com/repos/mralexgray/AHLayout/comments{/number}","contents_url":"https://api.github.com/repos/mralexgray/AHLayout/contents/{+path}","git_refs_url":"https://api.github.com/repos/mralexgray/AHLayout/git/refs{/sha}","git_tags_url":"https://api.github.com/repos/mralexgray/AHLayout/git/tags{/sha}","has_projects":true,"releases_url":"https://api.github.com/repos/mralexgray/AHLayout/releases{/id}","statuses_url":"https://api.github.com/repos/mralexgray/AHLayout/statuses/{sha}","allow_forking":true,"assignees_url":"https://api.github.com/repos/mralexgray/AHLayout/assignees{/user}","downloads_url":"https://api.github.com/repos/mralexgray/AHLayout/downloads","has_downloads":true,"languages_url":"https://api.github.com/repos/mralexgray/AHLayout/languages","default_branch":"master","milestones_url":"https://api.github.com/repos/mralexgray/AHLayout/milestones{/number}","stargazers_url":"https://api.github.com/repos/mralexgray/AHLayout/stargazers","watchers_count":0,"deployments_url":"https://api.github.com/repos/mralexgray/AHLayout/deployments","git_commits_url":"https://api.github.com/repos/mralexgray/AHLayout/git/commits{/sha}","subscribers_url":"https://api.github.com/repos/mralexgray/AHLayout/subscribers","contributors_url":"https://api.github.com/repos/mralexgray/AHLayout/contributors","issue_events_url":"https://api.github.com/repos/mralexgray/AHLayout/issues/events{/number}","stargazers_count":0,"subscription_url":"https://api.github.com/repos/mralexgray/AHLayout/subscription","collaborators_url":"https://api.github.com/repos/mralexgray/AHLayout/collaborators{/collaborator}","issue_comment_url":"https://api.github.com/repos/mralexgray/AHLayout/issues/comments{/number}","notifications_url":"https://api.github.com/repos/mralexgray/AHLayout/notifications{?since,all,participating}","open_issues_count":0,"web_commit_signoff_required":false},{"id":18450201,"url":"https://api.github.com/repos/mralexgray/Airmail-Plug-In-Framework","fork":true,"name":"Airmail-Plug-In-Framework","size":888,"forks":0,"owner":{"id":262517,"url":"https://api.github.com/users/mralexgray","type":"User","login":"mralexgray","node_id":"MDQ6VXNlcjI2MjUxNw==","html_url":"https://github.com/mralexgray","gists_url":"https://api.github.com/users/mralexgray/gists{/gist_id}","repos_url":"https://api.github.com/users/mralexgray/repos","avatar_url":"https://avatars.githubusercontent.com/u/262517?v=4","events_url":"https://api.github.com/users/mralexgray/events{/privacy}","site_admin":false,"gravatar_id":"","starred_url":"https://api.github.com/users/mralexgray/starred{/owner}{/repo}","followers_url":"https://api.github.com/users/mralexgray/followers","following_url":"https://api.github.com/users/mralexgray/following{/other_user}","organizations_url":"https://api.github.com/users/mralexgray/orgs","subscriptions_url":"https://api.github.com/users/mralexgray/subscriptions","received_events_url":"https://api.github.com/users/mralexgray/received_events"},"topics":[],"git_url":"git://github.com/mralexgray/Airmail-Plug-In-Framework.git","license":{"key":"gpl-2.0","url":"https://api.github.com/licenses/gpl-2.0","name":"GNU General Public License v2.0","node_id":"MDc6TGljZW5zZTg=","spdx_id":"GPL-2.0"},"node_id":"MDEwOlJlcG9zaXRvcnkxODQ1MDIwMQ==","private":false,"ssh_url":"git@github.com:mralexgray/Airmail-Plug-In-Framework.git","svn_url":"https://github.com/mralexgray/Airmail-Plug-In-Framework","archived":false,"disabled":false,"has_wiki":true,"homepage":null,"html_url":"https://github.com/mralexgray/Airmail-Plug-In-Framework","keys_url":"https://api.github.com/repos/mralexgray/Airmail-Plug-In-Framework/keys{/key_id}","language":null,"tags_url":"https://api.github.com/repos/mralexgray/Airmail-Plug-In-Framework/tags","watchers":0,"blobs_url":"https://api.github.com/repos/mralexgray/Airmail-Plug-In-Framework/git/blobs{/sha}","clone_url":"https://github.com/mralexgray/Airmail-Plug-In-Framework.git","forks_url":"https://api.github.com/repos/mralexgray/Airmail-Plug-In-Framework/forks","full_name":"mralexgray/Airmail-Plug-In-Framework","has_pages":false,"hooks_url":"https://api.github.com/repos/mralexgray/Airmail-Plug-In-Framework/hooks","pulls_url":"https://api.github.com/repos/mralexgray/Airmail-Plug-In-Framework/pulls{/number}","pushed_at":"2014-03-27T15:42:19Z","teams_url":"https://api.github.com/repos/mralexgray/Airmail-Plug-In-Framework/teams","trees_url":"https://api.github.com/repos/mralexgray/Airmail-Plug-In-Framework/git/trees{/sha}","created_at":"2014-04-04T19:33:54Z","events_url":"https://api.github.com/repos/mralexgray/Airmail-Plug-In-Framework/events","has_issues":false,"issues_url":"https://api.github.com/repos/mralexgray/Airmail-Plug-In-Framework/issues{/number}","labels_url":"https://api.github.com/repos/mralexgray/Airmail-Plug-In-Framework/labels{/name}","merges_url":"https://api.github.com/repos/mralexgray/Airmail-Plug-In-Framework/merges","mirror_url":null,"updated_at":"2014-11-23T19:31:04Z","visibility":"public","archive_url":"https://api.github.com/repos/mralexgray/Airmail-Plug-In-Framework/{archive_format}{/ref}","commits_url":"https://api.github.com/repos/mralexgray/Airmail-Plug-In-Framework/commits{/sha}","compare_url":"https://api.github.com/repos/mralexgray/Airmail-Plug-In-Framework/compare/{base}...{head}","description":null,"forks_count":0,"is_template":false,"open_issues":0,"branches_url":"https://api.github.com/repos/mralexgray/Airmail-Plug-In-Framework/branches{/branch}","comments_url":"https://api.github.com/repos/mralexgray/Airmail-Plug-In-Framework/comments{/number}","contents_url":"https://api.github.com/repos/mralexgray/Airmail-Plug-In-Framework/contents/{+path}","git_refs_url":"https://api.github.com/repos/mralexgray/Airmail-Plug-In-Framework/git/refs{/sha}","git_tags_url":"https://api.github.com/repos/mralexgray/Airmail-Plug-In-Framework/git/tags{/sha}","has_projects":true,"releases_url":"https://api.github.com/repos/mralexgray/Airmail-Plug-In-Framework/releases{/id}","statuses_url":"https://api.github.com/repos/mralexgray/Airmail-Plug-In-Framework/statuses/{sha}","allow_forking":true,"assignees_url":"https://api.github.com/repos/mralexgray/Airmail-Plug-In-Framework/assignees{/user}","downloads_url":"https://api.github.com/repos/mralexgray/Airmail-Plug-In-Framework/downloads","has_downloads":true,"languages_url":"https://api.github.com/repos/mralexgray/Airmail-Plug-In-Framework/languages","default_branch":"master","milestones_url":"https://api.github.com/repos/mralexgray/Airmail-Plug-In-Framework/milestones{/number}","stargazers_url":"https://api.github.com/repos/mralexgray/Airmail-Plug-In-Framework/stargazers","watchers_count":0,"deployments_url":"https://api.github.com/repos/mralexgray/Airmail-Plug-In-Framework/deployments","git_commits_url":"https://api.github.com/repos/mralexgray/Airmail-Plug-In-Framework/git/commits{/sha}","subscribers_url":"https://api.github.com/repos/mralexgray/Airmail-Plug-In-Framework/subscribers","contributors_url":"https://api.github.com/repos/mralexgray/Airmail-Plug-In-Framework/contributors","issue_events_url":"https://api.github.com/repos/mralexgray/Airmail-Plug-In-Framework/issues/events{/number}","stargazers_count":0,"subscription_url":"https://api.github.com/repos/mralexgray/Airmail-Plug-In-Framework/subscription","collaborators_url":"https://api.github.com/repos/mralexgray/Airmail-Plug-In-Framework/collaborators{/collaborator}","issue_comment_url":"https://api.github.com/repos/mralexgray/Airmail-Plug-In-Framework/issues/comments{/number}","notifications_url":"https://api.github.com/repos/mralexgray/Airmail-Plug-In-Framework/notifications{?since,all,participating}","open_issues_count":0,"web_commit_signoff_required":false},{"id":5203219,"url":"https://api.github.com/repos/mralexgray/AJS-iTunes-API","fork":true,"name":"AJS-iTunes-API","size":103,"forks":0,"owner":{"id":262517,"url":"https://api.github.com/users/mralexgray","type":"User","login":"mralexgray","node_id":"MDQ6VXNlcjI2MjUxNw==","html_url":"https://github.com/mralexgray","gists_url":"https://api.github.com/users/mralexgray/gists{/gist_id}","repos_url":"https://api.github.com/users/mralexgray/repos","avatar_url":"https://avatars.githubusercontent.com/u/262517?v=4","events_url":"https://api.github.com/users/mralexgray/events{/privacy}","site_admin":false,"gravatar_id":"","starred_url":"https://api.github.com/users/mralexgray/starred{/owner}{/repo}","followers_url":"https://api.github.com/users/mralexgray/followers","following_url":"https://api.github.com/users/mralexgray/following{/other_user}","organizations_url":"https://api.github.com/users/mralexgray/orgs","subscriptions_url":"https://api.github.com/users/mralexgray/subscriptions","received_events_url":"https://api.github.com/users/mralexgray/received_events"},"topics":[],"git_url":"git://github.com/mralexgray/AJS-iTunes-API.git","license":null,"node_id":"MDEwOlJlcG9zaXRvcnk1MjAzMjE5","private":false,"ssh_url":"git@github.com:mralexgray/AJS-iTunes-API.git","svn_url":"https://github.com/mralexgray/AJS-iTunes-API","archived":false,"disabled":false,"has_wiki":true,"homepage":"","html_url":"https://github.com/mralexgray/AJS-iTunes-API","keys_url":"https://api.github.com/repos/mralexgray/AJS-iTunes-API/keys{/key_id}","language":"Objective-C","tags_url":"https://api.github.com/repos/mralexgray/AJS-iTunes-API/tags","watchers":2,"blobs_url":"https://api.github.com/repos/mralexgray/AJS-iTunes-API/git/blobs{/sha}","clone_url":"https://github.com/mralexgray/AJS-iTunes-API.git","forks_url":"https://api.github.com/repos/mralexgray/AJS-iTunes-API/forks","full_name":"mralexgray/AJS-iTunes-API","has_pages":false,"hooks_url":"https://api.github.com/repos/mralexgray/AJS-iTunes-API/hooks","pulls_url":"https://api.github.com/repos/mralexgray/AJS-iTunes-API/pulls{/number}","pushed_at":"2011-10-30T22:26:48Z","teams_url":"https://api.github.com/repos/mralexgray/AJS-iTunes-API/teams","trees_url":"https://api.github.com/repos/mralexgray/AJS-iTunes-API/git/trees{/sha}","created_at":"2012-07-27T10:20:58Z","events_url":"https://api.github.com/repos/mralexgray/AJS-iTunes-API/events","has_issues":false,"issues_url":"https://api.github.com/repos/mralexgray/AJS-iTunes-API/issues{/number}","labels_url":"https://api.github.com/repos/mralexgray/AJS-iTunes-API/labels{/name}","merges_url":"https://api.github.com/repos/mralexgray/AJS-iTunes-API/merges","mirror_url":null,"updated_at":"2013-01-11T11:00:05Z","visibility":"public","archive_url":"https://api.github.com/repos/mralexgray/AJS-iTunes-API/{archive_format}{/ref}","commits_url":"https://api.github.com/repos/mralexgray/AJS-iTunes-API/commits{/sha}","compare_url":"https://api.github.com/repos/mralexgray/AJS-iTunes-API/compare/{base}...{head}","description":"Cocoa wrapper for the iTunes search API - for iOS and Mac OSX projects","forks_count":0,"is_template":false,"open_issues":0,"branches_url":"https://api.github.com/repos/mralexgray/AJS-iTunes-API/branches{/branch}","comments_url":"https://api.github.com/repos/mralexgray/AJS-iTunes-API/comments{/number}","contents_url":"https://api.github.com/repos/mralexgray/AJS-iTunes-API/contents/{+path}","git_refs_url":"https://api.github.com/repos/mralexgray/AJS-iTunes-API/git/refs{/sha}","git_tags_url":"https://api.github.com/repos/mralexgray/AJS-iTunes-API/git/tags{/sha}","has_projects":true,"releases_url":"https://api.github.com/repos/mralexgray/AJS-iTunes-API/releases{/id}","statuses_url":"https://api.github.com/repos/mralexgray/AJS-iTunes-API/statuses/{sha}","allow_forking":true,"assignees_url":"https://api.github.com/repos/mralexgray/AJS-iTunes-API/assignees{/user}","downloads_url":"https://api.github.com/repos/mralexgray/AJS-iTunes-API/downloads","has_downloads":true,"languages_url":"https://api.github.com/repos/mralexgray/AJS-iTunes-API/languages","default_branch":"master","milestones_url":"https://api.github.com/repos/mralexgray/AJS-iTunes-API/milestones{/number}","stargazers_url":"https://api.github.com/repos/mralexgray/AJS-iTunes-API/stargazers","watchers_count":2,"deployments_url":"https://api.github.com/repos/mralexgray/AJS-iTunes-API/deployments","git_commits_url":"https://api.github.com/repos/mralexgray/AJS-iTunes-API/git/commits{/sha}","subscribers_url":"https://api.github.com/repos/mralexgray/AJS-iTunes-API/subscribers","contributors_url":"https://api.github.com/repos/mralexgray/AJS-iTunes-API/contributors","issue_events_url":"https://api.github.com/repos/mralexgray/AJS-iTunes-API/issues/events{/number}","stargazers_count":2,"subscription_url":"https://api.github.com/repos/mralexgray/AJS-iTunes-API/subscription","collaborators_url":"https://api.github.com/repos/mralexgray/AJS-iTunes-API/collaborators{/collaborator}","issue_comment_url":"https://api.github.com/repos/mralexgray/AJS-iTunes-API/issues/comments{/number}","notifications_url":"https://api.github.com/repos/mralexgray/AJS-iTunes-API/notifications{?since,all,participating}","open_issues_count":0,"web_commit_signoff_required":false},{"id":10093801,"url":"https://api.github.com/repos/mralexgray/Alcatraz","fork":true,"name":"Alcatraz","size":3668,"forks":0,"owner":{"id":262517,"url":"https://api.github.com/users/mralexgray","type":"User","login":"mralexgray","node_id":"MDQ6VXNlcjI2MjUxNw==","html_url":"https://github.com/mralexgray","gists_url":"https://api.github.com/users/mralexgray/gists{/gist_id}","repos_url":"https://api.github.com/users/mralexgray/repos","avatar_url":"https://avatars.githubusercontent.com/u/262517?v=4","events_url":"https://api.github.com/users/mralexgray/events{/privacy}","site_admin":false,"gravatar_id":"","starred_url":"https://api.github.com/users/mralexgray/starred{/owner}{/repo}","followers_url":"https://api.github.com/users/mralexgray/followers","following_url":"https://api.github.com/users/mralexgray/following{/other_user}","organizations_url":"https://api.github.com/users/mralexgray/orgs","subscriptions_url":"https://api.github.com/users/mralexgray/subscriptions","received_events_url":"https://api.github.com/users/mralexgray/received_events"},"topics":[],"git_url":"git://github.com/mralexgray/Alcatraz.git","license":{"key":"mit","url":"https://api.github.com/licenses/mit","name":"MIT License","node_id":"MDc6TGljZW5zZTEz","spdx_id":"MIT"},"node_id":"MDEwOlJlcG9zaXRvcnkxMDA5MzgwMQ==","private":false,"ssh_url":"git@github.com:mralexgray/Alcatraz.git","svn_url":"https://github.com/mralexgray/Alcatraz","archived":false,"disabled":false,"has_wiki":false,"homepage":"mneorr.github.com/Alcatraz","html_url":"https://github.com/mralexgray/Alcatraz","keys_url":"https://api.github.com/repos/mralexgray/Alcatraz/keys{/key_id}","language":"Objective-C","tags_url":"https://api.github.com/repos/mralexgray/Alcatraz/tags","watchers":0,"blobs_url":"https://api.github.com/repos/mralexgray/Alcatraz/git/blobs{/sha}","clone_url":"https://github.com/mralexgray/Alcatraz.git","forks_url":"https://api.github.com/repos/mralexgray/Alcatraz/forks","full_name":"mralexgray/Alcatraz","has_pages":false,"hooks_url":"https://api.github.com/repos/mralexgray/Alcatraz/hooks","pulls_url":"https://api.github.com/repos/mralexgray/Alcatraz/pulls{/number}","pushed_at":"2014-03-19T12:50:37Z","teams_url":"https://api.github.com/repos/mralexgray/Alcatraz/teams","trees_url":"https://api.github.com/repos/mralexgray/Alcatraz/git/trees{/sha}","created_at":"2013-05-16T04:41:13Z","events_url":"https://api.github.com/repos/mralexgray/Alcatraz/events","has_issues":false,"issues_url":"https://api.github.com/repos/mralexgray/Alcatraz/issues{/number}","labels_url":"https://api.github.com/repos/mralexgray/Alcatraz/labels{/name}","merges_url":"https://api.github.com/repos/mralexgray/Alcatraz/merges","mirror_url":null,"updated_at":"2014-03-19T20:38:35Z","visibility":"public","archive_url":"https://api.github.com/repos/mralexgray/Alcatraz/{archive_format}{/ref}","commits_url":"https://api.github.com/repos/mralexgray/Alcatraz/commits{/sha}","compare_url":"https://api.github.com/repos/mralexgray/Alcatraz/compare/{base}...{head}","description":"The most awesome (and only) Xcode package manager!","forks_count":0,"is_template":false,"open_issues":0,"branches_url":"https://api.github.com/repos/mralexgray/Alcatraz/branches{/branch}","comments_url":"https://api.github.com/repos/mralexgray/Alcatraz/comments{/number}","contents_url":"https://api.github.com/repos/mralexgray/Alcatraz/contents/{+path}","git_refs_url":"https://api.github.com/repos/mralexgray/Alcatraz/git/refs{/sha}","git_tags_url":"https://api.github.com/repos/mralexgray/Alcatraz/git/tags{/sha}","has_projects":true,"releases_url":"https://api.github.com/repos/mralexgray/Alcatraz/releases{/id}","statuses_url":"https://api.github.com/repos/mralexgray/Alcatraz/statuses/{sha}","allow_forking":true,"assignees_url":"https://api.github.com/repos/mralexgray/Alcatraz/assignees{/user}","downloads_url":"https://api.github.com/repos/mralexgray/Alcatraz/downloads","has_downloads":true,"languages_url":"https://api.github.com/repos/mralexgray/Alcatraz/languages","default_branch":"master","milestones_url":"https://api.github.com/repos/mralexgray/Alcatraz/milestones{/number}","stargazers_url":"https://api.github.com/repos/mralexgray/Alcatraz/stargazers","watchers_count":0,"deployments_url":"https://api.github.com/repos/mralexgray/Alcatraz/deployments","git_commits_url":"https://api.github.com/repos/mralexgray/Alcatraz/git/commits{/sha}","subscribers_url":"https://api.github.com/repos/mralexgray/Alcatraz/subscribers","contributors_url":"https://api.github.com/repos/mralexgray/Alcatraz/contributors","issue_events_url":"https://api.github.com/repos/mralexgray/Alcatraz/issues/events{/number}","stargazers_count":0,"subscription_url":"https://api.github.com/repos/mralexgray/Alcatraz/subscription","collaborators_url":"https://api.github.com/repos/mralexgray/Alcatraz/collaborators{/collaborator}","issue_comment_url":"https://api.github.com/repos/mralexgray/Alcatraz/issues/comments{/number}","notifications_url":"https://api.github.com/repos/mralexgray/Alcatraz/notifications{?since,all,participating}","open_issues_count":0,"web_commit_signoff_required":false},{"id":12916552,"url":"https://api.github.com/repos/mralexgray/alcatraz-packages","fork":true,"name":"alcatraz-packages","size":826,"forks":0,"owner":{"id":262517,"url":"https://api.github.com/users/mralexgray","type":"User","login":"mralexgray","node_id":"MDQ6VXNlcjI2MjUxNw==","html_url":"https://github.com/mralexgray","gists_url":"https://api.github.com/users/mralexgray/gists{/gist_id}","repos_url":"https://api.github.com/users/mralexgray/repos","avatar_url":"https://avatars.githubusercontent.com/u/262517?v=4","events_url":"https://api.github.com/users/mralexgray/events{/privacy}","site_admin":false,"gravatar_id":"","starred_url":"https://api.github.com/users/mralexgray/starred{/owner}{/repo}","followers_url":"https://api.github.com/users/mralexgray/followers","following_url":"https://api.github.com/users/mralexgray/following{/other_user}","organizations_url":"https://api.github.com/users/mralexgray/orgs","subscriptions_url":"https://api.github.com/users/mralexgray/subscriptions","received_events_url":"https://api.github.com/users/mralexgray/received_events"},"topics":[],"git_url":"git://github.com/mralexgray/alcatraz-packages.git","license":null,"node_id":"MDEwOlJlcG9zaXRvcnkxMjkxNjU1Mg==","private":false,"ssh_url":"git@github.com:mralexgray/alcatraz-packages.git","svn_url":"https://github.com/mralexgray/alcatraz-packages","archived":false,"disabled":false,"has_wiki":true,"homepage":"mneorr.github.com/Alcatraz","html_url":"https://github.com/mralexgray/alcatraz-packages","keys_url":"https://api.github.com/repos/mralexgray/alcatraz-packages/keys{/key_id}","language":"Ruby","tags_url":"https://api.github.com/repos/mralexgray/alcatraz-packages/tags","watchers":0,"blobs_url":"https://api.github.com/repos/mralexgray/alcatraz-packages/git/blobs{/sha}","clone_url":"https://github.com/mralexgray/alcatraz-packages.git","forks_url":"https://api.github.com/repos/mralexgray/alcatraz-packages/forks","full_name":"mralexgray/alcatraz-packages","has_pages":false,"hooks_url":"https://api.github.com/repos/mralexgray/alcatraz-packages/hooks","pulls_url":"https://api.github.com/repos/mralexgray/alcatraz-packages/pulls{/number}","pushed_at":"2015-12-14T16:21:31Z","teams_url":"https://api.github.com/repos/mralexgray/alcatraz-packages/teams","trees_url":"https://api.github.com/repos/mralexgray/alcatraz-packages/git/trees{/sha}","created_at":"2013-09-18T07:15:24Z","events_url":"https://api.github.com/repos/mralexgray/alcatraz-packages/events","has_issues":false,"issues_url":"https://api.github.com/repos/mralexgray/alcatraz-packages/issues{/number}","labels_url":"https://api.github.com/repos/mralexgray/alcatraz-packages/labels{/name}","merges_url":"https://api.github.com/repos/mralexgray/alcatraz-packages/merges","mirror_url":null,"updated_at":"2015-11-10T20:52:30Z","visibility":"public","archive_url":"https://api.github.com/repos/mralexgray/alcatraz-packages/{archive_format}{/ref}","commits_url":"https://api.github.com/repos/mralexgray/alcatraz-packages/commits{/sha}","compare_url":"https://api.github.com/repos/mralexgray/alcatraz-packages/compare/{base}...{head}","description":"Package list repository for Alcatraz","forks_count":0,"is_template":false,"open_issues":0,"branches_url":"https://api.github.com/repos/mralexgray/alcatraz-packages/branches{/branch}","comments_url":"https://api.github.com/repos/mralexgray/alcatraz-packages/comments{/number}","contents_url":"https://api.github.com/repos/mralexgray/alcatraz-packages/contents/{+path}","git_refs_url":"https://api.github.com/repos/mralexgray/alcatraz-packages/git/refs{/sha}","git_tags_url":"https://api.github.com/repos/mralexgray/alcatraz-packages/git/tags{/sha}","has_projects":true,"releases_url":"https://api.github.com/repos/mralexgray/alcatraz-packages/releases{/id}","statuses_url":"https://api.github.com/repos/mralexgray/alcatraz-packages/statuses/{sha}","allow_forking":true,"assignees_url":"https://api.github.com/repos/mralexgray/alcatraz-packages/assignees{/user}","downloads_url":"https://api.github.com/repos/mralexgray/alcatraz-packages/downloads","has_downloads":true,"languages_url":"https://api.github.com/repos/mralexgray/alcatraz-packages/languages","default_branch":"master","milestones_url":"https://api.github.com/repos/mralexgray/alcatraz-packages/milestones{/number}","stargazers_url":"https://api.github.com/repos/mralexgray/alcatraz-packages/stargazers","watchers_count":0,"deployments_url":"https://api.github.com/repos/mralexgray/alcatraz-packages/deployments","git_commits_url":"https://api.github.com/repos/mralexgray/alcatraz-packages/git/commits{/sha}","subscribers_url":"https://api.github.com/repos/mralexgray/alcatraz-packages/subscribers","contributors_url":"https://api.github.com/repos/mralexgray/alcatraz-packages/contributors","issue_events_url":"https://api.github.com/repos/mralexgray/alcatraz-packages/issues/events{/number}","stargazers_count":0,"subscription_url":"https://api.github.com/repos/mralexgray/alcatraz-packages/subscription","collaborators_url":"https://api.github.com/repos/mralexgray/alcatraz-packages/collaborators{/collaborator}","issue_comment_url":"https://api.github.com/repos/mralexgray/alcatraz-packages/issues/comments{/number}","notifications_url":"https://api.github.com/repos/mralexgray/alcatraz-packages/notifications{?since,all,participating}","open_issues_count":0,"web_commit_signoff_required":false},{"id":44278362,"url":"https://api.github.com/repos/mralexgray/alexicons","fork":true,"name":"alexicons","size":257,"forks":0,"owner":{"id":262517,"url":"https://api.github.com/users/mralexgray","type":"User","login":"mralexgray","node_id":"MDQ6VXNlcjI2MjUxNw==","html_url":"https://github.com/mralexgray","gists_url":"https://api.github.com/users/mralexgray/gists{/gist_id}","repos_url":"https://api.github.com/users/mralexgray/repos","avatar_url":"https://avatars.githubusercontent.com/u/262517?v=4","events_url":"https://api.github.com/users/mralexgray/events{/privacy}","site_admin":false,"gravatar_id":"","starred_url":"https://api.github.com/users/mralexgray/starred{/owner}{/repo}","followers_url":"https://api.github.com/users/mralexgray/followers","following_url":"https://api.github.com/users/mralexgray/following{/other_user}","organizations_url":"https://api.github.com/users/mralexgray/orgs","subscriptions_url":"https://api.github.com/users/mralexgray/subscriptions","received_events_url":"https://api.github.com/users/mralexgray/received_events"},"topics":[],"git_url":"git://github.com/mralexgray/alexicons.git","license":null,"node_id":"MDEwOlJlcG9zaXRvcnk0NDI3ODM2Mg==","private":false,"ssh_url":"git@github.com:mralexgray/alexicons.git","svn_url":"https://github.com/mralexgray/alexicons","archived":false,"disabled":false,"has_wiki":false,"homepage":null,"html_url":"https://github.com/mralexgray/alexicons","keys_url":"https://api.github.com/repos/mralexgray/alexicons/keys{/key_id}","language":"CoffeeScript","tags_url":"https://api.github.com/repos/mralexgray/alexicons/tags","watchers":0,"blobs_url":"https://api.github.com/repos/mralexgray/alexicons/git/blobs{/sha}","clone_url":"https://github.com/mralexgray/alexicons.git","forks_url":"https://api.github.com/repos/mralexgray/alexicons/forks","full_name":"mralexgray/alexicons","has_pages":false,"hooks_url":"https://api.github.com/repos/mralexgray/alexicons/hooks","pulls_url":"https://api.github.com/repos/mralexgray/alexicons/pulls{/number}","pushed_at":"2015-10-16T03:57:51Z","teams_url":"https://api.github.com/repos/mralexgray/alexicons/teams","trees_url":"https://api.github.com/repos/mralexgray/alexicons/git/trees{/sha}","created_at":"2015-10-14T21:49:39Z","events_url":"https://api.github.com/repos/mralexgray/alexicons/events","has_issues":false,"issues_url":"https://api.github.com/repos/mralexgray/alexicons/issues{/number}","labels_url":"https://api.github.com/repos/mralexgray/alexicons/labels{/name}","merges_url":"https://api.github.com/repos/mralexgray/alexicons/merges","mirror_url":null,"updated_at":"2015-10-15T06:20:08Z","visibility":"public","archive_url":"https://api.github.com/repos/mralexgray/alexicons/{archive_format}{/ref}","commits_url":"https://api.github.com/repos/mralexgray/alexicons/commits{/sha}","compare_url":"https://api.github.com/repos/mralexgray/alexicons/compare/{base}...{head}","description":"Get popular cat names","forks_count":0,"is_template":false,"open_issues":0,"branches_url":"https://api.github.com/repos/mralexgray/alexicons/branches{/branch}","comments_url":"https://api.github.com/repos/mralexgray/alexicons/comments{/number}","contents_url":"https://api.github.com/repos/mralexgray/alexicons/contents/{+path}","git_refs_url":"https://api.github.com/repos/mralexgray/alexicons/git/refs{/sha}","git_tags_url":"https://api.github.com/repos/mralexgray/alexicons/git/tags{/sha}","has_projects":true,"releases_url":"https://api.github.com/repos/mralexgray/alexicons/releases{/id}","statuses_url":"https://api.github.com/repos/mralexgray/alexicons/statuses/{sha}","allow_forking":true,"assignees_url":"https://api.github.com/repos/mralexgray/alexicons/assignees{/user}","downloads_url":"https://api.github.com/repos/mralexgray/alexicons/downloads","has_downloads":true,"languages_url":"https://api.github.com/repos/mralexgray/alexicons/languages","default_branch":"master","milestones_url":"https://api.github.com/repos/mralexgray/alexicons/milestones{/number}","stargazers_url":"https://api.github.com/repos/mralexgray/alexicons/stargazers","watchers_count":0,"deployments_url":"https://api.github.com/repos/mralexgray/alexicons/deployments","git_commits_url":"https://api.github.com/repos/mralexgray/alexicons/git/commits{/sha}","subscribers_url":"https://api.github.com/repos/mralexgray/alexicons/subscribers","contributors_url":"https://api.github.com/repos/mralexgray/alexicons/contributors","issue_events_url":"https://api.github.com/repos/mralexgray/alexicons/issues/events{/number}","stargazers_count":0,"subscription_url":"https://api.github.com/repos/mralexgray/alexicons/subscription","collaborators_url":"https://api.github.com/repos/mralexgray/alexicons/collaborators{/collaborator}","issue_comment_url":"https://api.github.com/repos/mralexgray/alexicons/issues/comments{/number}","notifications_url":"https://api.github.com/repos/mralexgray/alexicons/notifications{?since,all,participating}","open_issues_count":0,"web_commit_signoff_required":false},{"id":10476467,"url":"https://api.github.com/repos/mralexgray/Alfred-Google-Translate","fork":true,"name":"Alfred-Google-Translate","size":103,"forks":0,"owner":{"id":262517,"url":"https://api.github.com/users/mralexgray","type":"User","login":"mralexgray","node_id":"MDQ6VXNlcjI2MjUxNw==","html_url":"https://github.com/mralexgray","gists_url":"https://api.github.com/users/mralexgray/gists{/gist_id}","repos_url":"https://api.github.com/users/mralexgray/repos","avatar_url":"https://avatars.githubusercontent.com/u/262517?v=4","events_url":"https://api.github.com/users/mralexgray/events{/privacy}","site_admin":false,"gravatar_id":"","starred_url":"https://api.github.com/users/mralexgray/starred{/owner}{/repo}","followers_url":"https://api.github.com/users/mralexgray/followers","following_url":"https://api.github.com/users/mralexgray/following{/other_user}","organizations_url":"https://api.github.com/users/mralexgray/orgs","subscriptions_url":"https://api.github.com/users/mralexgray/subscriptions","received_events_url":"https://api.github.com/users/mralexgray/received_events"},"topics":[],"git_url":"git://github.com/mralexgray/Alfred-Google-Translate.git","license":null,"node_id":"MDEwOlJlcG9zaXRvcnkxMDQ3NjQ2Nw==","private":false,"ssh_url":"git@github.com:mralexgray/Alfred-Google-Translate.git","svn_url":"https://github.com/mralexgray/Alfred-Google-Translate","archived":false,"disabled":false,"has_wiki":true,"homepage":null,"html_url":"https://github.com/mralexgray/Alfred-Google-Translate","keys_url":"https://api.github.com/repos/mralexgray/Alfred-Google-Translate/keys{/key_id}","language":"Shell","tags_url":"https://api.github.com/repos/mralexgray/Alfred-Google-Translate/tags","watchers":0,"blobs_url":"https://api.github.com/repos/mralexgray/Alfred-Google-Translate/git/blobs{/sha}","clone_url":"https://github.com/mralexgray/Alfred-Google-Translate.git","forks_url":"https://api.github.com/repos/mralexgray/Alfred-Google-Translate/forks","full_name":"mralexgray/Alfred-Google-Translate","has_pages":false,"hooks_url":"https://api.github.com/repos/mralexgray/Alfred-Google-Translate/hooks","pulls_url":"https://api.github.com/repos/mralexgray/Alfred-Google-Translate/pulls{/number}","pushed_at":"2013-01-12T19:39:03Z","teams_url":"https://api.github.com/repos/mralexgray/Alfred-Google-Translate/teams","trees_url":"https://api.github.com/repos/mralexgray/Alfred-Google-Translate/git/trees{/sha}","created_at":"2013-06-04T10:45:10Z","events_url":"https://api.github.com/repos/mralexgray/Alfred-Google-Translate/events","has_issues":false,"issues_url":"https://api.github.com/repos/mralexgray/Alfred-Google-Translate/issues{/number}","labels_url":"https://api.github.com/repos/mralexgray/Alfred-Google-Translate/labels{/name}","merges_url":"https://api.github.com/repos/mralexgray/Alfred-Google-Translate/merges","mirror_url":null,"updated_at":"2013-06-04T10:45:10Z","visibility":"public","archive_url":"https://api.github.com/repos/mralexgray/Alfred-Google-Translate/{archive_format}{/ref}","commits_url":"https://api.github.com/repos/mralexgray/Alfred-Google-Translate/commits{/sha}","compare_url":"https://api.github.com/repos/mralexgray/Alfred-Google-Translate/compare/{base}...{head}","description":"Extension for Alfred that will do a Google translate for you","forks_count":0,"is_template":false,"open_issues":0,"branches_url":"https://api.github.com/repos/mralexgray/Alfred-Google-Translate/branches{/branch}","comments_url":"https://api.github.com/repos/mralexgray/Alfred-Google-Translate/comments{/number}","contents_url":"https://api.github.com/repos/mralexgray/Alfred-Google-Translate/contents/{+path}","git_refs_url":"https://api.github.com/repos/mralexgray/Alfred-Google-Translate/git/refs{/sha}","git_tags_url":"https://api.github.com/repos/mralexgray/Alfred-Google-Translate/git/tags{/sha}","has_projects":true,"releases_url":"https://api.github.com/repos/mralexgray/Alfred-Google-Translate/releases{/id}","statuses_url":"https://api.github.com/repos/mralexgray/Alfred-Google-Translate/statuses/{sha}","allow_forking":true,"assignees_url":"https://api.github.com/repos/mralexgray/Alfred-Google-Translate/assignees{/user}","downloads_url":"https://api.github.com/repos/mralexgray/Alfred-Google-Translate/downloads","has_downloads":true,"languages_url":"https://api.github.com/repos/mralexgray/Alfred-Google-Translate/languages","default_branch":"master","milestones_url":"https://api.github.com/repos/mralexgray/Alfred-Google-Translate/milestones{/number}","stargazers_url":"https://api.github.com/repos/mralexgray/Alfred-Google-Translate/stargazers","watchers_count":0,"deployments_url":"https://api.github.com/repos/mralexgray/Alfred-Google-Translate/deployments","git_commits_url":"https://api.github.com/repos/mralexgray/Alfred-Google-Translate/git/commits{/sha}","subscribers_url":"https://api.github.com/repos/mralexgray/Alfred-Google-Translate/subscribers","contributors_url":"https://api.github.com/repos/mralexgray/Alfred-Google-Translate/contributors","issue_events_url":"https://api.github.com/repos/mralexgray/Alfred-Google-Translate/issues/events{/number}","stargazers_count":0,"subscription_url":"https://api.github.com/repos/mralexgray/Alfred-Google-Translate/subscription","collaborators_url":"https://api.github.com/repos/mralexgray/Alfred-Google-Translate/collaborators{/collaborator}","issue_comment_url":"https://api.github.com/repos/mralexgray/Alfred-Google-Translate/issues/comments{/number}","notifications_url":"https://api.github.com/repos/mralexgray/Alfred-Google-Translate/notifications{?since,all,participating}","open_issues_count":0,"web_commit_signoff_required":false},{"id":5524019,"url":"https://api.github.com/repos/mralexgray/Amber","fork":false,"name":"Amber","size":48,"forks":0,"owner":{"id":262517,"url":"https://api.github.com/users/mralexgray","type":"User","login":"mralexgray","node_id":"MDQ6VXNlcjI2MjUxNw==","html_url":"https://github.com/mralexgray","gists_url":"https://api.github.com/users/mralexgray/gists{/gist_id}","repos_url":"https://api.github.com/users/mralexgray/repos","avatar_url":"https://avatars.githubusercontent.com/u/262517?v=4","events_url":"https://api.github.com/users/mralexgray/events{/privacy}","site_admin":false,"gravatar_id":"","starred_url":"https://api.github.com/users/mralexgray/starred{/owner}{/repo}","followers_url":"https://api.github.com/users/mralexgray/followers","following_url":"https://api.github.com/users/mralexgray/following{/other_user}","organizations_url":"https://api.github.com/users/mralexgray/orgs","subscriptions_url":"https://api.github.com/users/mralexgray/subscriptions","received_events_url":"https://api.github.com/users/mralexgray/received_events"},"topics":[],"git_url":"git://github.com/mralexgray/Amber.git","license":null,"node_id":"MDEwOlJlcG9zaXRvcnk1NTI0MDE5","private":false,"ssh_url":"git@github.com:mralexgray/Amber.git","svn_url":"https://github.com/mralexgray/Amber","archived":false,"disabled":false,"has_wiki":true,"homepage":null,"html_url":"https://github.com/mralexgray/Amber","keys_url":"https://api.github.com/repos/mralexgray/Amber/keys{/key_id}","language":null,"tags_url":"https://api.github.com/repos/mralexgray/Amber/tags","watchers":0,"blobs_url":"https://api.github.com/repos/mralexgray/Amber/git/blobs{/sha}","clone_url":"https://github.com/mralexgray/Amber.git","forks_url":"https://api.github.com/repos/mralexgray/Amber/forks","full_name":"mralexgray/Amber","has_pages":false,"hooks_url":"https://api.github.com/repos/mralexgray/Amber/hooks","pulls_url":"https://api.github.com/repos/mralexgray/Amber/pulls{/number}","pushed_at":"2012-08-23T10:38:25Z","teams_url":"https://api.github.com/repos/mralexgray/Amber/teams","trees_url":"https://api.github.com/repos/mralexgray/Amber/git/trees{/sha}","created_at":"2012-08-23T10:38:24Z","events_url":"https://api.github.com/repos/mralexgray/Amber/events","has_issues":true,"issues_url":"https://api.github.com/repos/mralexgray/Amber/issues{/number}","labels_url":"https://api.github.com/repos/mralexgray/Amber/labels{/name}","merges_url":"https://api.github.com/repos/mralexgray/Amber/merges","mirror_url":null,"updated_at":"2013-01-11T22:25:35Z","visibility":"public","archive_url":"https://api.github.com/repos/mralexgray/Amber/{archive_format}{/ref}","commits_url":"https://api.github.com/repos/mralexgray/Amber/commits{/sha}","compare_url":"https://api.github.com/repos/mralexgray/Amber/compare/{base}...{head}","description":"Fork of the difficult-to-deal-with Amber.framework","forks_count":0,"is_template":false,"open_issues":0,"branches_url":"https://api.github.com/repos/mralexgray/Amber/branches{/branch}","comments_url":"https://api.github.com/repos/mralexgray/Amber/comments{/number}","contents_url":"https://api.github.com/repos/mralexgray/Amber/contents/{+path}","git_refs_url":"https://api.github.com/repos/mralexgray/Amber/git/refs{/sha}","git_tags_url":"https://api.github.com/repos/mralexgray/Amber/git/tags{/sha}","has_projects":true,"releases_url":"https://api.github.com/repos/mralexgray/Amber/releases{/id}","statuses_url":"https://api.github.com/repos/mralexgray/Amber/statuses/{sha}","allow_forking":true,"assignees_url":"https://api.github.com/repos/mralexgray/Amber/assignees{/user}","downloads_url":"https://api.github.com/repos/mralexgray/Amber/downloads","has_downloads":true,"languages_url":"https://api.github.com/repos/mralexgray/Amber/languages","default_branch":"master","milestones_url":"https://api.github.com/repos/mralexgray/Amber/milestones{/number}","stargazers_url":"https://api.github.com/repos/mralexgray/Amber/stargazers","watchers_count":0,"deployments_url":"https://api.github.com/repos/mralexgray/Amber/deployments","git_commits_url":"https://api.github.com/repos/mralexgray/Amber/git/commits{/sha}","subscribers_url":"https://api.github.com/repos/mralexgray/Amber/subscribers","contributors_url":"https://api.github.com/repos/mralexgray/Amber/contributors","issue_events_url":"https://api.github.com/repos/mralexgray/Amber/issues/events{/number}","stargazers_count":0,"subscription_url":"https://api.github.com/repos/mralexgray/Amber/subscription","collaborators_url":"https://api.github.com/repos/mralexgray/Amber/collaborators{/collaborator}","issue_comment_url":"https://api.github.com/repos/mralexgray/Amber/issues/comments{/number}","notifications_url":"https://api.github.com/repos/mralexgray/Amber/notifications{?since,all,participating}","open_issues_count":0,"web_commit_signoff_required":false},{"id":10809060,"url":"https://api.github.com/repos/mralexgray/Amethyst","fork":true,"name":"Amethyst","size":12623,"forks":0,"owner":{"id":262517,"url":"https://api.github.com/users/mralexgray","type":"User","login":"mralexgray","node_id":"MDQ6VXNlcjI2MjUxNw==","html_url":"https://github.com/mralexgray","gists_url":"https://api.github.com/users/mralexgray/gists{/gist_id}","repos_url":"https://api.github.com/users/mralexgray/repos","avatar_url":"https://avatars.githubusercontent.com/u/262517?v=4","events_url":"https://api.github.com/users/mralexgray/events{/privacy}","site_admin":false,"gravatar_id":"","starred_url":"https://api.github.com/users/mralexgray/starred{/owner}{/repo}","followers_url":"https://api.github.com/users/mralexgray/followers","following_url":"https://api.github.com/users/mralexgray/following{/other_user}","organizations_url":"https://api.github.com/users/mralexgray/orgs","subscriptions_url":"https://api.github.com/users/mralexgray/subscriptions","received_events_url":"https://api.github.com/users/mralexgray/received_events"},"topics":[],"git_url":"git://github.com/mralexgray/Amethyst.git","license":{"key":"mit","url":"https://api.github.com/licenses/mit","name":"MIT License","node_id":"MDc6TGljZW5zZTEz","spdx_id":"MIT"},"node_id":"MDEwOlJlcG9zaXRvcnkxMDgwOTA2MA==","private":false,"ssh_url":"git@github.com:mralexgray/Amethyst.git","svn_url":"https://github.com/mralexgray/Amethyst","archived":false,"disabled":false,"has_wiki":true,"homepage":"http://ianyh.github.io/Amethyst/","html_url":"https://github.com/mralexgray/Amethyst","keys_url":"https://api.github.com/repos/mralexgray/Amethyst/keys{/key_id}","language":"Objective-C","tags_url":"https://api.github.com/repos/mralexgray/Amethyst/tags","watchers":0,"blobs_url":"https://api.github.com/repos/mralexgray/Amethyst/git/blobs{/sha}","clone_url":"https://github.com/mralexgray/Amethyst.git","forks_url":"https://api.github.com/repos/mralexgray/Amethyst/forks","full_name":"mralexgray/Amethyst","has_pages":false,"hooks_url":"https://api.github.com/repos/mralexgray/Amethyst/hooks","pulls_url":"https://api.github.com/repos/mralexgray/Amethyst/pulls{/number}","pushed_at":"2013-06-18T02:54:11Z","teams_url":"https://api.github.com/repos/mralexgray/Amethyst/teams","trees_url":"https://api.github.com/repos/mralexgray/Amethyst/git/trees{/sha}","created_at":"2013-06-20T00:34:22Z","events_url":"https://api.github.com/repos/mralexgray/Amethyst/events","has_issues":false,"issues_url":"https://api.github.com/repos/mralexgray/Amethyst/issues{/number}","labels_url":"https://api.github.com/repos/mralexgray/Amethyst/labels{/name}","merges_url":"https://api.github.com/repos/mralexgray/Amethyst/merges","mirror_url":null,"updated_at":"2013-06-20T00:34:22Z","visibility":"public","archive_url":"https://api.github.com/repos/mralexgray/Amethyst/{archive_format}{/ref}","commits_url":"https://api.github.com/repos/mralexgray/Amethyst/commits{/sha}","compare_url":"https://api.github.com/repos/mralexgray/Amethyst/compare/{base}...{head}","description":"Tiling window manager for OS X.","forks_count":0,"is_template":false,"open_issues":0,"branches_url":"https://api.github.com/repos/mralexgray/Amethyst/branches{/branch}","comments_url":"https://api.github.com/repos/mralexgray/Amethyst/comments{/number}","contents_url":"https://api.github.com/repos/mralexgray/Amethyst/contents/{+path}","git_refs_url":"https://api.github.com/repos/mralexgray/Amethyst/git/refs{/sha}","git_tags_url":"https://api.github.com/repos/mralexgray/Amethyst/git/tags{/sha}","has_projects":true,"releases_url":"https://api.github.com/repos/mralexgray/Amethyst/releases{/id}","statuses_url":"https://api.github.com/repos/mralexgray/Amethyst/statuses/{sha}","allow_forking":true,"assignees_url":"https://api.github.com/repos/mralexgray/Amethyst/assignees{/user}","downloads_url":"https://api.github.com/repos/mralexgray/Amethyst/downloads","has_downloads":true,"languages_url":"https://api.github.com/repos/mralexgray/Amethyst/languages","default_branch":"master","milestones_url":"https://api.github.com/repos/mralexgray/Amethyst/milestones{/number}","stargazers_url":"https://api.github.com/repos/mralexgray/Amethyst/stargazers","watchers_count":0,"deployments_url":"https://api.github.com/repos/mralexgray/Amethyst/deployments","git_commits_url":"https://api.github.com/repos/mralexgray/Amethyst/git/commits{/sha}","subscribers_url":"https://api.github.com/repos/mralexgray/Amethyst/subscribers","contributors_url":"https://api.github.com/repos/mralexgray/Amethyst/contributors","issue_events_url":"https://api.github.com/repos/mralexgray/Amethyst/issues/events{/number}","stargazers_count":0,"subscription_url":"https://api.github.com/repos/mralexgray/Amethyst/subscription","collaborators_url":"https://api.github.com/repos/mralexgray/Amethyst/collaborators{/collaborator}","issue_comment_url":"https://api.github.com/repos/mralexgray/Amethyst/issues/comments{/number}","notifications_url":"https://api.github.com/repos/mralexgray/Amethyst/notifications{?since,all,participating}","open_issues_count":0,"web_commit_signoff_required":false},{"id":3684286,"url":"https://api.github.com/repos/mralexgray/Animated-Paths","fork":true,"name":"Animated-Paths","size":411,"forks":0,"owner":{"id":262517,"url":"https://api.github.com/users/mralexgray","type":"User","login":"mralexgray","node_id":"MDQ6VXNlcjI2MjUxNw==","html_url":"https://github.com/mralexgray","gists_url":"https://api.github.com/users/mralexgray/gists{/gist_id}","repos_url":"https://api.github.com/users/mralexgray/repos","avatar_url":"https://avatars.githubusercontent.com/u/262517?v=4","events_url":"https://api.github.com/users/mralexgray/events{/privacy}","site_admin":false,"gravatar_id":"","starred_url":"https://api.github.com/users/mralexgray/starred{/owner}{/repo}","followers_url":"https://api.github.com/users/mralexgray/followers","following_url":"https://api.github.com/users/mralexgray/following{/other_user}","organizations_url":"https://api.github.com/users/mralexgray/orgs","subscriptions_url":"https://api.github.com/users/mralexgray/subscriptions","received_events_url":"https://api.github.com/users/mralexgray/received_events"},"topics":[],"git_url":"git://github.com/mralexgray/Animated-Paths.git","license":{"key":"other","url":null,"name":"Other","node_id":"MDc6TGljZW5zZTA=","spdx_id":"NOASSERTION"},"node_id":"MDEwOlJlcG9zaXRvcnkzNjg0Mjg2","private":false,"ssh_url":"git@github.com:mralexgray/Animated-Paths.git","svn_url":"https://github.com/mralexgray/Animated-Paths","archived":false,"disabled":false,"has_wiki":true,"homepage":"http://oleb.net/blog/2010/12/animating-drawing-of-cgpath-with-cashapelayer/","html_url":"https://github.com/mralexgray/Animated-Paths","keys_url":"https://api.github.com/repos/mralexgray/Animated-Paths/keys{/key_id}","language":"Objective-C","tags_url":"https://api.github.com/repos/mralexgray/Animated-Paths/tags","watchers":2,"blobs_url":"https://api.github.com/repos/mralexgray/Animated-Paths/git/blobs{/sha}","clone_url":"https://github.com/mralexgray/Animated-Paths.git","forks_url":"https://api.github.com/repos/mralexgray/Animated-Paths/forks","full_name":"mralexgray/Animated-Paths","has_pages":false,"hooks_url":"https://api.github.com/repos/mralexgray/Animated-Paths/hooks","pulls_url":"https://api.github.com/repos/mralexgray/Animated-Paths/pulls{/number}","pushed_at":"2010-12-30T20:56:51Z","teams_url":"https://api.github.com/repos/mralexgray/Animated-Paths/teams","trees_url":"https://api.github.com/repos/mralexgray/Animated-Paths/git/trees{/sha}","created_at":"2012-03-11T02:56:38Z","events_url":"https://api.github.com/repos/mralexgray/Animated-Paths/events","has_issues":false,"issues_url":"https://api.github.com/repos/mralexgray/Animated-Paths/issues{/number}","labels_url":"https://api.github.com/repos/mralexgray/Animated-Paths/labels{/name}","merges_url":"https://api.github.com/repos/mralexgray/Animated-Paths/merges","mirror_url":null,"updated_at":"2013-01-08T04:12:21Z","visibility":"public","archive_url":"https://api.github.com/repos/mralexgray/Animated-Paths/{archive_format}{/ref}","commits_url":"https://api.github.com/repos/mralexgray/Animated-Paths/commits{/sha}","compare_url":"https://api.github.com/repos/mralexgray/Animated-Paths/compare/{base}...{head}","description":"Demo project: Animating the drawing of a CGPath with CAShapeLayer.strokeEnd","forks_count":0,"is_template":false,"open_issues":0,"branches_url":"https://api.github.com/repos/mralexgray/Animated-Paths/branches{/branch}","comments_url":"https://api.github.com/repos/mralexgray/Animated-Paths/comments{/number}","contents_url":"https://api.github.com/repos/mralexgray/Animated-Paths/contents/{+path}","git_refs_url":"https://api.github.com/repos/mralexgray/Animated-Paths/git/refs{/sha}","git_tags_url":"https://api.github.com/repos/mralexgray/Animated-Paths/git/tags{/sha}","has_projects":true,"releases_url":"https://api.github.com/repos/mralexgray/Animated-Paths/releases{/id}","statuses_url":"https://api.github.com/repos/mralexgray/Animated-Paths/statuses/{sha}","allow_forking":true,"assignees_url":"https://api.github.com/repos/mralexgray/Animated-Paths/assignees{/user}","downloads_url":"https://api.github.com/repos/mralexgray/Animated-Paths/downloads","has_downloads":true,"languages_url":"https://api.github.com/repos/mralexgray/Animated-Paths/languages","default_branch":"master","milestones_url":"https://api.github.com/repos/mralexgray/Animated-Paths/milestones{/number}","stargazers_url":"https://api.github.com/repos/mralexgray/Animated-Paths/stargazers","watchers_count":2,"deployments_url":"https://api.github.com/repos/mralexgray/Animated-Paths/deployments","git_commits_url":"https://api.github.com/repos/mralexgray/Animated-Paths/git/commits{/sha}","subscribers_url":"https://api.github.com/repos/mralexgray/Animated-Paths/subscribers","contributors_url":"https://api.github.com/repos/mralexgray/Animated-Paths/contributors","issue_events_url":"https://api.github.com/repos/mralexgray/Animated-Paths/issues/events{/number}","stargazers_count":2,"subscription_url":"https://api.github.com/repos/mralexgray/Animated-Paths/subscription","collaborators_url":"https://api.github.com/repos/mralexgray/Animated-Paths/collaborators{/collaborator}","issue_comment_url":"https://api.github.com/repos/mralexgray/Animated-Paths/issues/comments{/number}","notifications_url":"https://api.github.com/repos/mralexgray/Animated-Paths/notifications{?since,all,participating}","open_issues_count":0,"web_commit_signoff_required":false},{"id":16662874,"url":"https://api.github.com/repos/mralexgray/AnsiLove.framework","fork":true,"name":"AnsiLove.framework","size":3780,"forks":0,"owner":{"id":262517,"url":"https://api.github.com/users/mralexgray","type":"User","login":"mralexgray","node_id":"MDQ6VXNlcjI2MjUxNw==","html_url":"https://github.com/mralexgray","gists_url":"https://api.github.com/users/mralexgray/gists{/gist_id}","repos_url":"https://api.github.com/users/mralexgray/repos","avatar_url":"https://avatars.githubusercontent.com/u/262517?v=4","events_url":"https://api.github.com/users/mralexgray/events{/privacy}","site_admin":false,"gravatar_id":"","starred_url":"https://api.github.com/users/mralexgray/starred{/owner}{/repo}","followers_url":"https://api.github.com/users/mralexgray/followers","following_url":"https://api.github.com/users/mralexgray/following{/other_user}","organizations_url":"https://api.github.com/users/mralexgray/orgs","subscriptions_url":"https://api.github.com/users/mralexgray/subscriptions","received_events_url":"https://api.github.com/users/mralexgray/received_events"},"topics":[],"git_url":"git://github.com/mralexgray/AnsiLove.framework.git","license":{"key":"other","url":null,"name":"Other","node_id":"MDc6TGljZW5zZTA=","spdx_id":"NOASSERTION"},"node_id":"MDEwOlJlcG9zaXRvcnkxNjY2Mjg3NA==","private":false,"ssh_url":"git@github.com:mralexgray/AnsiLove.framework.git","svn_url":"https://github.com/mralexgray/AnsiLove.framework","archived":false,"disabled":false,"has_wiki":false,"homepage":"http://byteproject.net","html_url":"https://github.com/mralexgray/AnsiLove.framework","keys_url":"https://api.github.com/repos/mralexgray/AnsiLove.framework/keys{/key_id}","language":"M","tags_url":"https://api.github.com/repos/mralexgray/AnsiLove.framework/tags","watchers":0,"blobs_url":"https://api.github.com/repos/mralexgray/AnsiLove.framework/git/blobs{/sha}","clone_url":"https://github.com/mralexgray/AnsiLove.framework.git","forks_url":"https://api.github.com/repos/mralexgray/AnsiLove.framework/forks","full_name":"mralexgray/AnsiLove.framework","has_pages":false,"hooks_url":"https://api.github.com/repos/mralexgray/AnsiLove.framework/hooks","pulls_url":"https://api.github.com/repos/mralexgray/AnsiLove.framework/pulls{/number}","pushed_at":"2013-10-04T14:08:38Z","teams_url":"https://api.github.com/repos/mralexgray/AnsiLove.framework/teams","trees_url":"https://api.github.com/repos/mralexgray/AnsiLove.framework/git/trees{/sha}","created_at":"2014-02-09T08:30:27Z","events_url":"https://api.github.com/repos/mralexgray/AnsiLove.framework/events","has_issues":false,"issues_url":"https://api.github.com/repos/mralexgray/AnsiLove.framework/issues{/number}","labels_url":"https://api.github.com/repos/mralexgray/AnsiLove.framework/labels{/name}","merges_url":"https://api.github.com/repos/mralexgray/AnsiLove.framework/merges","mirror_url":null,"updated_at":"2015-01-13T20:41:46Z","visibility":"public","archive_url":"https://api.github.com/repos/mralexgray/AnsiLove.framework/{archive_format}{/ref}","commits_url":"https://api.github.com/repos/mralexgray/AnsiLove.framework/commits{/sha}","compare_url":"https://api.github.com/repos/mralexgray/AnsiLove.framework/compare/{base}...{head}","description":"Cocoa Framework for rendering ANSi / ASCII art","forks_count":0,"is_template":false,"open_issues":0,"branches_url":"https://api.github.com/repos/mralexgray/AnsiLove.framework/branches{/branch}","comments_url":"https://api.github.com/repos/mralexgray/AnsiLove.framework/comments{/number}","contents_url":"https://api.github.com/repos/mralexgray/AnsiLove.framework/contents/{+path}","git_refs_url":"https://api.github.com/repos/mralexgray/AnsiLove.framework/git/refs{/sha}","git_tags_url":"https://api.github.com/repos/mralexgray/AnsiLove.framework/git/tags{/sha}","has_projects":true,"releases_url":"https://api.github.com/repos/mralexgray/AnsiLove.framework/releases{/id}","statuses_url":"https://api.github.com/repos/mralexgray/AnsiLove.framework/statuses/{sha}","allow_forking":true,"assignees_url":"https://api.github.com/repos/mralexgray/AnsiLove.framework/assignees{/user}","downloads_url":"https://api.github.com/repos/mralexgray/AnsiLove.framework/downloads","has_downloads":true,"languages_url":"https://api.github.com/repos/mralexgray/AnsiLove.framework/languages","default_branch":"master","milestones_url":"https://api.github.com/repos/mralexgray/AnsiLove.framework/milestones{/number}","stargazers_url":"https://api.github.com/repos/mralexgray/AnsiLove.framework/stargazers","watchers_count":0,"deployments_url":"https://api.github.com/repos/mralexgray/AnsiLove.framework/deployments","git_commits_url":"https://api.github.com/repos/mralexgray/AnsiLove.framework/git/commits{/sha}","subscribers_url":"https://api.github.com/repos/mralexgray/AnsiLove.framework/subscribers","contributors_url":"https://api.github.com/repos/mralexgray/AnsiLove.framework/contributors","issue_events_url":"https://api.github.com/repos/mralexgray/AnsiLove.framework/issues/events{/number}","stargazers_count":0,"subscription_url":"https://api.github.com/repos/mralexgray/AnsiLove.framework/subscription","collaborators_url":"https://api.github.com/repos/mralexgray/AnsiLove.framework/collaborators{/collaborator}","issue_comment_url":"https://api.github.com/repos/mralexgray/AnsiLove.framework/issues/comments{/number}","notifications_url":"https://api.github.com/repos/mralexgray/AnsiLove.framework/notifications{?since,all,participating}","open_issues_count":0,"web_commit_signoff_required":false},{"id":5189563,"url":"https://api.github.com/repos/mralexgray/ANTrackBar","fork":true,"name":"ANTrackBar","size":94,"forks":0,"owner":{"id":262517,"url":"https://api.github.com/users/mralexgray","type":"User","login":"mralexgray","node_id":"MDQ6VXNlcjI2MjUxNw==","html_url":"https://github.com/mralexgray","gists_url":"https://api.github.com/users/mralexgray/gists{/gist_id}","repos_url":"https://api.github.com/users/mralexgray/repos","avatar_url":"https://avatars.githubusercontent.com/u/262517?v=4","events_url":"https://api.github.com/users/mralexgray/events{/privacy}","site_admin":false,"gravatar_id":"","starred_url":"https://api.github.com/users/mralexgray/starred{/owner}{/repo}","followers_url":"https://api.github.com/users/mralexgray/followers","following_url":"https://api.github.com/users/mralexgray/following{/other_user}","organizations_url":"https://api.github.com/users/mralexgray/orgs","subscriptions_url":"https://api.github.com/users/mralexgray/subscriptions","received_events_url":"https://api.github.com/users/mralexgray/received_events"},"topics":[],"git_url":"git://github.com/mralexgray/ANTrackBar.git","license":null,"node_id":"MDEwOlJlcG9zaXRvcnk1MTg5NTYz","private":false,"ssh_url":"git@github.com:mralexgray/ANTrackBar.git","svn_url":"https://github.com/mralexgray/ANTrackBar","archived":false,"disabled":false,"has_wiki":true,"homepage":"","html_url":"https://github.com/mralexgray/ANTrackBar","keys_url":"https://api.github.com/repos/mralexgray/ANTrackBar/keys{/key_id}","language":"Objective-C","tags_url":"https://api.github.com/repos/mralexgray/ANTrackBar/tags","watchers":2,"blobs_url":"https://api.github.com/repos/mralexgray/ANTrackBar/git/blobs{/sha}","clone_url":"https://github.com/mralexgray/ANTrackBar.git","forks_url":"https://api.github.com/repos/mralexgray/ANTrackBar/forks","full_name":"mralexgray/ANTrackBar","has_pages":false,"hooks_url":"https://api.github.com/repos/mralexgray/ANTrackBar/hooks","pulls_url":"https://api.github.com/repos/mralexgray/ANTrackBar/pulls{/number}","pushed_at":"2012-03-09T01:40:02Z","teams_url":"https://api.github.com/repos/mralexgray/ANTrackBar/teams","trees_url":"https://api.github.com/repos/mralexgray/ANTrackBar/git/trees{/sha}","created_at":"2012-07-26T08:17:22Z","events_url":"https://api.github.com/repos/mralexgray/ANTrackBar/events","has_issues":false,"issues_url":"https://api.github.com/repos/mralexgray/ANTrackBar/issues{/number}","labels_url":"https://api.github.com/repos/mralexgray/ANTrackBar/labels{/name}","merges_url":"https://api.github.com/repos/mralexgray/ANTrackBar/merges","mirror_url":null,"updated_at":"2013-01-11T10:29:56Z","visibility":"public","archive_url":"https://api.github.com/repos/mralexgray/ANTrackBar/{archive_format}{/ref}","commits_url":"https://api.github.com/repos/mralexgray/ANTrackBar/commits{/sha}","compare_url":"https://api.github.com/repos/mralexgray/ANTrackBar/compare/{base}...{head}","description":"An easy-to-use Cocoa seek bar with a pleasing appearance","forks_count":0,"is_template":false,"open_issues":0,"branches_url":"https://api.github.com/repos/mralexgray/ANTrackBar/branches{/branch}","comments_url":"https://api.github.com/repos/mralexgray/ANTrackBar/comments{/number}","contents_url":"https://api.github.com/repos/mralexgray/ANTrackBar/contents/{+path}","git_refs_url":"https://api.github.com/repos/mralexgray/ANTrackBar/git/refs{/sha}","git_tags_url":"https://api.github.com/repos/mralexgray/ANTrackBar/git/tags{/sha}","has_projects":true,"releases_url":"https://api.github.com/repos/mralexgray/ANTrackBar/releases{/id}","statuses_url":"https://api.github.com/repos/mralexgray/ANTrackBar/statuses/{sha}","allow_forking":true,"assignees_url":"https://api.github.com/repos/mralexgray/ANTrackBar/assignees{/user}","downloads_url":"https://api.github.com/repos/mralexgray/ANTrackBar/downloads","has_downloads":true,"languages_url":"https://api.github.com/repos/mralexgray/ANTrackBar/languages","default_branch":"master","milestones_url":"https://api.github.com/repos/mralexgray/ANTrackBar/milestones{/number}","stargazers_url":"https://api.github.com/repos/mralexgray/ANTrackBar/stargazers","watchers_count":2,"deployments_url":"https://api.github.com/repos/mralexgray/ANTrackBar/deployments","git_commits_url":"https://api.github.com/repos/mralexgray/ANTrackBar/git/commits{/sha}","subscribers_url":"https://api.github.com/repos/mralexgray/ANTrackBar/subscribers","contributors_url":"https://api.github.com/repos/mralexgray/ANTrackBar/contributors","issue_events_url":"https://api.github.com/repos/mralexgray/ANTrackBar/issues/events{/number}","stargazers_count":2,"subscription_url":"https://api.github.com/repos/mralexgray/ANTrackBar/subscription","collaborators_url":"https://api.github.com/repos/mralexgray/ANTrackBar/collaborators{/collaborator}","issue_comment_url":"https://api.github.com/repos/mralexgray/ANTrackBar/issues/comments{/number}","notifications_url":"https://api.github.com/repos/mralexgray/ANTrackBar/notifications{?since,all,participating}","open_issues_count":0,"web_commit_signoff_required":false},{"id":16240152,"url":"https://api.github.com/repos/mralexgray/AOP-in-Objective-C","fork":true,"name":"AOP-in-Objective-C","size":340,"forks":1,"owner":{"id":262517,"url":"https://api.github.com/users/mralexgray","type":"User","login":"mralexgray","node_id":"MDQ6VXNlcjI2MjUxNw==","html_url":"https://github.com/mralexgray","gists_url":"https://api.github.com/users/mralexgray/gists{/gist_id}","repos_url":"https://api.github.com/users/mralexgray/repos","avatar_url":"https://avatars.githubusercontent.com/u/262517?v=4","events_url":"https://api.github.com/users/mralexgray/events{/privacy}","site_admin":false,"gravatar_id":"","starred_url":"https://api.github.com/users/mralexgray/starred{/owner}{/repo}","followers_url":"https://api.github.com/users/mralexgray/followers","following_url":"https://api.github.com/users/mralexgray/following{/other_user}","organizations_url":"https://api.github.com/users/mralexgray/orgs","subscriptions_url":"https://api.github.com/users/mralexgray/subscriptions","received_events_url":"https://api.github.com/users/mralexgray/received_events"},"topics":[],"git_url":"git://github.com/mralexgray/AOP-in-Objective-C.git","license":null,"node_id":"MDEwOlJlcG9zaXRvcnkxNjI0MDE1Mg==","private":false,"ssh_url":"git@github.com:mralexgray/AOP-in-Objective-C.git","svn_url":"https://github.com/mralexgray/AOP-in-Objective-C","archived":false,"disabled":false,"has_wiki":true,"homepage":"http://innoli.hu/en/opensource/","html_url":"https://github.com/mralexgray/AOP-in-Objective-C","keys_url":"https://api.github.com/repos/mralexgray/AOP-in-Objective-C/keys{/key_id}","language":"Objective-C","tags_url":"https://api.github.com/repos/mralexgray/AOP-in-Objective-C/tags","watchers":0,"blobs_url":"https://api.github.com/repos/mralexgray/AOP-in-Objective-C/git/blobs{/sha}","clone_url":"https://github.com/mralexgray/AOP-in-Objective-C.git","forks_url":"https://api.github.com/repos/mralexgray/AOP-in-Objective-C/forks","full_name":"mralexgray/AOP-in-Objective-C","has_pages":false,"hooks_url":"https://api.github.com/repos/mralexgray/AOP-in-Objective-C/hooks","pulls_url":"https://api.github.com/repos/mralexgray/AOP-in-Objective-C/pulls{/number}","pushed_at":"2014-02-12T16:23:20Z","teams_url":"https://api.github.com/repos/mralexgray/AOP-in-Objective-C/teams","trees_url":"https://api.github.com/repos/mralexgray/AOP-in-Objective-C/git/trees{/sha}","created_at":"2014-01-25T21:18:04Z","events_url":"https://api.github.com/repos/mralexgray/AOP-in-Objective-C/events","has_issues":false,"issues_url":"https://api.github.com/repos/mralexgray/AOP-in-Objective-C/issues{/number}","labels_url":"https://api.github.com/repos/mralexgray/AOP-in-Objective-C/labels{/name}","merges_url":"https://api.github.com/repos/mralexgray/AOP-in-Objective-C/merges","mirror_url":null,"updated_at":"2014-06-19T19:38:12Z","visibility":"public","archive_url":"https://api.github.com/repos/mralexgray/AOP-in-Objective-C/{archive_format}{/ref}","commits_url":"https://api.github.com/repos/mralexgray/AOP-in-Objective-C/commits{/sha}","compare_url":"https://api.github.com/repos/mralexgray/AOP-in-Objective-C/compare/{base}...{head}","description":"An NSProxy based library for easily enabling AOP like functionality in Objective-C.","forks_count":1,"is_template":false,"open_issues":0,"branches_url":"https://api.github.com/repos/mralexgray/AOP-in-Objective-C/branches{/branch}","comments_url":"https://api.github.com/repos/mralexgray/AOP-in-Objective-C/comments{/number}","contents_url":"https://api.github.com/repos/mralexgray/AOP-in-Objective-C/contents/{+path}","git_refs_url":"https://api.github.com/repos/mralexgray/AOP-in-Objective-C/git/refs{/sha}","git_tags_url":"https://api.github.com/repos/mralexgray/AOP-in-Objective-C/git/tags{/sha}","has_projects":true,"releases_url":"https://api.github.com/repos/mralexgray/AOP-in-Objective-C/releases{/id}","statuses_url":"https://api.github.com/repos/mralexgray/AOP-in-Objective-C/statuses/{sha}","allow_forking":true,"assignees_url":"https://api.github.com/repos/mralexgray/AOP-in-Objective-C/assignees{/user}","downloads_url":"https://api.github.com/repos/mralexgray/AOP-in-Objective-C/downloads","has_downloads":true,"languages_url":"https://api.github.com/repos/mralexgray/AOP-in-Objective-C/languages","default_branch":"travis-coveralls","milestones_url":"https://api.github.com/repos/mralexgray/AOP-in-Objective-C/milestones{/number}","stargazers_url":"https://api.github.com/repos/mralexgray/AOP-in-Objective-C/stargazers","watchers_count":0,"deployments_url":"https://api.github.com/repos/mralexgray/AOP-in-Objective-C/deployments","git_commits_url":"https://api.github.com/repos/mralexgray/AOP-in-Objective-C/git/commits{/sha}","subscribers_url":"https://api.github.com/repos/mralexgray/AOP-in-Objective-C/subscribers","contributors_url":"https://api.github.com/repos/mralexgray/AOP-in-Objective-C/contributors","issue_events_url":"https://api.github.com/repos/mralexgray/AOP-in-Objective-C/issues/events{/number}","stargazers_count":0,"subscription_url":"https://api.github.com/repos/mralexgray/AOP-in-Objective-C/subscription","collaborators_url":"https://api.github.com/repos/mralexgray/AOP-in-Objective-C/collaborators{/collaborator}","issue_comment_url":"https://api.github.com/repos/mralexgray/AOP-in-Objective-C/issues/comments{/number}","notifications_url":"https://api.github.com/repos/mralexgray/AOP-in-Objective-C/notifications{?since,all,participating}","open_issues_count":0,"web_commit_signoff_required":false},{"id":13141936,"url":"https://api.github.com/repos/mralexgray/Apaxy","fork":true,"name":"Apaxy","size":113,"forks":0,"owner":{"id":262517,"url":"https://api.github.com/users/mralexgray","type":"User","login":"mralexgray","node_id":"MDQ6VXNlcjI2MjUxNw==","html_url":"https://github.com/mralexgray","gists_url":"https://api.github.com/users/mralexgray/gists{/gist_id}","repos_url":"https://api.github.com/users/mralexgray/repos","avatar_url":"https://avatars.githubusercontent.com/u/262517?v=4","events_url":"https://api.github.com/users/mralexgray/events{/privacy}","site_admin":false,"gravatar_id":"","starred_url":"https://api.github.com/users/mralexgray/starred{/owner}{/repo}","followers_url":"https://api.github.com/users/mralexgray/followers","following_url":"https://api.github.com/users/mralexgray/following{/other_user}","organizations_url":"https://api.github.com/users/mralexgray/orgs","subscriptions_url":"https://api.github.com/users/mralexgray/subscriptions","received_events_url":"https://api.github.com/users/mralexgray/received_events"},"topics":[],"git_url":"git://github.com/mralexgray/Apaxy.git","license":{"key":"unlicense","url":"https://api.github.com/licenses/unlicense","name":"The Unlicense","node_id":"MDc6TGljZW5zZTE1","spdx_id":"Unlicense"},"node_id":"MDEwOlJlcG9zaXRvcnkxMzE0MTkzNg==","private":false,"ssh_url":"git@github.com:mralexgray/Apaxy.git","svn_url":"https://github.com/mralexgray/Apaxy","archived":false,"disabled":false,"has_wiki":true,"homepage":null,"html_url":"https://github.com/mralexgray/Apaxy","keys_url":"https://api.github.com/repos/mralexgray/Apaxy/keys{/key_id}","language":"CSS","tags_url":"https://api.github.com/repos/mralexgray/Apaxy/tags","watchers":0,"blobs_url":"https://api.github.com/repos/mralexgray/Apaxy/git/blobs{/sha}","clone_url":"https://github.com/mralexgray/Apaxy.git","forks_url":"https://api.github.com/repos/mralexgray/Apaxy/forks","full_name":"mralexgray/Apaxy","has_pages":false,"hooks_url":"https://api.github.com/repos/mralexgray/Apaxy/hooks","pulls_url":"https://api.github.com/repos/mralexgray/Apaxy/pulls{/number}","pushed_at":"2013-08-02T16:01:32Z","teams_url":"https://api.github.com/repos/mralexgray/Apaxy/teams","trees_url":"https://api.github.com/repos/mralexgray/Apaxy/git/trees{/sha}","created_at":"2013-09-27T05:05:35Z","events_url":"https://api.github.com/repos/mralexgray/Apaxy/events","has_issues":false,"issues_url":"https://api.github.com/repos/mralexgray/Apaxy/issues{/number}","labels_url":"https://api.github.com/repos/mralexgray/Apaxy/labels{/name}","merges_url":"https://api.github.com/repos/mralexgray/Apaxy/merges","mirror_url":null,"updated_at":"2018-02-16T21:40:24Z","visibility":"public","archive_url":"https://api.github.com/repos/mralexgray/Apaxy/{archive_format}{/ref}","commits_url":"https://api.github.com/repos/mralexgray/Apaxy/commits{/sha}","compare_url":"https://api.github.com/repos/mralexgray/Apaxy/compare/{base}...{head}","description":"A simple, customisable theme for your Apache directory listing.","forks_count":0,"is_template":false,"open_issues":0,"branches_url":"https://api.github.com/repos/mralexgray/Apaxy/branches{/branch}","comments_url":"https://api.github.com/repos/mralexgray/Apaxy/comments{/number}","contents_url":"https://api.github.com/repos/mralexgray/Apaxy/contents/{+path}","git_refs_url":"https://api.github.com/repos/mralexgray/Apaxy/git/refs{/sha}","git_tags_url":"https://api.github.com/repos/mralexgray/Apaxy/git/tags{/sha}","has_projects":true,"releases_url":"https://api.github.com/repos/mralexgray/Apaxy/releases{/id}","statuses_url":"https://api.github.com/repos/mralexgray/Apaxy/statuses/{sha}","allow_forking":true,"assignees_url":"https://api.github.com/repos/mralexgray/Apaxy/assignees{/user}","downloads_url":"https://api.github.com/repos/mralexgray/Apaxy/downloads","has_downloads":true,"languages_url":"https://api.github.com/repos/mralexgray/Apaxy/languages","default_branch":"master","milestones_url":"https://api.github.com/repos/mralexgray/Apaxy/milestones{/number}","stargazers_url":"https://api.github.com/repos/mralexgray/Apaxy/stargazers","watchers_count":0,"deployments_url":"https://api.github.com/repos/mralexgray/Apaxy/deployments","git_commits_url":"https://api.github.com/repos/mralexgray/Apaxy/git/commits{/sha}","subscribers_url":"https://api.github.com/repos/mralexgray/Apaxy/subscribers","contributors_url":"https://api.github.com/repos/mralexgray/Apaxy/contributors","issue_events_url":"https://api.github.com/repos/mralexgray/Apaxy/issues/events{/number}","stargazers_count":0,"subscription_url":"https://api.github.com/repos/mralexgray/Apaxy/subscription","collaborators_url":"https://api.github.com/repos/mralexgray/Apaxy/collaborators{/collaborator}","issue_comment_url":"https://api.github.com/repos/mralexgray/Apaxy/issues/comments{/number}","notifications_url":"https://api.github.com/repos/mralexgray/Apaxy/notifications{?since,all,participating}","open_issues_count":0,"web_commit_signoff_required":false},{"id":20027360,"url":"https://api.github.com/repos/mralexgray/app","fork":true,"name":"app","size":1890,"forks":0,"owner":{"id":262517,"url":"https://api.github.com/users/mralexgray","type":"User","login":"mralexgray","node_id":"MDQ6VXNlcjI2MjUxNw==","html_url":"https://github.com/mralexgray","gists_url":"https://api.github.com/users/mralexgray/gists{/gist_id}","repos_url":"https://api.github.com/users/mralexgray/repos","avatar_url":"https://avatars.githubusercontent.com/u/262517?v=4","events_url":"https://api.github.com/users/mralexgray/events{/privacy}","site_admin":false,"gravatar_id":"","starred_url":"https://api.github.com/users/mralexgray/starred{/owner}{/repo}","followers_url":"https://api.github.com/users/mralexgray/followers","following_url":"https://api.github.com/users/mralexgray/following{/other_user}","organizations_url":"https://api.github.com/users/mralexgray/orgs","subscriptions_url":"https://api.github.com/users/mralexgray/subscriptions","received_events_url":"https://api.github.com/users/mralexgray/received_events"},"topics":[],"git_url":"git://github.com/mralexgray/app.git","license":{"key":"other","url":null,"name":"Other","node_id":"MDc6TGljZW5zZTA=","spdx_id":"NOASSERTION"},"node_id":"MDEwOlJlcG9zaXRvcnkyMDAyNzM2MA==","private":false,"ssh_url":"git@github.com:mralexgray/app.git","svn_url":"https://github.com/mralexgray/app","archived":false,"disabled":false,"has_wiki":true,"homepage":null,"html_url":"https://github.com/mralexgray/app","keys_url":"https://api.github.com/repos/mralexgray/app/keys{/key_id}","language":"JavaScript","tags_url":"https://api.github.com/repos/mralexgray/app/tags","watchers":0,"blobs_url":"https://api.github.com/repos/mralexgray/app/git/blobs{/sha}","clone_url":"https://github.com/mralexgray/app.git","forks_url":"https://api.github.com/repos/mralexgray/app/forks","full_name":"mralexgray/app","has_pages":false,"hooks_url":"https://api.github.com/repos/mralexgray/app/hooks","pulls_url":"https://api.github.com/repos/mralexgray/app/pulls{/number}","pushed_at":"2014-05-20T19:51:38Z","teams_url":"https://api.github.com/repos/mralexgray/app/teams","trees_url":"https://api.github.com/repos/mralexgray/app/git/trees{/sha}","created_at":"2014-05-21T15:54:20Z","events_url":"https://api.github.com/repos/mralexgray/app/events","has_issues":false,"issues_url":"https://api.github.com/repos/mralexgray/app/issues{/number}","labels_url":"https://api.github.com/repos/mralexgray/app/labels{/name}","merges_url":"https://api.github.com/repos/mralexgray/app/merges","mirror_url":null,"updated_at":"2014-05-21T15:54:22Z","visibility":"public","archive_url":"https://api.github.com/repos/mralexgray/app/{archive_format}{/ref}","commits_url":"https://api.github.com/repos/mralexgray/app/commits{/sha}","compare_url":"https://api.github.com/repos/mralexgray/app/compare/{base}...{head}","description":"Instant mobile web app creation","forks_count":0,"is_template":false,"open_issues":0,"branches_url":"https://api.github.com/repos/mralexgray/app/branches{/branch}","comments_url":"https://api.github.com/repos/mralexgray/app/comments{/number}","contents_url":"https://api.github.com/repos/mralexgray/app/contents/{+path}","git_refs_url":"https://api.github.com/repos/mralexgray/app/git/refs{/sha}","git_tags_url":"https://api.github.com/repos/mralexgray/app/git/tags{/sha}","has_projects":true,"releases_url":"https://api.github.com/repos/mralexgray/app/releases{/id}","statuses_url":"https://api.github.com/repos/mralexgray/app/statuses/{sha}","allow_forking":true,"assignees_url":"https://api.github.com/repos/mralexgray/app/assignees{/user}","downloads_url":"https://api.github.com/repos/mralexgray/app/downloads","has_downloads":true,"languages_url":"https://api.github.com/repos/mralexgray/app/languages","default_branch":"master","milestones_url":"https://api.github.com/repos/mralexgray/app/milestones{/number}","stargazers_url":"https://api.github.com/repos/mralexgray/app/stargazers","watchers_count":0,"deployments_url":"https://api.github.com/repos/mralexgray/app/deployments","git_commits_url":"https://api.github.com/repos/mralexgray/app/git/commits{/sha}","subscribers_url":"https://api.github.com/repos/mralexgray/app/subscribers","contributors_url":"https://api.github.com/repos/mralexgray/app/contributors","issue_events_url":"https://api.github.com/repos/mralexgray/app/issues/events{/number}","stargazers_count":0,"subscription_url":"https://api.github.com/repos/mralexgray/app/subscription","collaborators_url":"https://api.github.com/repos/mralexgray/app/collaborators{/collaborator}","issue_comment_url":"https://api.github.com/repos/mralexgray/app/issues/comments{/number}","notifications_url":"https://api.github.com/repos/mralexgray/app/notifications{?since,all,participating}","open_issues_count":0,"web_commit_signoff_required":false}],"name":"Shirt","revenue":4.99},"receivedAt":"2022-08-18T08:43:13.521+05:30","request_ip":"[::1]","anonymousId":"anon-id-new","originalTimestamp":"2022-08-18T08:43:15.539+05:30"},{"name":"Page View","type":"page","sentAt":"2022-08-18T08:43:15.539+05:30","userId":"identified user id","context":{"ip":"14.5.67.21","library":{"name":"http"}},"rudderId":"daf823fb-e8d3-413a-8313-d34cd756f968","messageId":"5f58d1f7-cbd6-4bff-8571-9933be7210b1","timestamp":"2020-02-02T00:23:09.544Z","properties":{"path":"/","title":"Home"},"receivedAt":"2022-08-18T08:43:13.521+05:30","request_ip":"[::1]","anonymousId":"anon-id-new","originalTimestamp":"2022-08-18T08:43:15.539+05:30"}]', - destConfig: { clientContext: '', lambda: 'testFunction', invocationType: 'Event' }, + destConfig: { + clientContext: '', + lambda: 'testFunction', + invocationType: 'Event', + }, }, metadata: [ { - userId: 'u1', + userId: 'anon-id-new<<>>identified user id', jobId: 32, sourceId: '2DTlLPQxignYp4ag9sISgGN2uY7', destinationId: '2DTozIMGtBwTGNJtuvdPByFSL2Z', @@ -25520,7 +25592,12 @@ export const data = [ event: 'Product Purchased new', sentAt: '2022-08-18T08:43:15.539+05:30', userId: 'identified user id', - context: { ip: '14.5.67.21', library: { name: 'http' } }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, rudderId: 'daf823fb-e8d3-413a-8313-d34cd756f968', messageId: '9f8fb785-c720-4381-a009-bf22a13f4ced', timestamp: '2020-02-02T00:23:09.544Z', @@ -29758,7 +29835,7 @@ export const data = [ workerAssignedTime: '2022-08-18T08:43:16.586825+05:30', }, { - userId: 'u1', + userId: 'anon-id-new<<>>identified user id', jobId: 33, sourceId: '2DTlLPQxignYp4ag9sISgGN2uY7', destinationId: '2DTozIMGtBwTGNJtuvdPByFSL2Z', @@ -29782,11 +29859,19 @@ export const data = [ type: 'page', sentAt: '2022-08-18T08:43:15.539+05:30', userId: 'identified user id', - context: { ip: '14.5.67.21', library: { name: 'http' } }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, rudderId: 'daf823fb-e8d3-413a-8313-d34cd756f968', messageId: '5f58d1f7-cbd6-4bff-8571-9933be7210b1', timestamp: '2020-02-02T00:23:09.544Z', - properties: { path: '/', title: 'Home' }, + properties: { + path: '/', + title: 'Home', + }, receivedAt: '2022-08-18T08:43:13.521+05:30', request_ip: '[::1]', anonymousId: 'anon-id-new', @@ -29836,11 +29921,15 @@ export const data = [ batchedRequest: { payload: '[{"name":"Screen View","type":"screen","sentAt":"2022-08-18T08:43:15.539+05:30","userId":"identified user id","context":{"ip":"14.5.67.21","library":{"name":"http"}},"rudderId":"daf823fb-e8d3-413a-8313-d34cd756f968","messageId":"1b8ee4c3-ffad-4457-b453-31b32da1dfea","timestamp":"2020-02-02T00:23:09.544Z","properties":{"prop1":"5"},"receivedAt":"2022-08-18T08:43:13.521+05:30","request_ip":"[::1]","anonymousId":"anon-id-new","originalTimestamp":"2022-08-18T08:43:15.539+05:30"},{"type":"group","sentAt":"2022-08-18T08:43:15.539+05:30","traits":{"name":"Company","industry":"Industry","employees":123},"userId":"user123","context":{"ip":"14.5.67.21","traits":{"trait1":"new-val"},"library":{"name":"http"}},"groupId":"group1","rudderId":"bda76e3e-87eb-4153-9d1e-e9c2ed48b7a5","messageId":"2c59b527-3235-4fc2-9680-f41ec52ebb51","timestamp":"2020-01-21T00:21:34.208Z","receivedAt":"2022-08-18T08:43:13.521+05:30","request_ip":"[::1]","originalTimestamp":"2022-08-18T08:43:15.539+05:30"}]', - destConfig: { clientContext: '', lambda: 'testFunction', invocationType: 'Event' }, + destConfig: { + clientContext: '', + lambda: 'testFunction', + invocationType: 'Event', + }, }, metadata: [ { - userId: 'u1', + userId: 'anon-id-new<<>>identified user id', jobId: 34, sourceId: '2DTlLPQxignYp4ag9sISgGN2uY7', destinationId: '2DTozIMGtBwTGNJtuvdPByFSL2Z', @@ -29864,11 +29953,18 @@ export const data = [ type: 'screen', sentAt: '2022-08-18T08:43:15.539+05:30', userId: 'identified user id', - context: { ip: '14.5.67.21', library: { name: 'http' } }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, rudderId: 'daf823fb-e8d3-413a-8313-d34cd756f968', messageId: '1b8ee4c3-ffad-4457-b453-31b32da1dfea', timestamp: '2020-02-02T00:23:09.544Z', - properties: { prop1: '5' }, + properties: { + prop1: '5', + }, receivedAt: '2022-08-18T08:43:13.521+05:30', request_ip: '[::1]', anonymousId: 'anon-id-new', @@ -29911,7 +30007,7 @@ export const data = [ workerAssignedTime: '2022-08-18T08:43:16.586825+05:30', }, { - userId: 'u1', + userId: 'anon-id-new<<>>identified user id', jobId: 35, sourceId: '2DTlLPQxignYp4ag9sISgGN2uY7', destinationId: '2DTozIMGtBwTGNJtuvdPByFSL2Z', @@ -29933,12 +30029,20 @@ export const data = [ EventPayload: { type: 'group', sentAt: '2022-08-18T08:43:15.539+05:30', - traits: { name: 'Company', industry: 'Industry', employees: 123 }, + traits: { + name: 'Company', + industry: 'Industry', + employees: 123, + }, userId: 'user123', context: { ip: '14.5.67.21', - traits: { trait1: 'new-val' }, - library: { name: 'http' }, + traits: { + trait1: 'new-val', + }, + library: { + name: 'http', + }, }, groupId: 'group1', rudderId: 'bda76e3e-87eb-4153-9d1e-e9c2ed48b7a5', @@ -29992,11 +30096,15 @@ export const data = [ batchedRequest: { payload: '[{"type":"alias","sentAt":"2022-08-18T08:43:15.539+05:30","userId":"user123","context":{"ip":"14.5.67.21","traits":{"trait1":"new-val"},"library":{"name":"http"}},"rudderId":"bda76e3e-87eb-4153-9d1e-e9c2ed48b7a5","messageId":"3ff8d400-b6d4-43a4-a0ff-1bc7ae8b5f7d","timestamp":"2020-01-21T00:21:34.208Z","previousId":"previd1","receivedAt":"2022-08-18T08:43:13.521+05:30","request_ip":"[::1]","originalTimestamp":"2022-08-18T08:43:15.539+05:30"}]', - destConfig: { clientContext: '', lambda: 'testFunction', invocationType: 'Event' }, + destConfig: { + clientContext: '', + lambda: 'testFunction', + invocationType: 'Event', + }, }, metadata: [ { - userId: 'u1', + userId: 'anon-id-new<<>>identified user id', jobId: 36, sourceId: '2DTlLPQxignYp4ag9sISgGN2uY7', destinationId: '2DTozIMGtBwTGNJtuvdPByFSL2Z', @@ -30021,8 +30129,12 @@ export const data = [ userId: 'user123', context: { ip: '14.5.67.21', - traits: { trait1: 'new-val' }, - library: { name: 'http' }, + traits: { + trait1: 'new-val', + }, + library: { + name: 'http', + }, }, rudderId: 'bda76e3e-87eb-4153-9d1e-e9c2ed48b7a5', messageId: '3ff8d400-b6d4-43a4-a0ff-1bc7ae8b5f7d', @@ -30075,7 +30187,7 @@ export const data = [ { metadata: [ { - userId: 'u1', + userId: 'anon-id-new<<>>identified user id', jobId: 31, sourceId: '2DTlLPQxignYp4ag9sISgGN2uY7', destinationId: '2DTozIMGtBwTGNJtuvdPByFSL2Z', @@ -38615,7 +38727,9 @@ export const data = [ ], trait1: 'new-val', }, - library: { name: 'http' }, + library: { + name: 'http', + }, }, rudderId: 'daf823fb-e8d3-413a-8313-d34cd756f968', messageId: 'c864b4cd-8f07-4922-b3d0-82ef04c987d3', diff --git a/test/integrations/destinations/leanplum/router/data.ts b/test/integrations/destinations/leanplum/router/data.ts index 29282c8b29..db75a7fdc4 100644 --- a/test/integrations/destinations/leanplum/router/data.ts +++ b/test/integrations/destinations/leanplum/router/data.ts @@ -27,25 +27,49 @@ export const data = [ name: 'generic_x86', type: 'android', }, - library: { name: 'com.rudderstack.android.sdk.core', version: '1.0.1-beta.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 }, + 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: '5094f5704b9cf2b3' }, + traits: { + anonymousId: '5094f5704b9cf2b3', + }, userAgent: 'Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)', }, event: 'MainActivity', - integrations: { All: true }, + integrations: { + All: true, + }, messageId: 'id1', - properties: { name: 'MainActivity', automatic: true }, + properties: { + name: 'MainActivity', + automatic: true, + }, originalTimestamp: '2020-03-12T09:05:03.421Z', type: 'screen', sentAt: '2020-03-12T09:05:13.042Z', }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, destination: { Config: { applicationId: 'leanplum_application_id', @@ -74,8 +98,12 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://api.leanplum.com/api', - headers: { 'Content-Type': 'application/json' }, - params: { action: 'start' }, + headers: { + 'Content-Type': 'application/json', + }, + params: { + action: 'start', + }, body: { JSON: { appId: 'leanplum_application_id', @@ -88,7 +116,9 @@ export const data = [ systemVersion: '8.1.0', deviceName: 'generic_x86', deviceModel: 'Android SDK built for x86', - userAttributes: { anonymousId: '5094f5704b9cf2b3' }, + userAttributes: { + anonymousId: '5094f5704b9cf2b3', + }, locale: 'en-US', timezone: 'Asia/Kolkata', time: 1584003903, @@ -106,8 +136,12 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://api.leanplum.com/api', - headers: { 'Content-Type': 'application/json' }, - params: { action: 'advance' }, + headers: { + 'Content-Type': 'application/json', + }, + params: { + action: 'advance', + }, body: { JSON: { appId: 'leanplum_application_id', @@ -127,7 +161,11 @@ export const data = [ userId: '5094f5704b9cf2b3', }, ], - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [ + { + jobId: 1, + }, + ], batched: false, statusCode: 200, destination: { @@ -173,25 +211,49 @@ export const data = [ name: 'generic_x86', type: 'android', }, - library: { name: 'com.rudderstack.android.sdk.core', version: '1.0.1-beta.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 }, + 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: '5094f5704b9cf2b3' }, + traits: { + anonymousId: '5094f5704b9cf2b3', + }, userAgent: 'Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)', }, event: 'MainActivity', - integrations: { All: true }, + integrations: { + All: true, + }, messageId: 'id2', - properties: { name: 'MainActivity', automatic: true }, + properties: { + name: 'MainActivity', + automatic: true, + }, originalTimestamp: '2020-03-12T09:05:03.421Z', type: 'screen', sentAt: '2020-03-12T09:05:13.042Z', }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, destination: { Config: { applicationId: 'leanplum_application_id', @@ -220,8 +282,12 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://api.leanplum.com/api', - headers: { 'Content-Type': 'application/json' }, - params: { action: 'start' }, + headers: { + 'Content-Type': 'application/json', + }, + params: { + action: 'start', + }, body: { JSON: { appId: 'leanplum_application_id', @@ -234,7 +300,9 @@ export const data = [ systemVersion: '8.1.0', deviceName: 'generic_x86', deviceModel: 'Android SDK built for x86', - userAttributes: { anonymousId: '5094f5704b9cf2b3' }, + userAttributes: { + anonymousId: '5094f5704b9cf2b3', + }, locale: 'en-US', timezone: 'Asia/Kolkata', time: 1584003903, @@ -252,8 +320,12 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://api.leanplum.com/api', - headers: { 'Content-Type': 'application/json' }, - params: { action: 'advance' }, + headers: { + 'Content-Type': 'application/json', + }, + params: { + action: 'advance', + }, body: { JSON: { appId: 'leanplum_application_id', @@ -273,7 +345,11 @@ export const data = [ userId: '5094f5704b9cf2b3', }, ], - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { diff --git a/test/integrations/destinations/lemnisk/router/data.ts b/test/integrations/destinations/lemnisk/router/data.ts index 2f6364a0b0..1a1b84f180 100644 --- a/test/integrations/destinations/lemnisk/router/data.ts +++ b/test/integrations/destinations/lemnisk/router/data.ts @@ -12,7 +12,12 @@ export const data = [ { message: { anonymousId: 'anon-id-new', - context: { ip: '14.5.67.21', library: { name: 'http' } }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, type: 'identify', }, destination: { @@ -82,7 +87,9 @@ export const data = [ rootStore: null, isProcessorEnabled: true, }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, }, { message: { @@ -95,7 +102,10 @@ export const data = [ event: 'Visited Home', messageId: '1601322811899-d9c7dd00-50dc-4364-95c8-e89423eb3cfb', originalTimestamp: '2020-09-29T14:50:29.907+05:30', - traits: { name: 'Home | RudderStack', url: 'http://www.rudderstack.com' }, + traits: { + name: 'Home | RudderStack', + url: 'http://www.rudderstack.com', + }, receivedAt: '2020-09-29T14:50:43.005+05:30', sentAt: '2020-09-28T19:53:44.998Z', timestamp: '2020-09-29T14:50:29.907+05:30', @@ -175,7 +185,6 @@ export const data = [ jobId: 123, messageId: '4aaecff2-a513-4bbf-9824-c471f4ac9777', sourceId: '1YhwKyDcKstudlGxkeN5p2wgsrp', - userId: 'u1', }, }, { @@ -183,20 +192,39 @@ export const data = [ anonymousId: 'anon-id-new', channel: 'mobile', context: { - app: { build: '4', name: 'RuddCDN' }, - page: { referrer: 'google.com' }, - device: { id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', name: 'generic_x86_arm' }, - library: { name: 'com.rudderstack.android.sdk.core', version: '1.0.6' }, - os: { name: 'Android', version: '9' }, + app: { + build: '4', + name: 'RuddCDN', + }, + page: { + referrer: 'google.com', + }, + device: { + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + name: 'generic_x86_arm', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.6', + }, + os: { + name: 'Android', + version: '9', + }, timezone: 'Asia/Kolkata', - traits: { customProp: 'customValue' }, + traits: { + customProp: 'customValue', + }, userAgent: 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', }, event: 'Visited Home', messageId: '1601322811899-d9c7dd00-50dc-4364-95c8-e89423eb3cfb', originalTimestamp: '2020-09-28T19:53:31.900Z', - properties: { title: 'Home | RudderStack', url: 'http://www.rudderstack.com' }, + properties: { + title: 'Home | RudderStack', + url: 'http://www.rudderstack.com', + }, receivedAt: '2020-09-29T14:50:43.005+05:30', sentAt: '2020-09-28T19:53:44.998Z', timestamp: '2020-09-29T14:50:29.907+05:30', @@ -276,7 +304,6 @@ export const data = [ jobId: 129, messageId: '8b8d5937-09bc-49dc-a35e-8cd6370575f8', sourceId: '1YhwKyDcKstudlGxkeN5p2wgsrp', - userId: 'u1', }, }, ], @@ -358,7 +385,11 @@ export const data = [ rootStore: null, isProcessorEnabled: true, }, - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [ + { + jobId: 1, + }, + ], statTags: { destType: 'LEMNISK', feature: 'router', @@ -377,7 +408,9 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'http://10.11.36.17:8080/analyze/analyze.php', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, params: {}, body: { JSON: { @@ -479,7 +512,6 @@ export const data = [ jobId: 123, messageId: '4aaecff2-a513-4bbf-9824-c471f4ac9777', sourceId: '1YhwKyDcKstudlGxkeN5p2wgsrp', - userId: 'u1', }, ], batched: false, @@ -491,27 +523,45 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'http://10.11.36.17:8080/analyze/analyze.php', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, params: {}, body: { JSON: { type: 'track', context: { - app: { build: '4', name: 'RuddCDN' }, - page: { referrer: 'google.com' }, + app: { + build: '4', + name: 'RuddCDN', + }, + page: { + referrer: 'google.com', + }, device: { id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', name: 'generic_x86_arm', }, - library: { name: 'com.rudderstack.android.sdk.core', version: '1.0.6' }, - os: { name: 'Android', version: '9' }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.6', + }, + os: { + name: 'Android', + version: '9', + }, timezone: 'Asia/Kolkata', - traits: { customProp: 'customValue' }, + traits: { + customProp: 'customValue', + }, userAgent: { ua: 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', }, }, - properties: { title: 'Home | RudderStack', url: 'http://www.rudderstack.com' }, + properties: { + title: 'Home | RudderStack', + url: 'http://www.rudderstack.com', + }, event: 'Visited Home', id: 'anon-id-new', userId: 'anon-id-new', @@ -601,7 +651,6 @@ export const data = [ jobId: 129, messageId: '8b8d5937-09bc-49dc-a35e-8cd6370575f8', sourceId: '1YhwKyDcKstudlGxkeN5p2wgsrp', - userId: 'u1', }, ], batched: false, diff --git a/test/integrations/destinations/lytics/router/data.ts b/test/integrations/destinations/lytics/router/data.ts index e5d9adae5c..98aded20bf 100644 --- a/test/integrations/destinations/lytics/router/data.ts +++ b/test/integrations/destinations/lytics/router/data.ts @@ -20,9 +20,15 @@ export const data = [ namespace: 'com.rudderlabs.javascript', version: '1.1.6', }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.1.6' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.6', + }, locale: 'en-GB', - os: { name: '', version: '' }, + os: { + name: '', + version: '', + }, page: { path: '/testing/script-test.html', referrer: '', @@ -30,9 +36,13 @@ export const data = [ title: '', url: 'http://localhost:3243/testing/script-test.html', }, - screen: { density: 2 }, + screen: { + density: 2, + }, traits: { - company: { id: 'abc123' }, + company: { + id: 'abc123', + }, createdAt: 'Thu Mar 24 2016 17:46:45 GMT+0000 (UTC)', email: 'rudderTest@gmail.com', name: 'Rudder Test', @@ -42,7 +52,9 @@ export const data = [ 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.80 Safari/537.36', }, event: 'Order Completed', - integrations: { All: true }, + integrations: { + All: true, + }, messageId: 'a0adfab9-baf7-4e09-a2ce-bbe2844c324a', timestamp: '2020-10-16T08:10:12.782Z', properties: { @@ -111,9 +123,14 @@ export const data = [ type: 'track', userId: 'rudder123', }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, destination: { - Config: { apiKey: 'dummyApiKey', stream: 'default' }, + Config: { + apiKey: 'dummyApiKey', + stream: 'default', + }, Enabled: true, Transformations: [], IsProcessorEnabled: true, @@ -130,9 +147,15 @@ export const data = [ namespace: 'com.rudderlabs.javascript', version: '1.1.6', }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.1.6' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.6', + }, locale: 'en-GB', - os: { name: '', version: '' }, + os: { + name: '', + version: '', + }, page: { path: '/testing/script-test.html', referrer: '', @@ -140,9 +163,13 @@ export const data = [ title: '', url: 'http://localhost:3243/testing/script-test.html', }, - screen: { density: 2 }, + screen: { + density: 2, + }, traits: { - company: { id: 'abc123' }, + company: { + id: 'abc123', + }, createdAt: 'Thu Mar 24 2016 17:46:45 GMT+0000 (UTC)', email: 'rudderTest@gmail.com', name: 'Rudder Test', @@ -151,7 +178,9 @@ export const data = [ userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.80 Safari/537.36', }, - integrations: { All: true }, + integrations: { + All: true, + }, messageId: 'e108eb05-f6cd-4624-ba8c-568f2e2b3f92', originalTimestamp: '2020-10-16T08:26:14.938Z', receivedAt: '2020-10-16T13:56:14.945+05:30', @@ -161,9 +190,14 @@ export const data = [ type: 'identify', userId: 'rudder123', }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, destination: { - Config: { apiKey: 'dummyApiKey', stream: 'default' }, + Config: { + apiKey: 'dummyApiKey', + stream: 'default', + }, Enabled: true, Transformations: [], IsProcessorEnabled: true, @@ -186,7 +220,9 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://api.lytics.io/collect/json/default?access_token=dummyApiKey', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, params: {}, body: { JSON: { @@ -248,11 +284,18 @@ export const data = [ }, files: {}, }, - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [ + { + jobId: 1, + }, + ], batched: false, statusCode: 200, destination: { - Config: { apiKey: 'dummyApiKey', stream: 'default' }, + Config: { + apiKey: 'dummyApiKey', + stream: 'default', + }, Enabled: true, Transformations: [], IsProcessorEnabled: true, @@ -264,7 +307,9 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://api.lytics.io/collect/json/default?access_token=dummyApiKey', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, params: {}, body: { JSON: { @@ -281,11 +326,18 @@ export const data = [ }, files: {}, }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { - Config: { apiKey: 'dummyApiKey', stream: 'default' }, + Config: { + apiKey: 'dummyApiKey', + stream: 'default', + }, Enabled: true, Transformations: [], IsProcessorEnabled: true, diff --git a/test/integrations/destinations/mailchimp/router/data.ts b/test/integrations/destinations/mailchimp/router/data.ts index 93635e5369..f6a9627719 100644 --- a/test/integrations/destinations/mailchimp/router/data.ts +++ b/test/integrations/destinations/mailchimp/router/data.ts @@ -27,7 +27,9 @@ export const data = [ Enabled: true, Transformations: [], }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, message: { anonymousId: 'userId12345', channel: 'web', @@ -39,10 +41,18 @@ export const data = [ version: '1.0.0', }, ip: '0.0.0.0', - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, locale: 'en-US', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, traits: { anonymousId: 'userId12345', email: 'bob.dole@initech.com', @@ -52,7 +62,9 @@ export const data = [ 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 }, + integrations: { + All: true, + }, messageId: '21e475b2-3694-477b-afb6-5b94a81aac21', originalTimestamp: '2019-11-15T10:22:32Z', receivedAt: '2019-11-15T15:52:37+05:30', @@ -82,7 +94,9 @@ export const data = [ Enabled: true, Transformations: [], }, - metadata: { jobId: 3, userId: 'u1' }, + metadata: { + jobId: 3, + }, message: { anonymousId: 'userId12345', channel: 'web', @@ -94,15 +108,30 @@ export const data = [ version: '1.0.0', }, ip: '0.0.0.0', - library: { name: 'RudderLabs JavaScript SDK', version: '1.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' }, + 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' } }, + integrations: { + MailChimp: { + subscriptionStatus: 'subscribed', + }, + }, messageId: '6d1f3ca8-e2d0-4d34-9926-44596171af0c', originalTimestamp: '2019-11-15T10:26:53Z', receivedAt: '2019-11-15T15:56:58+05:30', @@ -132,7 +161,9 @@ export const data = [ Enabled: true, Transformations: [], }, - metadata: { jobId: 4, userId: 'u1' }, + metadata: { + jobId: 4, + }, message: { anonymousId: 'userId12345', channel: 'web', @@ -144,15 +175,30 @@ export const data = [ version: '1.0.0', }, ip: '0.0.0.0', - library: { name: 'RudderLabs JavaScript SDK', version: '1.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' }, + 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' } }, + integrations: { + MailChimp: { + subscriptionStatus: 'subscrib', + }, + }, messageId: '6d1f3ca8-e2d0-4d34-9926-44596171af0c', originalTimestamp: '2019-11-15T10:26:53Z', receivedAt: '2019-11-15T15:56:58+05:30', @@ -182,12 +228,22 @@ export const data = [ Enabled: true, Transformations: [], }, - metadata: { jobId: 5, userId: 'u1' }, + metadata: { + jobId: 5, + }, message: { anonymousId: 'userId12345', channel: 'web', - context: { traits: { anonymousId: 'userId12345', email: 'bob.dole@initech.com' } }, - properties: { brand: 'Aster', product: 'Garments' }, + 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', @@ -217,12 +273,23 @@ export const data = [ Enabled: true, Transformations: [], }, - metadata: { jobId: 6, userId: 'u1' }, + 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 }, + 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', @@ -251,18 +318,31 @@ export const data = [ Enabled: true, Transformations: [], }, - metadata: { jobId: 7, userId: 'u1' }, + metadata: { + jobId: 7, + }, message: { anonymousId: 'userId12345', channel: 'web', - context: { traits: { anonymousId: 'userId12345', email: 'bob.dole@initech.com' } }, + 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 }, + { + product_id: '123', + price: '14', + }, + { + product_id: '123', + price: 14, + }, ], purchased: false, }, @@ -304,12 +384,18 @@ export const data = [ members: [ { email_address: 'bob.dole@initech.com', - merge_fields: { FNAME: 'Bob', LNAME: 'Dole', ANONYMOUSI: 'userId12345' }, + merge_fields: { + FNAME: 'Bob', + LNAME: 'Dole', + ANONYMOUSI: 'userId12345', + }, status: 'subscribed', }, { email_address: 'bob.dole@initech.com', - merge_fields: { ANONYMOUSI: 'userId12345' }, + merge_fields: { + ANONYMOUSI: 'userId12345', + }, status: 'subscribed', }, ], @@ -322,8 +408,12 @@ export const data = [ files: {}, }, metadata: [ - { jobId: 2, userId: 'u1' }, - { jobId: 3, userId: 'u1' }, + { + jobId: 2, + }, + { + jobId: 3, + }, ], batched: true, statusCode: 200, @@ -361,7 +451,10 @@ export const data = [ JSON: { name: 'local_testing', occurred_at: '2019-11-15T10:26:53+00:00', - properties: { brand: 'Aster', product: 'Garments' }, + properties: { + brand: 'Aster', + product: 'Garments', + }, }, XML: {}, JSON_ARRAY: {}, @@ -370,7 +463,11 @@ export const data = [ files: {}, audienceId: 'aud111', }, - metadata: [{ jobId: 5, userId: 'u1' }], + metadata: [ + { + jobId: 5, + }, + ], batched: false, statusCode: 200, destination: { @@ -423,7 +520,11 @@ export const data = [ files: {}, audienceId: 'aud111', }, - metadata: [{ jobId: 7, userId: 'u1' }], + metadata: [ + { + jobId: 7, + }, + ], batched: false, statusCode: 200, destination: { @@ -462,7 +563,11 @@ export const data = [ Enabled: true, Transformations: [], }, - metadata: [{ jobId: 6, userId: 'u1' }], + metadata: [ + { + jobId: 6, + }, + ], batched: false, statusCode: 400, error: 'Missing required value from "event"', @@ -493,7 +598,11 @@ export const data = [ Enabled: true, Transformations: [], }, - metadata: [{ jobId: 4, userId: 'u1' }], + metadata: [ + { + jobId: 4, + }, + ], batched: false, statusCode: 400, error: @@ -539,7 +648,9 @@ export const data = [ Enabled: true, Transformations: [], }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, message: { anonymousId: 'userId12345', channel: 'web', @@ -559,15 +670,30 @@ export const data = [ version: '1.0.0', }, ip: '0.0.0.0', - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, locale: 'en-US', - os: { name: '', version: '' }, - screen: { density: 2 }, + 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' }, + 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', @@ -596,10 +722,14 @@ export const data = [ Enabled: true, Transformations: [], }, - metadata: { jobId: 3, userId: 'u1' }, + metadata: { + jobId: 3, + }, message: { type: 'identify', - traits: { status: 'subscribed' }, + traits: { + status: 'subscribed', + }, userId: 'emrichardson820+22822@gmail.com', channel: 'sources', context: { @@ -642,10 +772,14 @@ export const data = [ Enabled: true, Transformations: [], }, - metadata: { jobId: 4, userId: 'u1' }, + metadata: { + jobId: 4, + }, message: { type: 'identify', - traits: { status: 'subscribed' }, + traits: { + status: 'subscribed', + }, userId: 'emrichardson820+22822@gmail.com', channel: 'sources', context: { @@ -688,10 +822,14 @@ export const data = [ Enabled: true, Transformations: [], }, - metadata: { jobId: 5, userId: 'u1' }, + metadata: { + jobId: 5, + }, message: { type: 'identify', - traits: { status: 'subscrib' }, + traits: { + status: 'subscrib', + }, userId: 'emrichardson820+22822@gmail.com', channel: 'sources', context: { @@ -743,12 +881,20 @@ export const data = [ JSON: { members: [ { - merge_fields: { FIRSTNAME: 'Bob' }, + 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' }, + { + status: 'subscribed', + email_address: 'emrichardson820+22822@gmail.com', + }, + { + status: 'subscribed', + email_address: 'emrichardson820+22822@gmail.com', + }, ], update_existing: true, }, @@ -759,9 +905,15 @@ export const data = [ files: {}, }, metadata: [ - { jobId: 2, userId: 'u1' }, - { jobId: 3, userId: 'u1' }, - { jobId: 4, userId: 'u1' }, + { + jobId: 2, + }, + { + jobId: 3, + }, + { + jobId: 4, + }, ], batched: true, statusCode: 200, @@ -799,7 +951,11 @@ export const data = [ Enabled: true, Transformations: [], }, - metadata: [{ jobId: 5, userId: 'u1' }], + metadata: [ + { + jobId: 5, + }, + ], batched: false, statusCode: 400, error: diff --git a/test/integrations/destinations/mailjet/router/data.ts b/test/integrations/destinations/mailjet/router/data.ts index 82fb0334c3..85c96629ff 100644 --- a/test/integrations/destinations/mailjet/router/data.ts +++ b/test/integrations/destinations/mailjet/router/data.ts @@ -18,7 +18,9 @@ export const data = [ contactPropertiesMapping: [{ from: 'userCountry', to: 'country' }], }, }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, message: { userId: 'user@45', type: 'identify', @@ -63,14 +65,23 @@ export const data = [ FORM: {}, JSON: { Action: 'addnoforce', - Contacts: [{ email: 'test@user.com', properties: { country: 'india' } }], + Contacts: [ + { + email: 'test@user.com', + properties: { country: 'india' }, + }, + ], }, JSON_ARRAY: {}, XML: {}, }, files: {}, }, - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [ + { + jobId: 1, + }, + ], batched: true, statusCode: 200, destination: { @@ -78,7 +89,12 @@ export const data = [ apiKey: 'dummyApiKey', apiSecret: 'dummyApiSecret', listId: '58578', - contactPropertiesMapping: [{ from: 'userCountry', to: 'country' }], + contactPropertiesMapping: [ + { + from: 'userCountry', + to: 'country', + }, + ], }, }, }, diff --git a/test/integrations/destinations/mailmodo/router/data.ts b/test/integrations/destinations/mailmodo/router/data.ts index 3b492b0a82..c341259bbe 100644 --- a/test/integrations/destinations/mailmodo/router/data.ts +++ b/test/integrations/destinations/mailmodo/router/data.ts @@ -14,8 +14,15 @@ export const data = [ type: 'identify', event: 'Email Opened', sentAt: '2020-08-28T16:26:16.473Z', - context: { library: { name: 'analytics-node', version: '0.0.3' } }, - _metadata: { nodeVersion: '10.22.0' }, + context: { + library: { + name: 'analytics-node', + version: '0.0.3', + }, + }, + _metadata: { + nodeVersion: '10.22.0', + }, messageId: 'node-570110489d3e99b234b18af9a9eca9d4-6009779e-82d7-469d-aaeb-5ccf162b0453', properties: { @@ -27,16 +34,31 @@ export const data = [ anonymousId: 'abcdeeeeeeeexxxx102', originalTimestamp: '2020-08-28T16:26:06.468Z', }, - metadata: { jobId: 2, userId: 'u1' }, - destination: { Config: { apiKey: 'dummyApiKey', listName: 'abc' }, Enabled: true }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + apiKey: 'dummyApiKey', + listName: 'abc', + }, + Enabled: true, + }, }, { message: { type: 'track', event: 'Email Opened', sentAt: '2020-08-28T16:26:16.473Z', - context: { library: { name: 'analytics-node', version: '0.0.3' } }, - _metadata: { nodeVersion: '10.22.0' }, + context: { + library: { + name: 'analytics-node', + version: '0.0.3', + }, + }, + _metadata: { + nodeVersion: '10.22.0', + }, messageId: 'node-570110489d3e99b234b18af9a9eca9d4-6009779e-82d7-469d-aaeb-5ccf162b0453', properties: { @@ -48,8 +70,16 @@ export const data = [ anonymousId: 'abcdeeeeeeeexxxx102', originalTimestamp: '2020-08-28T16:26:06.468Z', }, - metadata: { jobId: 3, userId: 'u1' }, - destination: { Config: { apiKey: 'dummyApiKey', listName: 'abc' }, Enabled: true }, + metadata: { + jobId: 3, + }, + destination: { + Config: { + apiKey: 'dummyApiKey', + listName: 'abc', + }, + Enabled: true, + }, }, { message: { @@ -57,9 +87,13 @@ export const data = [ userId: 'identified user id', anonymousId: 'anon-id-new', context: { - traits: { trait1: 'new-val' }, + traits: { + trait1: 'new-val', + }, ip: '14.5.67.21', - library: { name: 'http' }, + library: { + name: 'http', + }, }, traits: { email: 'test@abc.com', @@ -71,16 +105,31 @@ export const data = [ }, timestamp: '2020-02-02T00:23:09.544Z', }, - metadata: { jobId: 4, userId: 'u1' }, - destination: { Config: { apiKey: 'dummyApiKey', listName: 'abc' }, Enabled: true }, + metadata: { + jobId: 4, + }, + destination: { + Config: { + apiKey: 'dummyApiKey', + listName: 'abc', + }, + Enabled: true, + }, }, { message: { type: 'identify', event: 'Email Opened', sentAt: '2020-08-28T16:26:16.473Z', - context: { library: { name: 'analytics-node', version: '0.0.3' } }, - _metadata: { nodeVersion: '10.22.0' }, + context: { + library: { + name: 'analytics-node', + version: '0.0.3', + }, + }, + _metadata: { + nodeVersion: '10.22.0', + }, messageId: 'node-570110489d3e99b234b18af9a9eca9d4-6009779e-82d7-469d-aaeb-5ccf162b0453', properties: { @@ -91,8 +140,16 @@ export const data = [ anonymousId: 'abcdeeeeeeeexxxx102', originalTimestamp: '2020-08-28T16:26:06.468Z', }, - metadata: { jobId: 5, userId: 'u1' }, - destination: { Config: { apiKey: 'dummyApiKey', listName: '' }, Enabled: true }, + metadata: { + jobId: 5, + }, + destination: { + Config: { + apiKey: 'dummyApiKey', + listName: '', + }, + Enabled: true, + }, }, ], destType: 'mailmodo', @@ -114,7 +171,9 @@ export const data = [ JSON: { listName: 'abc', values: [ - { email: 'test@abc.com' }, + { + email: 'test@abc.com', + }, { email: 'test@abc.com', data: { @@ -133,17 +192,30 @@ export const data = [ files: {}, method: 'POST', params: {}, - headers: { mmApiKey: 'dummyApiKey', 'Content-Type': 'application/json' }, + headers: { + mmApiKey: 'dummyApiKey', + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://api.mailmodo.com/api/v1/addToList/batch', }, metadata: [ - { jobId: 2, userId: 'u1' }, - { jobId: 4, userId: 'u1' }, + { + jobId: 2, + }, + { + jobId: 4, + }, ], batched: true, statusCode: 200, - destination: { Config: { apiKey: 'dummyApiKey', listName: 'abc' }, Enabled: true }, + destination: { + Config: { + apiKey: 'dummyApiKey', + listName: 'abc', + }, + Enabled: true, + }, }, { batchedRequest: { @@ -166,20 +238,37 @@ export const data = [ files: {}, method: 'POST', params: {}, - headers: { mmApiKey: 'dummyApiKey', 'Content-Type': 'application/json' }, + headers: { + mmApiKey: 'dummyApiKey', + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://api.mailmodo.com/api/v1/addEvent', }, - metadata: [{ jobId: 3, userId: 'u1' }], + metadata: [ + { + jobId: 3, + }, + ], batched: false, statusCode: 200, - destination: { Config: { apiKey: 'dummyApiKey', listName: 'abc' }, Enabled: true }, + destination: { + Config: { + apiKey: 'dummyApiKey', + listName: 'abc', + }, + Enabled: true, + }, }, { batched: false, error: 'Missing required value from ["traits.email","context.traits.email","properties.email"]', - metadata: [{ jobId: 5, userId: 'u1' }], + metadata: [ + { + jobId: 5, + }, + ], statTags: { destType: 'MAILMODO', errorCategory: 'dataValidation', @@ -189,7 +278,13 @@ export const data = [ module: 'destination', }, statusCode: 400, - destination: { Config: { apiKey: 'dummyApiKey', listName: '' }, Enabled: true }, + destination: { + Config: { + apiKey: 'dummyApiKey', + listName: '', + }, + Enabled: true, + }, }, ], }, diff --git a/test/integrations/destinations/marketo/router/data.ts b/test/integrations/destinations/marketo/router/data.ts index 77a5af6cdb..0fa79b77df 100644 --- a/test/integrations/destinations/marketo/router/data.ts +++ b/test/integrations/destinations/marketo/router/data.ts @@ -27,33 +27,66 @@ export const data = [ name: 'generic_x86', type: 'android', }, - library: { name: 'com.rudderstack.android.sdk.core', version: '1.0.1-beta.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 }, + 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' }, + 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 }, + integrations: { + All: true, + }, messageId: 'id1', - properties: { name: 'Test Product' }, + properties: { + name: 'Test Product', + }, originalTimestamp: '2020-12-17T21:00:59.176Z', type: 'track', sentAt: '2020-03-12T09:05:03.421Z', }, - metadata: { jobId: 1, userId: 'u1' }, + 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' }], + customActivityPropertyMap: [ + { + from: 'name', + to: 'productName', + }, + ], + leadTraitMapping: [ + { + from: 'leadScore', + to: 'customLeadScore', + }, + ], rudderEventsMapping: [ { event: 'Product Clicked', @@ -101,20 +134,56 @@ export const data = [ 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, + }, ], }, }, @@ -147,33 +216,67 @@ export const data = [ name: 'generic_x86', type: 'android', }, - library: { name: 'com.rudderstack.android.sdk.core', version: '1.0.1-beta.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 }, + 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' }, + 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 }, + integrations: { + All: true, + }, messageId: 'id1', - properties: { name: 'Test Product', product_id: 'prod_1' }, + 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, userId: 'u1' }, + 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' }], + customActivityPropertyMap: [ + { + from: 'name', + to: 'productName', + }, + ], + leadTraitMapping: [ + { + from: 'leadScore', + to: 'customLeadScore', + }, + ], rudderEventsMapping: [ { event: 'Product Clicked', @@ -221,20 +324,56 @@ export const data = [ 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, + }, ], }, }, @@ -256,7 +395,10 @@ export const data = [ userId: 'e17c5a5e-5e2f-430b-b497-fe3f1ea3a704', channel: 'web', context: { - os: { name: '', version: '' }, + os: { + name: '', + version: '', + }, app: { name: 'RudderLabs JavaScript SDK', build: '1.0.0', @@ -299,7 +441,10 @@ export const data = [ lastWebinarEventDate: '2022-09-15T20:00:00.000Z', nextWebinarEventDate: '2022-09-16T06:15:00.000Z', }, - library: { name: 'RudderLabs JavaScript SDK', version: '2.12.1' }, + 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', @@ -310,7 +455,9 @@ export const data = [ receivedAt: '2022-09-19T10:34:02.956Z', request_ip: '11.105.44.120', anonymousId: '0c7b8b80-9c43-4f8e-b2d2-5e2448a25040', - integrations: { All: true }, + integrations: { + All: true, + }, originalTimestamp: '2022-09-19T10:34:02.000Z', }, destination: { @@ -321,17 +468,38 @@ export const data = [ 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: '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' }, + { + event: 'act_engagement_networking_savetime', + marketoActivityId: '100025', + }, ], }, destinationDefinition: { @@ -365,20 +533,56 @@ export const data = [ 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, + }, ], }, }, @@ -400,7 +604,9 @@ export const data = [ isConnectionEnabled: true, isProcessorEnabled: true, }, - metadata: { jobId: 3, userId: 'u1' }, + metadata: { + jobId: 3, + }, }, { message: { @@ -409,7 +615,10 @@ export const data = [ userId: 'e17c5a5e-5e2f-430b-b497-fe3f1ea3a704', channel: 'web', context: { - os: { name: '', version: '' }, + os: { + name: '', + version: '', + }, app: { name: 'RudderLabs JavaScript SDK', build: '1.0.0', @@ -452,7 +661,10 @@ export const data = [ lastWebinarEventDate: '2022-09-15T20:00:00.000Z', nextWebinarEventDate: '2022-09-16T06:15:00.000Z', }, - library: { name: 'RudderLabs JavaScript SDK', version: '2.12.1' }, + 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', @@ -463,7 +675,9 @@ export const data = [ receivedAt: '2022-09-19T10:34:02.956Z', request_ip: '11.105.44.120', anonymousId: '0c7b8b80-9c43-4f8e-b2d2-5e2448a25040', - integrations: { All: true }, + integrations: { + All: true, + }, originalTimestamp: '2022-09-19T10:34:02.000Z', }, destination: { @@ -474,17 +688,38 @@ export const data = [ 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: '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' }, + { + event: 'act_engagement_networking_savetime', + marketoActivityId: '100025', + }, ], }, destinationDefinition: { @@ -518,20 +753,56 @@ export const data = [ 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, + }, ], }, }, @@ -553,7 +824,9 @@ export const data = [ isConnectionEnabled: true, isProcessorEnabled: true, }, - metadata: { jobId: 4, userId: 'u1' }, + metadata: { + jobId: 4, + }, }, { message: { @@ -562,7 +835,10 @@ export const data = [ userId: 'e17c5a5e-5e2f-430b-b497-fe3f1ea3a704', channel: 'web', context: { - os: { name: '', version: '' }, + os: { + name: '', + version: '', + }, app: { name: 'RudderLabs JavaScript SDK', build: '1.0.0', @@ -605,7 +881,10 @@ export const data = [ lastWebinarEventDate: '2022-09-15T20:00:00.000Z', nextWebinarEventDate: '2022-09-16T06:15:00.000Z', }, - library: { name: 'RudderLabs JavaScript SDK', version: '2.12.1' }, + 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', @@ -616,7 +895,9 @@ export const data = [ receivedAt: '2022-09-19T10:34:02.956Z', request_ip: '11.105.44.120', anonymousId: '0c7b8b80-9c43-4f8e-b2d2-5e2448a25040', - integrations: { All: true }, + integrations: { + All: true, + }, originalTimestamp: '2022-09-19T10:34:02.000Z', }, destination: { @@ -627,17 +908,38 @@ export const data = [ 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: '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' }, + { + event: 'act_engagement_networking_savetime', + marketoActivityId: '100025', + }, ], }, destinationDefinition: { @@ -671,20 +973,56 @@ export const data = [ 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, + }, ], }, }, @@ -706,7 +1044,9 @@ export const data = [ isConnectionEnabled: true, isProcessorEnabled: true, }, - metadata: { jobId: 5, userId: 'u1' }, + metadata: { + jobId: 5, + }, }, ], destType: 'marketo', @@ -750,7 +1090,12 @@ export const data = [ files: {}, }, metadata: [ - { destInfo: { authKey: '1mMy5cqbtfuaKZv1IhVQKnBdVwe' }, jobId: 1, userId: 'u1' }, + { + destInfo: { + authKey: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + }, + jobId: 1, + }, ], batched: false, statusCode: 200, @@ -760,8 +1105,18 @@ export const data = [ clientId: 'marketo_client_id_success', clientSecret: 'marketo_client_secret_success', trackAnonymousEvents: true, - customActivityPropertyMap: [{ from: 'name', to: 'productName' }], - leadTraitMapping: [{ from: 'leadScore', to: 'customLeadScore' }], + customActivityPropertyMap: [ + { + from: 'name', + to: 'productName', + }, + ], + leadTraitMapping: [ + { + from: 'leadScore', + to: 'customLeadScore', + }, + ], rudderEventsMapping: [ { event: 'Product Clicked', @@ -809,20 +1164,56 @@ export const data = [ 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, + }, ], }, }, @@ -868,7 +1259,12 @@ export const data = [ files: {}, }, metadata: [ - { destInfo: { authKey: '1mMy5cqbtfuaKZv1IhVQKnBdVwe' }, jobId: 2, userId: 'u1' }, + { + destInfo: { + authKey: '1mMy5cqbtfuaKZv1IhVQKnBdVwe', + }, + jobId: 2, + }, ], batched: false, statusCode: 200, @@ -878,8 +1274,18 @@ export const data = [ clientId: 'marketo_client_id_success', clientSecret: 'marketo_client_secret_success', trackAnonymousEvents: true, - customActivityPropertyMap: [{ from: 'name', to: 'productName' }], - leadTraitMapping: [{ from: 'leadScore', to: 'customLeadScore' }], + customActivityPropertyMap: [ + { + from: 'name', + to: 'productName', + }, + ], + leadTraitMapping: [ + { + from: 'leadScore', + to: 'customLeadScore', + }, + ], rudderEventsMapping: [ { event: 'Product Clicked', @@ -927,20 +1333,56 @@ export const data = [ 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, + }, ], }, }, @@ -960,9 +1402,17 @@ export const data = [ 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' }, + statTags: { + errorCategory: 'network', + errorType: 'aborted', + }, metadata: [ - { destInfo: { authKey: '1mMy5cqbtfuaKZv1IhVQKnBdVke' }, jobId: 3, userId: 'u1' }, + { + destInfo: { + authKey: '1mMy5cqbtfuaKZv1IhVQKnBdVke', + }, + jobId: 3, + }, ], destination: { Config: { @@ -972,17 +1422,38 @@ export const data = [ 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: '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' }, + { + event: 'act_engagement_networking_savetime', + marketoActivityId: '100025', + }, ], }, destinationDefinition: { @@ -1016,20 +1487,56 @@ export const data = [ 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, + }, ], }, }, @@ -1070,17 +1577,38 @@ export const data = [ 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: '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' }, + { + event: 'act_engagement_networking_savetime', + marketoActivityId: '100025', + }, ], }, destinationDefinition: { @@ -1114,20 +1642,56 @@ export const data = [ 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, + }, ], }, }, @@ -1150,7 +1714,12 @@ export const data = [ isProcessorEnabled: true, }, metadata: [ - { destInfo: { authKey: '1mMy5cqbtfuaKZv1IhVQKnBdVke' }, jobId: 4, userId: 'u1' }, + { + destInfo: { + authKey: '1mMy5cqbtfuaKZv1IhVQKnBdVke', + }, + jobId: 4, + }, ], }, { @@ -1186,7 +1755,12 @@ export const data = [ files: {}, }, metadata: [ - { destInfo: { authKey: '1mMy5cqbtfuaKZv1IhVQKnBdVke' }, jobId: 5, userId: 'u1' }, + { + destInfo: { + authKey: '1mMy5cqbtfuaKZv1IhVQKnBdVke', + }, + jobId: 5, + }, ], batched: false, statusCode: 200, @@ -1198,17 +1772,38 @@ export const data = [ 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: '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' }, + { + event: 'act_engagement_networking_savetime', + marketoActivityId: '100025', + }, ], }, destinationDefinition: { @@ -1242,20 +1837,56 @@ export const data = [ 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, + }, ], }, }, @@ -1311,20 +1942,42 @@ export const data = [ name: 'generic_x86', type: 'android', }, - library: { name: 'com.rudderstack.android.sdk.core', version: '1.0.1-beta.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 }, + 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' }, + 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 }, + integrations: { + All: true, + }, messageId: 'id1', - properties: { name: 'Test Product', product_id: 'prod_1' }, + properties: { + name: 'Test Product', + product_id: 'prod_1', + }, originalTimestamp: '2020-12-17T21:00:59.176Z', type: 'track', sentAt: '2020-12-17T21:00:59.176Z', @@ -1337,10 +1990,21 @@ export const data = [ clientSecret: 'marketo_client_secret_success', trackAnonymousEvents: true, customActivityPropertyMap: [ - { from: 'name', to: 'productName' }, - { from: 'product_id', to: 'productId' }, + { + from: 'name', + to: 'productName', + }, + { + from: 'product_id', + to: 'productId', + }, + ], + leadTraitMapping: [ + { + from: 'leadScore', + to: 'customLeadScore', + }, ], - leadTraitMapping: [{ from: 'leadScore', to: 'customLeadScore' }], createIfNotExist: true, rudderEventsMapping: [ { @@ -1351,7 +2015,17 @@ export const data = [ ], }, }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: [ + { + jobId: 1, + }, + { + jobId: 1, + }, + { + jobId: 1, + }, + ], batched: false, statusCode: 200, }, @@ -1384,7 +2058,12 @@ export const data = [ { activityDate: '2020-12-17T21:00:59.176Z', activityTypeId: 100001, - attributes: [{ name: 'productId', value: 'prod_1' }], + attributes: [ + { + name: 'productId', + value: 'prod_1', + }, + ], leadId: 4, primaryAttributeValue: 'Test Product', }, @@ -1396,7 +2075,19 @@ export const data = [ }, files: {}, }, - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [ + [ + { + jobId: 1, + }, + { + jobId: 1, + }, + { + jobId: 1, + }, + ], + ], batched: false, statusCode: 200, destination: { @@ -1407,10 +2098,21 @@ export const data = [ clientSecret: 'marketo_client_secret_success', trackAnonymousEvents: true, customActivityPropertyMap: [ - { from: 'name', to: 'productName' }, - { from: 'product_id', to: 'productId' }, + { + from: 'name', + to: 'productName', + }, + { + from: 'product_id', + to: 'productId', + }, + ], + leadTraitMapping: [ + { + from: 'leadScore', + to: 'customLeadScore', + }, ], - leadTraitMapping: [{ from: 'leadScore', to: 'customLeadScore' }], createIfNotExist: true, rudderEventsMapping: [ { diff --git a/test/integrations/destinations/marketo_bulk_upload/processor/data.ts b/test/integrations/destinations/marketo_bulk_upload/processor/data.ts index f1b162ad28..5c86afd372 100644 --- a/test/integrations/destinations/marketo_bulk_upload/processor/data.ts +++ b/test/integrations/destinations/marketo_bulk_upload/processor/data.ts @@ -1,505 +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, - }, - ], - }, - }, - }, -]; + { + "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/marketo_static_list/dataDelivery/data.ts b/test/integrations/destinations/marketo_static_list/dataDelivery/data.ts index f0275e329e..e3deebca9b 100644 --- a/test/integrations/destinations/marketo_static_list/dataDelivery/data.ts +++ b/test/integrations/destinations/marketo_static_list/dataDelivery/data.ts @@ -1,375 +1,368 @@ export const data = [ { - name: 'marketo_static_list', - description: 'Test 0', - feature: 'dataDelivery', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - type: 'REST', - endpoint: - 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=110&id=111&id=112', - method: 'POST', - userId: '', - headers: { - Authorization: 'Bearer Incorrect_token', - 'Content-Type': 'application/json', + "name": "marketo_static_list", + "description": "Test 0", + "feature": "dataDelivery", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "type": "REST", + "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=110&id=111&id=112", + "method": "POST", + "userId": "", + "headers": { + "Authorization": "Bearer Incorrect_token", + "Content-Type": "application/json" }, - body: { - FORM: {}, - JSON: {}, - JSON_ARRAY: {}, - XML: {}, - }, - files: {}, - params: { - destination: 'marketo_static_list', + "body": { + "FORM": {}, + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {} }, + "files": {}, + "params": { + "destination": "marketo_static_list" + } }, - method: 'POST', - }, + "method": "POST" + } }, - output: { - response: { - status: 200, - body: { - output: { - message: 'Request Processed Successfully', - destinationResponse: { - response: { - requestId: 'b6d1#18a8d2c10e7', - result: [ + "output": { + "response": { + "status": 200, + "body": { + "output": { + "message": "Request Processed Successfully", + "destinationResponse": { + "response": { + "requestId": "b6d1#18a8d2c10e7", + "result": [ { - id: 110, - status: 'skipped', - reasons: [ + "id": 110, + "status": "skipped", + "reasons": [ { - code: '1015', - message: 'Lead not in list', - }, - ], + "code": "1015", + "message": "Lead not in list" + } + ] }, { - id: 111, - status: 'removed', + "id": 111, + "status": "removed" }, { - id: 112, - status: 'removed', - }, + "id": 112, + "status": "removed" + } ], - success: true, + "success": true }, - status: 200, + "status": 200 }, - status: 200, - }, - }, - }, - }, + "status": 200 + } + } + } + } }, { - name: 'marketo_static_list', - description: 'Test 1', - feature: 'dataDelivery', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - type: 'REST', - endpoint: - 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=1&id=2&id=3', - method: 'POST', - userId: '', - headers: { - Authorization: 'Bearer Incorrect_token', - 'Content-Type': 'application/json', - }, - body: { - FORM: {}, - JSON: {}, - JSON_ARRAY: {}, - XML: {}, + "name": "marketo_static_list", + "description": "Test 1", + "feature": "dataDelivery", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "type": "REST", + "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=1&id=2&id=3", + "method": "POST", + "userId": "", + "headers": { + "Authorization": "Bearer Incorrect_token", + "Content-Type": "application/json" }, - files: {}, - params: { - destination: 'marketo_static_list', + "body": { + "FORM": {}, + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {} }, + "files": {}, + "params": { + "destination": "marketo_static_list" + } }, - method: 'POST', - }, + "method": "POST" + } }, - output: { - response: { - status: 500, - body: { - output: { - status: 500, - message: - 'Request Failed for Marketo Static List, Access token invalid (Retryable).during Marketo Static List Response Handling', - destinationResponse: { - response: { - requestId: '68d8#1846058ee27', - success: false, - errors: [ + "output": { + "response": { + "status": 500, + "body": { + "output": { + "status": 500, + "message": "Request Failed for Marketo Static List, Access token invalid (Retryable).during Marketo Static List Response Handling", + "destinationResponse": { + "response": { + "requestId": "68d8#1846058ee27", + "success": false, + "errors": [ { - code: '601', - message: 'Access token invalid', - }, - ], + "code": "601", + "message": "Access token invalid" + } + ] }, - status: 200, + "status": 200 }, - statTags: { - destType: 'MARKETO_STATIC_LIST', - errorCategory: 'network', - destinationId: 'Non-determininable', - workspaceId: 'Non-determininable', - errorType: 'retryable', - feature: 'dataDelivery', - implementation: 'native', - module: 'destination', - }, - }, - }, - }, - }, + "statTags": { + "destType": "MARKETO_STATIC_LIST", + "errorCategory": "network", + "destinationId": "Non-determininable", + "workspaceId": "Non-determininable", + "errorType": "retryable", + "feature": "dataDelivery", + "implementation": "native", + "module": "destination" + } + } + } + } + } }, { - name: 'marketo_static_list', - description: 'Test 2', - feature: 'dataDelivery', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - type: 'REST', - endpoint: - 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=1&id=2', - method: 'POST', - userId: '', - headers: { - Authorization: 'Bearer token', - 'Content-Type': 'application/json', + "name": "marketo_static_list", + "description": "Test 2", + "feature": "dataDelivery", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "type": "REST", + "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=1&id=2", + "method": "POST", + "userId": "", + "headers": { + "Authorization": "Bearer token", + "Content-Type": "application/json" }, - body: { - FORM: {}, - JSON: { - action: 'createOrUpdate', - input: [ + "body": { + "FORM": {}, + "JSON": { + "action": "createOrUpdate", + "input": [ { - City: 'Tokyo', - Country: 'JP', - Email: 'gabi29@gmail.com', - PostalCode: '100-0001', - Title: 'Owner', - id: 1328328, - userId: 'gabi_userId_45', - }, + "City": "Tokyo", + "Country": "JP", + "Email": "gabi29@gmail.com", + "PostalCode": "100-0001", + "Title": "Owner", + "id": 1328328, + "userId": "gabi_userId_45" + } ], - lookupField: 'id', + "lookupField": "id" }, - JSON_ARRAY: {}, - XML: {}, - }, - files: {}, - params: { - destination: 'marketo_static_list', + "JSON_ARRAY": {}, + "XML": {} }, + "files": {}, + "params": { + "destination": "marketo_static_list" + } }, - method: 'POST', - }, + "method": "POST" + } }, - output: { - response: { - status: 200, - body: { - output: { - status: 200, - message: 'Request Processed Successfully', - destinationResponse: { - response: { - requestId: '12d3c#1846057dce2', - success: true, - result: [ + "output": { + "response": { + "status": 200, + "body": { + "output": { + "status": 200, + "message": "Request Processed Successfully", + "destinationResponse": { + "response": { + "requestId": "12d3c#1846057dce2", + "success": true, + "result": [ { - id: 1, - status: 'added', + "id": 1, + "status": "added" }, { - id: 2, - status: 'added', - }, - ], + "id": 2, + "status": "added" + } + ] }, - status: 200, - }, - }, - }, - }, - }, + "status": 200 + } + } + } + } + } }, { - name: 'marketo_static_list', - description: 'Test 3', - feature: 'dataDelivery', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - type: 'REST', - endpoint: - 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=3&id=4', - method: 'POST', - userId: '', - headers: { - Authorization: 'Bearer token', - 'Content-Type': 'application/json', + "name": "marketo_static_list", + "description": "Test 3", + "feature": "dataDelivery", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "type": "REST", + "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=3&id=4", + "method": "POST", + "userId": "", + "headers": { + "Authorization": "Bearer token", + "Content-Type": "application/json" }, - params: {}, - body: { - FORM: {}, - JSON: { - action: 'createOrUpdate', - input: [ + "params": {}, + "body": { + "FORM": {}, + "JSON": { + "action": "createOrUpdate", + "input": [ { - City: 'Tokyo', - Country: 'JP', - Email: 'gabi29@gmail.com', - PostalCode: '100-0001', - Title: 'Owner', - id: 1328328, - userId: 'gabi_userId_45', + "City": "Tokyo", + "Country": "JP", + "Email": "gabi29@gmail.com", + "PostalCode": "100-0001", + "Title": "Owner", + "id": 1328328, + "userId": "gabi_userId_45" }, { - City: 'Tokyo', - Country: 'JP', - Email: 'b@s.com', - PostalCode: '100-0001', - Title: 'Owner', - id: 1328329, - userId: 'ben_userId_45', - }, + "City": "Tokyo", + "Country": "JP", + "Email": "b@s.com", + "PostalCode": "100-0001", + "Title": "Owner", + "id": 1328329, + "userId": "ben_userId_45" + } ], - lookupField: 'id', + "lookupField": "id" }, - JSON_ARRAY: {}, - XML: {}, + "JSON_ARRAY": {}, + "XML": {} }, - files: {}, + "files": {} }, - method: 'POST', - }, + "method": "POST" + } }, - output: { - response: { - status: 400, - body: { - output: { - destinationResponse: '', - message: - 'Request failed during: during Marketo Static List Response Handling, error: [{"code":"1004","message":"Lead not found"}]', - statTags: { - destType: 'MARKETO_STATIC_LIST', - errorCategory: 'dataValidation', - destinationId: 'Non-determininable', - workspaceId: 'Non-determininable', - errorType: 'instrumentation', - feature: 'dataDelivery', - implementation: 'native', - module: 'destination', + "output": { + "response": { + "status": 400, + "body": { + "output": { + "destinationResponse": "", + "message": "Request failed during: during Marketo Static List Response Handling, error: [{\"code\":\"1004\",\"message\":\"Lead not found\"}]", + "statTags": { + "destType": "MARKETO_STATIC_LIST", + "errorCategory": "dataValidation", + "destinationId": "Non-determininable", + "workspaceId": "Non-determininable", + "errorType": "instrumentation", + "feature": "dataDelivery", + "implementation": "native", + "module": "destination" }, - status: 400, - }, - }, - }, - }, + "status": 400 + } + } + } + } }, { - name: 'marketo_static_list', - description: 'Test 4', - feature: 'dataDelivery', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - type: 'REST', - endpoint: - 'https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=5&id=6', - method: 'POST', - userId: '', - headers: { - Authorization: 'Bearer token', - 'Content-Type': 'application/json', + "name": "marketo_static_list", + "description": "Test 4", + "feature": "dataDelivery", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "type": "REST", + "endpoint": "https://marketo_acct_id_success.mktorest.com/rest/v1/lists/1234/leads.json?id=5&id=6", + "method": "POST", + "userId": "", + "headers": { + "Authorization": "Bearer token", + "Content-Type": "application/json" }, - params: {}, - body: { - FORM: {}, - JSON: { - action: 'createOrUpdate', - input: [ + "params": {}, + "body": { + "FORM": {}, + "JSON": { + "action": "createOrUpdate", + "input": [ { - City: 'Tokyo', - Country: 'JP', - Email: 'gabi29@gmail.com', - PostalCode: '100-0001', - Title: 'Owner', - id: 1328328, - userId: 'gabi_userId_45', + "City": "Tokyo", + "Country": "JP", + "Email": "gabi29@gmail.com", + "PostalCode": "100-0001", + "Title": "Owner", + "id": 1328328, + "userId": "gabi_userId_45" }, { - City: 'Tokyo', - Country: 'JP', - Email: 'b@s.com', - PostalCode: '100-0001', - Title: 'Owner', - id: 1328329, - userId: 'ben_userId_45', - }, + "City": "Tokyo", + "Country": "JP", + "Email": "b@s.com", + "PostalCode": "100-0001", + "Title": "Owner", + "id": 1328329, + "userId": "ben_userId_45" + } ], - lookupField: 'id', + "lookupField": "id" }, - JSON_ARRAY: {}, - XML: {}, + "JSON_ARRAY": {}, + "XML": {} }, - files: {}, + "files": {} }, - method: 'POST', - }, + "method": "POST" + } }, - output: { - response: { - status: 200, - body: { - output: { - status: 200, - message: 'Request Processed Successfully', - destinationResponse: { - response: { - requestId: '12d3c#1846057dce2', - result: { - id: 5, - status: 'skipped', - reasons: [ + "output": { + "response": { + "status": 200, + "body": { + "output": { + "status": 200, + "message": "Request Processed Successfully", + "destinationResponse": { + "response": { + "requestId": "12d3c#1846057dce2", + "result": { + "id": 5, + "status": "skipped", + "reasons": [ { - code: '1015', - message: 'Lead not in list', - }, - ], + "code": "1015", + "message": "Lead not in list" + } + ] }, - success: true, + "success": true }, - status: 200, - }, - }, - }, - }, - }, - }, -]; + "status": 200 + } + } + } + } + } + } +] \ No newline at end of file diff --git a/test/integrations/destinations/marketo_static_list/router/data.ts b/test/integrations/destinations/marketo_static_list/router/data.ts index 6525f7419d..840ad773b3 100644 --- a/test/integrations/destinations/marketo_static_list/router/data.ts +++ b/test/integrations/destinations/marketo_static_list/router/data.ts @@ -38,15 +38,42 @@ export const data = [ type: 'audiencelist', properties: { listData: { - add: [{ id: 1 }, { id: 2 }, { id: 3 }], - remove: [{ id: 4 }, { id: 5 }, { id: 6 }], + 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' } }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, timestamp: '2020-02-02T00:23:09.544Z', }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, }, { destination: { @@ -77,365 +104,1074 @@ export const data = [ 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 }, + { + 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' } }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, timestamp: '2020-02-02T00:23:09.544Z', }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, }, ], destType: 'marketo_static_list', @@ -461,7 +1197,12 @@ export const data = [ 'Content-Type': 'application/json', }, params: {}, - body: { JSON: {}, JSON_ARRAY: {}, XML: {}, FORM: {} }, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, files: {}, }, { @@ -475,12 +1216,22 @@ export const data = [ 'Content-Type': 'application/json', }, params: {}, - body: { JSON: {}, JSON_ARRAY: {}, XML: {}, FORM: {} }, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, files: {}, }, ], metadata: [ - { destInfo: { authKey: '1zia9wKshXt80YksLmUdJnr7IHI' }, jobId: 1, userId: 'u1' }, + { + destInfo: { + authKey: '1zia9wKshXt80YksLmUdJnr7IHI', + }, + jobId: 1, + }, ], batched: false, statusCode: 200, @@ -518,7 +1269,12 @@ export const data = [ 'Content-Type': 'application/json', }, params: {}, - body: { JSON: {}, JSON_ARRAY: {}, XML: {}, FORM: {} }, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, files: {}, }, { @@ -532,12 +1288,22 @@ export const data = [ 'Content-Type': 'application/json', }, params: {}, - body: { JSON: {}, JSON_ARRAY: {}, XML: {}, FORM: {} }, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, files: {}, }, ], metadata: [ - { destInfo: { authKey: '1zia9wKshXt80YksLmUdJnr7IHI' }, jobId: 2, userId: 'u1' }, + { + destInfo: { + authKey: '1zia9wKshXt80YksLmUdJnr7IHI', + }, + jobId: 2, + }, ], batched: false, statusCode: 200, @@ -601,7 +1367,9 @@ export const data = [ message: { type: 'record', action: 'insert', - fields: { id: 1001 }, + fields: { + id: 1001, + }, channel: 'sources', context: { sources: { @@ -610,13 +1378,20 @@ export const data = [ job_run_id: 'ck99nbd2kqiljdihhkh0', task_run_id: 'ck99nbd2kqiljdihhkhg', }, - externalId: [{ type: 'marketoStaticListId', identifierType: 'id' }], + externalId: [ + { + type: 'marketoStaticListId', + identifierType: 'id', + }, + ], destinationFields: 'id', mappedToDestination: 'true', }, recordId: '3', }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, }, { destination: { @@ -642,7 +1417,9 @@ export const data = [ message: { type: 'record', action: 'insert', - fields: { id: 1002 }, + fields: { + id: 1002, + }, channel: 'sources', context: { sources: { @@ -651,13 +1428,20 @@ export const data = [ job_run_id: 'ck99nbd2kqiljdihhkh0', task_run_id: 'ck99nbd2kqiljdihhkhg', }, - externalId: [{ type: 'marketoStaticListId', identifierType: 'id' }], + externalId: [ + { + type: 'marketoStaticListId', + identifierType: 'id', + }, + ], destinationFields: 'id', mappedToDestination: 'true', }, recordId: '3', }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, }, { destination: { @@ -683,7 +1467,9 @@ export const data = [ message: { type: 'record', action: 'insert', - fields: { id: 1003 }, + fields: { + id: 1003, + }, channel: 'sources', context: { sources: { @@ -692,13 +1478,20 @@ export const data = [ job_run_id: 'ck99nbd2kqiljdihhkh0', task_run_id: 'ck99nbd2kqiljdihhkhg', }, - externalId: [{ type: 'marketoStaticListId', identifierType: 'id' }], + externalId: [ + { + type: 'marketoStaticListId', + identifierType: 'id', + }, + ], destinationFields: 'id', mappedToDestination: 'true', }, recordId: '3', }, - metadata: { jobId: 3, userId: 'u1' }, + metadata: { + jobId: 3, + }, }, { destination: { @@ -725,7 +1518,12 @@ export const data = [ action: 'delete', context: { destinationFields: 'id', - externalId: [{ identifierType: 'id', type: 'marketoStaticListId' }], + externalId: [ + { + identifierType: 'id', + type: 'marketoStaticListId', + }, + ], mappedToDestination: 'true', sources: { job_id: 'sf', @@ -736,10 +1534,14 @@ export const data = [ }, recordId: '2', rudderId: '2', - fields: { id: '2001' }, + fields: { + id: '2001', + }, type: 'record', }, - metadata: { jobId: 4, userId: 'u1' }, + metadata: { + jobId: 4, + }, }, { destination: { @@ -766,7 +1568,12 @@ export const data = [ action: 'delete', context: { destinationFields: 'id', - externalId: [{ identifierType: 'id', type: 'marketoStaticListId' }], + externalId: [ + { + identifierType: 'id', + type: 'marketoStaticListId', + }, + ], mappedToDestination: 'true', sources: { job_id: 'sf', @@ -777,10 +1584,14 @@ export const data = [ }, recordId: '2', rudderId: '2', - fields: { id: '2002' }, + fields: { + id: '2002', + }, type: 'record', }, - metadata: { jobId: 5, userId: 'u1' }, + metadata: { + jobId: 5, + }, }, { destination: { @@ -807,7 +1618,12 @@ export const data = [ action: 'delete', context: { destinationFields: 'id', - externalId: [{ identifierType: 'id', type: 'marketoStaticListId' }], + externalId: [ + { + identifierType: 'id', + type: 'marketoStaticListId', + }, + ], mappedToDestination: 'true', sources: { job_id: 'sf', @@ -818,10 +1634,14 @@ export const data = [ }, recordId: '2', rudderId: '2', - fields: { id: '2003' }, + fields: { + id: '2003', + }, type: 'record', }, - metadata: { jobId: 6, userId: 'u1' }, + metadata: { + jobId: 6, + }, }, { destination: { @@ -851,15 +1671,42 @@ export const data = [ type: 'audiencelist', properties: { listData: { - add: [{ id: 101 }, { id: 102 }, { id: 103 }], - remove: [{ id: 4 }, { id: 5 }, { id: 6 }], + 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' } }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, timestamp: '2020-02-02T00:23:09.544Z', }, - metadata: { jobId: 7, userId: 'u1' }, + metadata: { + jobId: 7, + }, }, { destination: { @@ -890,365 +1737,1074 @@ export const data = [ 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 }, + { + 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' } }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, timestamp: '2020-02-02T00:23:09.544Z', }, - metadata: { jobId: 8, userId: 'u1' }, + metadata: { + jobId: 8, + }, }, ], destType: 'marketo_static_list', @@ -1274,14 +2830,34 @@ export const data = [ 'Content-Type': 'application/json', }, params: {}, - body: { JSON: {}, JSON_ARRAY: {}, XML: {}, FORM: {} }, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, files: {}, }, ], metadata: [ - { jobId: 4, destInfo: { authKey: '1zwa1wKshSt81YksKmUdJnr4IOK' }, userId: 'u1' }, - { jobId: 5, destInfo: { authKey: '1zwa1wKshSt81YksKmUdJnr4IOK' }, userId: 'u1' }, - { jobId: 6, destInfo: { authKey: '1zwa1wKshSt81YksKmUdJnr4IOK' }, userId: 'u1' }, + { + jobId: 4, + destInfo: { + authKey: '1zwa1wKshSt81YksKmUdJnr4IOK', + }, + }, + { + jobId: 5, + destInfo: { + authKey: '1zwa1wKshSt81YksKmUdJnr4IOK', + }, + }, + { + jobId: 6, + destInfo: { + authKey: '1zwa1wKshSt81YksKmUdJnr4IOK', + }, + }, ], batched: true, statusCode: 200, @@ -1319,14 +2895,34 @@ export const data = [ 'Content-Type': 'application/json', }, params: {}, - body: { JSON: {}, JSON_ARRAY: {}, XML: {}, FORM: {} }, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, files: {}, }, ], metadata: [ - { jobId: 1, destInfo: { authKey: '1zwa1wKshSt81YksKmUdJnr4IOK' }, userId: 'u1' }, - { jobId: 2, destInfo: { authKey: '1zwa1wKshSt81YksKmUdJnr4IOK' }, userId: 'u1' }, - { jobId: 3, destInfo: { authKey: '1zwa1wKshSt81YksKmUdJnr4IOK' }, userId: 'u1' }, + { + jobId: 1, + destInfo: { + authKey: '1zwa1wKshSt81YksKmUdJnr4IOK', + }, + }, + { + jobId: 2, + destInfo: { + authKey: '1zwa1wKshSt81YksKmUdJnr4IOK', + }, + }, + { + jobId: 3, + destInfo: { + authKey: '1zwa1wKshSt81YksKmUdJnr4IOK', + }, + }, ], batched: true, statusCode: 200, @@ -1364,7 +2960,12 @@ export const data = [ 'Content-Type': 'application/json', }, params: {}, - body: { JSON: {}, JSON_ARRAY: {}, XML: {}, FORM: {} }, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, files: {}, }, { @@ -1378,12 +2979,22 @@ export const data = [ 'Content-Type': 'application/json', }, params: {}, - body: { JSON: {}, JSON_ARRAY: {}, XML: {}, FORM: {} }, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, files: {}, }, ], metadata: [ - { jobId: 7, destInfo: { authKey: '1zia9wKshXt80YksLmUdJnr7IHI' }, userId: 'u1' }, + { + jobId: 7, + destInfo: { + authKey: '1zia9wKshXt80YksLmUdJnr7IHI', + }, + }, ], batched: false, statusCode: 200, @@ -1421,7 +3032,12 @@ export const data = [ 'Content-Type': 'application/json', }, params: {}, - body: { JSON: {}, JSON_ARRAY: {}, XML: {}, FORM: {} }, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, files: {}, }, { @@ -1435,12 +3051,22 @@ export const data = [ 'Content-Type': 'application/json', }, params: {}, - body: { JSON: {}, JSON_ARRAY: {}, XML: {}, FORM: {} }, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, files: {}, }, ], metadata: [ - { jobId: 8, destInfo: { authKey: '1zia9wKshXt80YksLmUdJnr7IHI' }, userId: 'u1' }, + { + jobId: 8, + destInfo: { + authKey: '1zia9wKshXt80YksLmUdJnr7IHI', + }, + }, ], batched: false, statusCode: 200, @@ -1505,7 +3131,9 @@ export const data = [ message: { type: 'record', action: 'insert', - fields: { id: 1001 }, + fields: { + id: 1001, + }, channel: 'sources', context: { sources: { @@ -1514,13 +3142,20 @@ export const data = [ job_run_id: 'ck99nbd2kqiljdihhkh0', task_run_id: 'ck99nbd2kqiljdihhkhg', }, - externalId: [{ type: 'marketoStaticListId', id: 'id001' }], + externalId: [ + { + type: 'marketoStaticListId', + id: 'id001', + }, + ], destinationFields: 'id', mappedToDestination: 'true', }, recordId: '3', }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, }, { destination: { @@ -1546,7 +3181,9 @@ export const data = [ message: { type: 'record', action: 'insert', - fields: { id: 1002 }, + fields: { + id: 1002, + }, channel: 'sources', context: { sources: { @@ -1555,13 +3192,20 @@ export const data = [ job_run_id: 'ck99nbd2kqiljdihhkh0', task_run_id: 'ck99nbd2kqiljdihhkhg', }, - externalId: [{ type: 'marketoStaticListId', id: 'id002' }], + externalId: [ + { + type: 'marketoStaticListId', + id: 'id002', + }, + ], destinationFields: 'id', mappedToDestination: 'true', }, recordId: '3', }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, }, { destination: { @@ -1587,7 +3231,9 @@ export const data = [ message: { type: 'record', action: 'insert', - fields: { id: 1003 }, + fields: { + id: 1003, + }, channel: 'sources', context: { sources: { @@ -1596,13 +3242,20 @@ export const data = [ job_run_id: 'ck99nbd2kqiljdihhkh0', task_run_id: 'ck99nbd2kqiljdihhkhg', }, - externalId: [{ type: 'marketoStaticListId', id: 'id001' }], + externalId: [ + { + type: 'marketoStaticListId', + id: 'id001', + }, + ], destinationFields: 'id', mappedToDestination: 'true', }, recordId: '3', }, - metadata: { jobId: 3, userId: 'u1' }, + metadata: { + jobId: 3, + }, }, { destination: { @@ -1629,7 +3282,12 @@ export const data = [ action: 'delete', context: { destinationFields: 'id', - externalId: [{ id: 'id002', type: 'marketoStaticListId' }], + externalId: [ + { + id: 'id002', + type: 'marketoStaticListId', + }, + ], mappedToDestination: 'true', sources: { job_id: 'sf', @@ -1640,10 +3298,14 @@ export const data = [ }, recordId: '2', rudderId: '2', - fields: { id: '2001' }, + fields: { + id: '2001', + }, type: 'record', }, - metadata: { jobId: 4, userId: 'u1' }, + metadata: { + jobId: 4, + }, }, { destination: { @@ -1670,7 +3332,12 @@ export const data = [ action: 'delete', context: { destinationFields: 'id', - externalId: [{ id: 'id001', type: 'marketoStaticListId' }], + externalId: [ + { + id: 'id001', + type: 'marketoStaticListId', + }, + ], mappedToDestination: 'true', sources: { job_id: 'sf', @@ -1681,10 +3348,14 @@ export const data = [ }, recordId: '2', rudderId: '2', - fields: { id: '2002' }, + fields: { + id: '2002', + }, type: 'record', }, - metadata: { jobId: 5, userId: 'u1' }, + metadata: { + jobId: 5, + }, }, { destination: { @@ -1711,7 +3382,12 @@ export const data = [ action: 'delete', context: { destinationFields: 'id', - externalId: [{ id: 'id002', type: 'marketoStaticListId' }], + externalId: [ + { + id: 'id002', + type: 'marketoStaticListId', + }, + ], mappedToDestination: 'true', sources: { job_id: 'sf', @@ -1722,10 +3398,14 @@ export const data = [ }, recordId: '2', rudderId: '2', - fields: { id: '2003' }, + fields: { + id: '2003', + }, type: 'record', }, - metadata: { jobId: 6, userId: 'u1' }, + metadata: { + jobId: 6, + }, }, ], }, @@ -1750,12 +3430,22 @@ export const data = [ 'Content-Type': 'application/json', }, params: {}, - body: { JSON: {}, JSON_ARRAY: {}, XML: {}, FORM: {} }, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, files: {}, }, ], metadata: [ - { jobId: 5, destInfo: { authKey: '1zwa1wKshSt81YksKmUdJnr4IOK' }, userId: 'u1' }, + { + jobId: 5, + destInfo: { + authKey: '1zwa1wKshSt81YksKmUdJnr4IOK', + }, + }, ], batched: true, statusCode: 200, @@ -1793,13 +3483,28 @@ export const data = [ 'Content-Type': 'application/json', }, params: {}, - body: { JSON: {}, JSON_ARRAY: {}, XML: {}, FORM: {} }, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, files: {}, }, ], metadata: [ - { jobId: 1, destInfo: { authKey: '1zwa1wKshSt81YksKmUdJnr4IOK' }, userId: 'u1' }, - { jobId: 3, destInfo: { authKey: '1zwa1wKshSt81YksKmUdJnr4IOK' }, userId: 'u1' }, + { + jobId: 1, + destInfo: { + authKey: '1zwa1wKshSt81YksKmUdJnr4IOK', + }, + }, + { + jobId: 3, + destInfo: { + authKey: '1zwa1wKshSt81YksKmUdJnr4IOK', + }, + }, ], batched: true, statusCode: 200, @@ -1837,13 +3542,28 @@ export const data = [ 'Content-Type': 'application/json', }, params: {}, - body: { JSON: {}, JSON_ARRAY: {}, XML: {}, FORM: {} }, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, files: {}, }, ], metadata: [ - { jobId: 4, destInfo: { authKey: '1zwa1wKshSt81YksKmUdJnr4IOK' }, userId: 'u1' }, - { jobId: 6, destInfo: { authKey: '1zwa1wKshSt81YksKmUdJnr4IOK' }, userId: 'u1' }, + { + jobId: 4, + destInfo: { + authKey: '1zwa1wKshSt81YksKmUdJnr4IOK', + }, + }, + { + jobId: 6, + destInfo: { + authKey: '1zwa1wKshSt81YksKmUdJnr4IOK', + }, + }, ], batched: true, statusCode: 200, @@ -1881,12 +3601,22 @@ export const data = [ 'Content-Type': 'application/json', }, params: {}, - body: { JSON: {}, JSON_ARRAY: {}, XML: {}, FORM: {} }, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, files: {}, }, ], metadata: [ - { jobId: 2, destInfo: { authKey: '1zwa1wKshSt81YksKmUdJnr4IOK' }, userId: 'u1' }, + { + jobId: 2, + destInfo: { + authKey: '1zwa1wKshSt81YksKmUdJnr4IOK', + }, + }, ], batched: true, statusCode: 200, diff --git a/test/integrations/destinations/mautic/router/data.ts b/test/integrations/destinations/mautic/router/data.ts index e0924053f8..9ac6c8714f 100644 --- a/test/integrations/destinations/mautic/router/data.ts +++ b/test/integrations/destinations/mautic/router/data.ts @@ -14,7 +14,9 @@ export const data = [ anonymousId: 'anon-id-new', context: { ip: '14.5.67.21', - library: { name: 'http' }, + library: { + name: 'http', + }, traits: { firstName: 'Test', lastName: 'Rudderlabs', @@ -50,7 +52,9 @@ export const data = [ userName: 'TestRudderlabs45823@gmail.com', }, }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, }, ], destType: 'mautic', @@ -101,7 +105,11 @@ export const data = [ }, files: {}, }, - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [ + { + jobId: 1, + }, + ], batched: false, statusCode: 200, destination: { @@ -133,7 +141,9 @@ export const data = [ anonymousId: 'anon-id-new', context: { ip: '14.5.67.21', - library: { name: 'http' }, + library: { + name: 'http', + }, traits: { firstName: 'Test', lastName: 'Rudderlabs', @@ -170,7 +180,9 @@ export const data = [ userName: 'abcdef', }, }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, }, ], destType: 'mautic', @@ -184,7 +196,11 @@ export const data = [ body: { output: [ { - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], statTags: { errorCategory: 'dataValidation', errorType: 'configuration', @@ -225,8 +241,17 @@ export const data = [ message: { userId: 'user123', groupId: '17', - context: { externalId: [{ type: 'mauticContactId', id: '246' }] }, - traits: { type: 'Segments' }, + context: { + externalId: [ + { + type: 'mauticContactId', + id: '246', + }, + ], + }, + traits: { + type: 'Segments', + }, type: 'group', }, destination: { @@ -237,7 +262,9 @@ export const data = [ userName: 'TestRudderlabs45823@gmail.com', }, }, - metadata: { jobId: 3, userId: 'u1' }, + metadata: { + jobId: 3, + }, }, ], destType: 'mautic', @@ -262,10 +289,19 @@ export const data = [ 'Basic VGVzdFJ1ZGRlcmxhYnM0NTgyM0BnbWFpbC5jb206ZHVtbXlQYXNzd29yZA==', }, params: {}, - body: { JSON: {}, JSON_ARRAY: {}, XML: {}, FORM: {} }, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, files: {}, }, - metadata: [{ jobId: 3, userId: 'u1' }], + metadata: [ + { + jobId: 3, + }, + ], batched: false, statusCode: 200, destination: { diff --git a/test/integrations/destinations/moengage/router/data.ts b/test/integrations/destinations/moengage/router/data.ts index 0f8a3de41b..a5664906e5 100644 --- a/test/integrations/destinations/moengage/router/data.ts +++ b/test/integrations/destinations/moengage/router/data.ts @@ -21,9 +21,15 @@ export const data = [ namespace: 'com.rudderlabs.javascript', version: '1.1.6', }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.1.6' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.6', + }, locale: 'en-GB', - os: { name: '', version: '' }, + os: { + name: '', + version: '', + }, page: { path: '/testing/script-test.html', referrer: '', @@ -31,9 +37,13 @@ export const data = [ title: '', url: 'http://localhost:3243/testing/script-test.html', }, - screen: { density: 2 }, + screen: { + density: 2, + }, traits: { - company: { id: 'abc123' }, + company: { + id: 'abc123', + }, createdAt: 'Thu Mar 24 2016 17:46:45 GMT+0000 (UTC)', email: 'rudderTest@gmail.com', name: 'Rudder Test', @@ -43,7 +53,9 @@ export const data = [ 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.80 Safari/537.36', }, event: 'Order Completed', - integrations: { All: true }, + integrations: { + All: true, + }, messageId: 'a0adfab9-baf7-4e09-a2ce-bbe2844c324a', originalTimestamp: '2020-10-16T08:10:12.782Z', properties: { @@ -113,7 +125,9 @@ export const data = [ type: 'track', userId: 'rudder123', }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, destination: { ID: '1iuTZs6eEZVMm6GjRBe6bNShaL3', Name: 'MoEngage Testing', @@ -122,7 +136,9 @@ export const data = [ Name: 'MOENGAGE', DisplayName: 'MoEngage', Config: { - destConfig: { defaultConfig: ['apiId', 'apiKey', 'region'] }, + destConfig: { + defaultConfig: ['apiId', 'apiKey', 'region'], + }, excludeKeys: [], includeKeys: [], supportedSourceTypes: [ @@ -159,9 +175,15 @@ export const data = [ namespace: 'com.rudderlabs.javascript', version: '1.1.6', }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.1.6' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.6', + }, locale: 'en-GB', - os: { name: '', version: '' }, + os: { + name: '', + version: '', + }, page: { path: '/testing/script-test.html', referrer: '', @@ -169,9 +191,13 @@ export const data = [ title: '', url: 'http://localhost:3243/testing/script-test.html', }, - screen: { density: 2 }, + screen: { + density: 2, + }, traits: { - company: { id: 'abc123' }, + company: { + id: 'abc123', + }, createdAt: 'Thu Mar 24 2016 17:46:45 GMT+0000 (UTC)', email: 'rudderTest@gmail.com', name: 'Rudder Test', @@ -180,7 +206,9 @@ export const data = [ userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.80 Safari/537.36', }, - integrations: { All: true }, + integrations: { + All: true, + }, messageId: 'e108eb05-f6cd-4624-ba8c-568f2e2b3f92', originalTimestamp: '2020-10-16T08:26:14.938Z', receivedAt: '2020-10-16T13:56:14.945+05:30', @@ -190,7 +218,9 @@ export const data = [ type: 'identify', userId: 'rudder123', }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, destination: { ID: '1iuTZs6eEZVMm6GjRBe6bNShaL3', Name: 'MoEngage Testing', @@ -199,7 +229,9 @@ export const data = [ Name: 'MOENGAGE', DisplayName: 'MoEngage', Config: { - destConfig: { defaultConfig: ['apiId', 'apiKey', 'region'] }, + destConfig: { + defaultConfig: ['apiId', 'apiKey', 'region'], + }, excludeKeys: [], includeKeys: [], supportedSourceTypes: [ @@ -322,7 +354,11 @@ export const data = [ files: {}, userId: '4eb021e9-a2af-4926-ae82-fe996d12f3c5', }, - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [ + { + jobId: 1, + }, + ], batched: false, statusCode: 200, destination: { @@ -333,7 +369,9 @@ export const data = [ Name: 'MOENGAGE', DisplayName: 'MoEngage', Config: { - destConfig: { defaultConfig: ['apiId', 'apiKey', 'region'] }, + destConfig: { + defaultConfig: ['apiId', 'apiKey', 'region'], + }, excludeKeys: [], includeKeys: [], supportedSourceTypes: [ @@ -391,7 +429,11 @@ export const data = [ files: {}, userId: '4eb021e9-a2af-4926-ae82-fe996d12f3c5', }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { @@ -402,7 +444,9 @@ export const data = [ Name: 'MOENGAGE', DisplayName: 'MoEngage', Config: { - destConfig: { defaultConfig: ['apiId', 'apiKey', 'region'] }, + destConfig: { + defaultConfig: ['apiId', 'apiKey', 'region'], + }, excludeKeys: [], includeKeys: [], supportedSourceTypes: [ diff --git a/test/integrations/destinations/monday/router/data.ts b/test/integrations/destinations/monday/router/data.ts index 3be8b129c5..eefc106274 100644 --- a/test/integrations/destinations/monday/router/data.ts +++ b/test/integrations/destinations/monday/router/data.ts @@ -20,16 +20,23 @@ export const data = [ whitelistedEvents: [{ eventName: 'create an item' }], }, }, - metadata: { jobId: 1, userId: 'u1' }, + 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' }, + properties: { + name: 'Task 1', + }, context: { - os: { name: '', version: '' }, + os: { + name: '', + version: '', + }, app: { name: 'RudderLabs JavaScript SDK', build: '1.0.0', @@ -37,8 +44,13 @@ export const data = [ namespace: 'com.rudderlabs.javascript', }, locale: 'en-US', - screen: { density: 2 }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.1.11' }, + 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', @@ -57,13 +69,18 @@ export const data = [ boardId: '339283933', groupTitle: 'Next month', columnToPropertyMapping: [ - { from: 'Status', to: 'status' }, + { + from: 'Status', + to: 'status', + }, { from: 'Email', to: 'emailId' }, ], whitelistedEvents: [{ eventName: 'create an item' }], }, }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, message: { event: 'create an item', type: 'track', @@ -77,7 +94,10 @@ export const data = [ emailText: 'emailId', }, context: { - os: { name: '', version: '' }, + os: { + name: '', + version: '', + }, app: { name: 'RudderLabs JavaScript SDK', build: '1.0.0', @@ -85,8 +105,13 @@ export const data = [ namespace: 'com.rudderlabs.javascript', }, locale: 'en-US', - screen: { density: 2 }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.1.11' }, + 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', @@ -130,7 +155,11 @@ export const data = [ type: 'REST', version: '1', }, - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [ + { + jobId: 1, + }, + ], batched: false, statusCode: 200, destination: { @@ -167,7 +196,11 @@ export const data = [ }, files: {}, }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { @@ -177,7 +210,10 @@ export const data = [ boardId: '339283933', groupTitle: 'Next month', columnToPropertyMapping: [ - { from: 'Status', to: 'status' }, + { + from: 'Status', + to: 'status', + }, { from: 'Email', to: 'emailId' }, ], whitelistedEvents: [{ eventName: 'create an item' }], diff --git a/test/integrations/destinations/monetate/router/data.ts b/test/integrations/destinations/monetate/router/data.ts index eff487bd73..09a7f8073d 100644 --- a/test/integrations/destinations/monetate/router/data.ts +++ b/test/integrations/destinations/monetate/router/data.ts @@ -13,31 +13,54 @@ export const data = [ message: { anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', context: { - screen: { height: 22, width: 11 }, + screen: { + height: 22, + width: 11, + }, device: { id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', manufacturer: 'Xiaomi', model: 'Redmi 6', name: 'xiaomi', }, - network: { carrier: 'Banglalink' }, - os: { name: 'android', version: '8.1.0' }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, traits: { - address: { city: 'Dhaka', country: 'Bangladesh' }, + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', }, ip: '0.0.0.0', }, - traits: { address: { city: 'Kol', country: 'Ind' } }, + traits: { + address: { + city: 'Kol', + country: 'Ind', + }, + }, event: 'Product Viewed', - integrations: { All: true }, + integrations: { + All: true, + }, message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', - properties: { monetateId: '1234', product_id: 'prodId' }, + properties: { + monetateId: '1234', + product_id: 'prodId', + }, timestamp: '2019-09-01T15:46:51.693229+05:30', type: 'track', userId: 'newUser', }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, destination: { Config: { monetateChannel: 'channel', @@ -50,34 +73,61 @@ export const data = [ message: { anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', context: { - screen: { height: 22, width: 11 }, + screen: { + height: 22, + width: 11, + }, device: { id: 'df16bffa-5c3d-4fbb-9bce-3bab098129a7R', manufacturer: 'Xiaomi', model: 'Redmi 6', name: 'xiaomi', }, - network: { carrier: 'Banglalink' }, - os: { name: 'android', version: '8.1.0' }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, traits: { - address: { city: 'Dhaka', country: 'Bangladesh' }, + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', }, ip: '0.0.0.0', }, - traits: { address: { city: 'Kol', country: 'Ind' } }, + traits: { + address: { + city: 'Kol', + country: 'Ind', + }, + }, event: 'Product List Viewed', - integrations: { All: true }, + integrations: { + All: true, + }, message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', properties: { monetateId: '1234', - products: [{ product_id: 1 }, { product_id: 2 }], + products: [ + { + product_id: 1, + }, + { + product_id: 2, + }, + ], }, timestamp: '2019-09-01T15:46:51.693229+05:30', type: 'track', userId: 'newUser', }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, destination: { Config: { monetateChannel: 'channel', @@ -103,17 +153,31 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://engine.monetate.net/api/engine/v1/decide/retailer', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, params: {}, body: { JSON: { monetateId: '1234', events: [ - { eventType: 'monetate:context:IpAddress', ipAddress: '0.0.0.0' }, - { eventType: 'monetate:context:ScreenSize', height: 22, width: 11 }, + { + eventType: 'monetate:context:IpAddress', + ipAddress: '0.0.0.0', + }, + { + eventType: 'monetate:context:ScreenSize', + height: 22, + width: 11, + }, { eventType: 'monetate:context:ProductDetailView', - products: [{ productId: 'prodId', sku: '' }], + products: [ + { + productId: 'prodId', + sku: '', + }, + ], }, ], customerId: 'newUser', @@ -125,7 +189,11 @@ export const data = [ }, files: {}, }, - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [ + { + jobId: 1, + }, + ], batched: false, statusCode: 200, destination: { @@ -142,15 +210,27 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://engine.monetate.net/api/engine/v1/decide/retailer', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, params: {}, body: { JSON: { monetateId: '1234', events: [ - { eventType: 'monetate:context:IpAddress', ipAddress: '0.0.0.0' }, - { eventType: 'monetate:context:ScreenSize', height: 22, width: 11 }, - { eventType: 'monetate:context:ProductThumbnailView', products: ['1', '2'] }, + { + eventType: 'monetate:context:IpAddress', + ipAddress: '0.0.0.0', + }, + { + eventType: 'monetate:context:ScreenSize', + height: 22, + width: 11, + }, + { + eventType: 'monetate:context:ProductThumbnailView', + products: ['1', '2'], + }, ], customerId: 'newUser', channel: 'channel', @@ -161,7 +241,11 @@ export const data = [ }, files: {}, }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { diff --git a/test/integrations/destinations/mp/router/data.ts b/test/integrations/destinations/mp/router/data.ts index 965f7801ba..7058929909 100644 --- a/test/integrations/destinations/mp/router/data.ts +++ b/test/integrations/destinations/mp/router/data.ts @@ -1,3 +1,6 @@ +import { overrideDestination } from '../../../testUtils'; +import { sampleDestination } from '../common'; + export const data = [ { name: 'mp', @@ -11,27 +14,16 @@ export const data = [ input: [ { description: 'Page call', - destination: { - Config: { - apiKey: 'dummyApiKey', - token: 'test_api_token', - prefixProperties: true, - useNativeSDK: false, - apiSecret: 'test_api_secret', - useOldMapping: true, - strictMode: true, - }, - DestinationDefinition: { - DisplayName: 'Mixpanel', - ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', - Name: 'MP', - }, - Enabled: true, - ID: '1WhcOCGgj9asZu850HvugU2C3Aq', - Name: 'MP', - Transformations: [], + destination: overrideDestination(sampleDestination, { + apiSecret: 'test_api_secret', + token: 'test_api_token', + useOldMapping: true, + strictMode: true, + }), + metadata: { + jobId: 1, + additionalProp: 1, }, - metadata: { jobId: 1, additionalProp: 1, userId: 'u1' }, message: { anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', channel: 'web', @@ -44,10 +36,18 @@ export const data = [ version: '1.0.5', }, ip: '0.0.0.0', - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.5' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, locale: 'en-GB', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, traits: {}, page: { path: '/destinations/mixpanel', @@ -62,7 +62,9 @@ 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.117 Safari/537.36', }, - integrations: { All: true }, + integrations: { + All: true, + }, messageId: 'dd266c67-9199-4a52-ba32-f46ddde67312', originalTimestamp: '2020-01-24T06:29:02.358Z', page: { @@ -86,27 +88,16 @@ export const data = [ { description: 'Track: set device id and user id when simplified id merge api is selected', - destination: { - Config: { - apiKey: 'dummyApiKey', - token: 'test_api_token', - prefixProperties: true, - useNativeSDK: false, - apiSecret: 'test_api_secret', - identityMergeApi: 'simplified', - strictMode: true, - }, - DestinationDefinition: { - DisplayName: 'Mixpanel', - ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', - Name: 'MP', - }, - Enabled: true, - ID: '1WhcOCGgj9asZu850HvugU2C3Aq', - Name: 'MP', - Transformations: [], + destination: overrideDestination(sampleDestination, { + apiSecret: 'test_api_secret', + token: 'test_api_token', + identityMergeApi: 'simplified', + strictMode: true, + }), + metadata: { + jobId: 2, + additionalProp: 2, }, - metadata: { jobId: 2, additionalProp: 2, userId: 'u1' }, message: { anonymousId: 'anonId01', channel: 'mobile', @@ -125,20 +116,40 @@ export const data = [ type: 'ios', token: 'test_device_token', }, - library: { name: 'com.rudderstack.android.sdk.core', version: '1.0.1-beta.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: 'iOS', version: '8.1.0' }, - screen: { density: 420, height: 1794, width: 1080 }, + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, + os: { + name: 'iOS', + version: '8.1.0', + }, + screen: { + density: 420, + height: 1794, + width: 1080, + }, timezone: 'Asia/Kolkata', userAgent: 'Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)', }, event: 'Product Viewed', - integrations: { All: true }, + integrations: { + All: true, + }, userId: 'userId01', messageId: 'id2', - properties: { name: 'T-Shirt', revenue: 18.9 }, + properties: { + name: 'T-Shirt', + revenue: 18.9, + }, type: 'track', originalTimestamp: '2020-01-24T06:29:02.362Z', receivedAt: '2020-01-24T11:59:02.403+05:30', @@ -148,27 +159,16 @@ export const data = [ }, { description: 'Identify call to create anonymous user profile', - destination: { - Config: { - apiKey: 'dummyApiKey', - token: 'test_api_token', - prefixProperties: true, - useNativeSDK: false, - apiSecret: 'test_api_secret', - useOldMapping: true, - strictMode: true, - }, - DestinationDefinition: { - DisplayName: 'Mixpanel', - ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', - Name: 'MP', - }, - Enabled: true, - ID: '1WhcOCGgj9asZu850HvugU2C3Aq', - Name: 'MP', - Transformations: [], + destination: overrideDestination(sampleDestination, { + apiSecret: 'test_api_secret', + token: 'test_api_token', + useOldMapping: true, + strictMode: true, + }), + metadata: { + jobId: 3, + additionalProp: 3, }, - metadata: { jobId: 3, additionalProp: 3, userId: 'u1' }, message: { anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', channel: 'web', @@ -180,10 +180,18 @@ export const data = [ version: '1.0.5', }, ip: '0.0.0.0', - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.5' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, locale: 'en-GB', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, traits: { city: 'Disney', country: 'USA', @@ -203,7 +211,9 @@ 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.117 Safari/537.36', }, - integrations: { All: true }, + integrations: { + All: true, + }, page: { path: '/destinations/mixpanel', referrer: '', @@ -227,27 +237,16 @@ export const data = [ { description: 'Identify: append $device: to deviceId while creating the user when simplified id merge api is selected', - destination: { - Config: { - apiKey: 'dummyApiKey', - token: 'test_api_token', - prefixProperties: true, - useNativeSDK: false, - apiSecret: 'test_api_secret', - identityMergeApi: 'simplified', - strictMode: true, - }, - DestinationDefinition: { - DisplayName: 'Mixpanel', - ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', - Name: 'MP', - }, - Enabled: true, - ID: '1WhcOCGgj9asZu850HvugU2C3Aq', - Name: 'MP', - Transformations: [], + destination: overrideDestination(sampleDestination, { + apiSecret: 'test_api_secret', + token: 'test_api_token', + identityMergeApi: 'simplified', + strictMode: true, + }), + metadata: { + jobId: 4, + additionalProp: 4, }, - metadata: { jobId: 4, additionalProp: 4, userId: 'u1' }, message: { anonymousId: 'anonId01', channel: 'web', @@ -259,10 +258,18 @@ export const data = [ version: '1.0.5', }, ip: '0.0.0.0', - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.5' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, locale: 'en-GB', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, traits: { city: 'Disney', country: 'USA', @@ -284,7 +291,9 @@ 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.117 Safari/537.36', }, - integrations: { All: true }, + integrations: { + All: true, + }, page: { path: '/destinations/mixpanel', referrer: '', @@ -306,26 +315,15 @@ export const data = [ }, { description: 'Merge call with strict mode enabled', - destination: { - Config: { - apiKey: 'dummyApiKey', - token: 'test_api_token', - prefixProperties: true, - useNativeSDK: false, - apiSecret: 'test_api_secret', - strictMode: true, - }, - DestinationDefinition: { - DisplayName: 'Mixpanel', - ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', - Name: 'MP', - }, - Enabled: true, - ID: '1WhcOCGgj9asZu850HvugU2C3Aq', - Name: 'MP', - Transformations: [], + destination: overrideDestination(sampleDestination, { + apiSecret: 'test_api_secret', + token: 'test_api_token', + strictMode: true, + }), + metadata: { + jobId: 5, + additionalProp: 5, }, - metadata: { jobId: 5, additionalProp: 5, userId: 'u1' }, message: { anonymousId: '5094f5704b9cf2b3', channel: 'mobile', @@ -344,21 +342,44 @@ export const data = [ type: 'ios', token: 'test_device_token', }, - library: { name: 'com.rudderstack.android.sdk.core', version: '1.0.1-beta.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: 'iOS', version: '8.1.0' }, - screen: { density: 420, height: 1794, width: 1080 }, + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, + os: { + name: 'iOS', + version: '8.1.0', + }, + screen: { + density: 420, + height: 1794, + width: 1080, + }, timezone: 'Asia/Kolkata', - traits: { anonymousId: '5094f5704b9cf2b3', userId: 'test_user_id' }, + traits: { + anonymousId: '5094f5704b9cf2b3', + userId: 'test_user_id', + }, userAgent: 'Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)', }, event: 'MainActivity', - integrations: { All: true }, + integrations: { + All: true, + }, userId: 'test_user_id', messageId: 'id2', - properties: { name: 'MainActivity', automatic: true }, + properties: { + name: 'MainActivity', + automatic: true, + }, originalTimestamp: '2020-03-12T09:05:03.421Z', type: 'identify', sentAt: '2020-03-12T09:05:13.042Z', @@ -366,27 +387,20 @@ export const data = [ }, { description: 'Group call', - destination: { - Config: { - apiKey: 'dummyApiKey', - token: 'test_api_token', - prefixProperties: true, - useNativeSDK: false, - apiSecret: 'test_api_secret', - groupKeySettings: [{ groupKey: 'company' }], - strictMode: true, - }, - DestinationDefinition: { - DisplayName: 'Mixpanel', - ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', - Name: 'MP', - }, - Enabled: true, - ID: '1WhcOCGgj9asZu850HvugU2C3Aq', - Name: 'MP', - Transformations: [], + destination: overrideDestination(sampleDestination, { + apiSecret: 'test_api_secret', + token: 'test_api_token', + groupKeySettings: [ + { + groupKey: 'company', + }, + ], + strictMode: true, + }), + metadata: { + jobId: 6, + additionalProp: 6, }, - metadata: { jobId: 6, additionalProp: 6, userId: 'u1' }, message: { anonymousId: 'anonId06', channel: 'web', @@ -398,10 +412,18 @@ export const data = [ version: '1.0.5', }, ip: '0.0.0.0', - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.5' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, locale: 'en-GB', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, page: { path: '/destinations/mixpanel', referrer: '', @@ -415,7 +437,9 @@ 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.117 Safari/537.36', }, - integrations: { All: true }, + integrations: { + All: true, + }, page: { path: '/destinations/mixpanel', referrer: '', @@ -426,7 +450,9 @@ export const data = [ initial_referrer: 'https://docs.rudderstack.com', initial_referring_domain: 'docs.rudderstack.com', }, - traits: { company: 'testComp' }, + traits: { + company: 'testComp', + }, messageId: '2536eda4-d638-4c93-8014-8ffe3f083214', originalTimestamp: '2020-01-24T06:29:02.362Z', receivedAt: '2020-01-24T11:59:02.403+05:30', @@ -439,27 +465,20 @@ export const data = [ }, { description: 'Group key not present in traits', - destination: { - Config: { - apiKey: 'dummyApiKey', - token: 'test_api_token', - prefixProperties: true, - useNativeSDK: false, - apiSecret: 'test_api_secret', - groupKeySettings: [{ groupKey: 'company' }], - strictMode: true, - }, - DestinationDefinition: { - DisplayName: 'Mixpanel', - ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', - Name: 'MP', - }, - Enabled: true, - ID: '1WhcOCGgj9asZu850HvugU2C3Aq', - Name: 'MP', - Transformations: [], + destination: overrideDestination(sampleDestination, { + apiSecret: 'test_api_secret', + token: 'test_api_token', + groupKeySettings: [ + { + groupKey: 'company', + }, + ], + strictMode: true, + }), + metadata: { + jobId: 7, + additionalProp: 7, }, - metadata: { jobId: 7, additionalProp: 7, userId: 'u1' }, message: { anonymousId: 'anonId06', channel: 'web', @@ -471,10 +490,18 @@ export const data = [ version: '1.0.5', }, ip: '0.0.0.0', - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.5' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, locale: 'en-GB', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, page: { path: '/destinations/mixpanel', referrer: '', @@ -488,7 +515,9 @@ 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.117 Safari/537.36', }, - integrations: { All: true }, + integrations: { + All: true, + }, page: { path: '/destinations/mixpanel', referrer: '', @@ -513,7 +542,9 @@ export const data = [ destType: 'mp', }, method: 'POST', - headers: { 'X-Feature-Gzip-Support': '?1' }, + headers: { + 'X-Feature-Gzip-Support': '?1', + }, }, }, output: { @@ -531,7 +562,9 @@ export const data = [ 'Content-Type': 'application/json', Authorization: 'Basic dGVzdF9hcGlfc2VjcmV0Og==', }, - params: { strict: 1 }, + params: { + strict: 1, + }, body: { JSON: {}, JSON_ARRAY: {}, @@ -544,7 +577,12 @@ export const data = [ }, files: {}, }, - metadata: [{ jobId: 1, additionalProp: 1, userId: 'u1' }], + metadata: [ + { + jobId: 1, + additionalProp: 1, + }, + ], batched: true, statusCode: 200, destination: { @@ -597,7 +635,9 @@ export const data = [ 'Content-Type': 'application/json', Authorization: 'Basic dGVzdF9hcGlfc2VjcmV0Og==', }, - params: { strict: 1 }, + params: { + strict: 1, + }, body: { JSON: {}, JSON_ARRAY: {}, @@ -611,7 +651,12 @@ export const data = [ files: {}, }, ], - metadata: [{ jobId: 2, additionalProp: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + additionalProp: 2, + }, + ], batched: true, statusCode: 200, destination: { @@ -664,7 +709,9 @@ export const data = [ 'Content-Type': 'application/json', Authorization: 'Basic dGVzdF9hcGlfc2VjcmV0Og==', }, - params: { strict: 1 }, + params: { + strict: 1, + }, body: { JSON: {}, JSON_ARRAY: {}, @@ -679,9 +726,18 @@ export const data = [ }, ], metadata: [ - { jobId: 3, additionalProp: 3, userId: 'u1' }, - { jobId: 4, additionalProp: 4, userId: 'u1' }, - { jobId: 5, additionalProp: 5, userId: 'u1' }, + { + jobId: 3, + additionalProp: 3, + }, + { + jobId: 4, + additionalProp: 4, + }, + { + jobId: 5, + additionalProp: 5, + }, ], batched: true, statusCode: 200, @@ -745,7 +801,12 @@ export const data = [ files: {}, }, ], - metadata: [{ jobId: 6, additionalProp: 6, userId: 'u1' }], + metadata: [ + { + jobId: 6, + additionalProp: 6, + }, + ], batched: true, statusCode: 200, destination: { @@ -754,7 +815,11 @@ export const data = [ apiSecret: 'test_api_secret', token: 'test_api_token', prefixProperties: true, - groupKeySettings: [{ groupKey: 'company' }], + groupKeySettings: [ + { + groupKey: 'company', + }, + ], strictMode: true, useNativeSDK: false, }, @@ -770,7 +835,12 @@ export const data = [ }, }, { - metadata: [{ jobId: 7, additionalProp: 7, userId: 'u1' }], + metadata: [ + { + jobId: 7, + additionalProp: 7, + }, + ], batched: false, statusCode: 400, error: @@ -790,7 +860,11 @@ export const data = [ token: 'test_api_token', prefixProperties: true, useNativeSDK: false, - groupKeySettings: [{ groupKey: 'company' }], + groupKeySettings: [ + { + groupKey: 'company', + }, + ], strictMode: true, }, DestinationDefinition: { @@ -821,27 +895,16 @@ export const data = [ input: [ { description: 'Page call', - destination: { - Config: { - apiKey: 'dummyApiKey', - token: 'test_api_token', - prefixProperties: true, - useNativeSDK: false, - apiSecret: 'test_api_secret', - useOldMapping: true, - strictMode: true, - }, - DestinationDefinition: { - DisplayName: 'Mixpanel', - ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', - Name: 'MP', - }, - Enabled: true, - ID: '1WhcOCGgj9asZu850HvugU2C3Aq', - Name: 'MP', - Transformations: [], + destination: overrideDestination(sampleDestination, { + apiSecret: 'test_api_secret', + token: 'test_api_token', + useOldMapping: true, + strictMode: true, + }), + metadata: { + jobId: 1, + additionalProp: 1, }, - metadata: { jobId: 1, additionalProp: 1, userId: 'u1' }, message: { anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', channel: 'web', @@ -854,10 +917,18 @@ export const data = [ version: '1.0.5', }, ip: '0.0.0.0', - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.5' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, locale: 'en-GB', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, traits: {}, page: { path: '/destinations/mixpanel', @@ -872,7 +943,9 @@ 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.117 Safari/537.36', }, - integrations: { All: true }, + integrations: { + All: true, + }, messageId: 'dd266c67-9199-4a52-ba32-f46ddde67312', originalTimestamp: '2020-01-24T06:29:02.358Z', page: { @@ -896,27 +969,16 @@ export const data = [ { description: 'Track: set device id and user id when simplified id merge api is selected', - destination: { - Config: { - apiKey: 'dummyApiKey', - token: 'test_api_token', - prefixProperties: true, - useNativeSDK: false, - apiSecret: 'test_api_secret', - identityMergeApi: 'simplified', - strictMode: true, - }, - DestinationDefinition: { - DisplayName: 'Mixpanel', - ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', - Name: 'MP', - }, - Enabled: true, - ID: '1WhcOCGgj9asZu850HvugU2C3Aq', - Name: 'MP', - Transformations: [], + destination: overrideDestination(sampleDestination, { + apiSecret: 'test_api_secret', + token: 'test_api_token', + identityMergeApi: 'simplified', + strictMode: true, + }), + metadata: { + jobId: 2, + additionalProp: 2, }, - metadata: { jobId: 2, additionalProp: 2, userId: 'u1' }, message: { anonymousId: 'anonId01', channel: 'mobile', @@ -935,20 +997,40 @@ export const data = [ type: 'ios', token: 'test_device_token', }, - library: { name: 'com.rudderstack.android.sdk.core', version: '1.0.1-beta.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: 'iOS', version: '8.1.0' }, - screen: { density: 420, height: 1794, width: 1080 }, + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, + os: { + name: 'iOS', + version: '8.1.0', + }, + screen: { + density: 420, + height: 1794, + width: 1080, + }, timezone: 'Asia/Kolkata', userAgent: 'Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)', }, event: 'Product Viewed', - integrations: { All: true }, + integrations: { + All: true, + }, userId: 'userId01', messageId: 'id2', - properties: { name: 'T-Shirt', revenue: 18.9 }, + properties: { + name: 'T-Shirt', + revenue: 18.9, + }, type: 'track', originalTimestamp: '2020-01-24T06:29:02.362Z', receivedAt: '2020-01-24T11:59:02.403+05:30', @@ -958,27 +1040,16 @@ export const data = [ }, { description: 'Identify call to create anonymous user profile', - destination: { - Config: { - apiKey: 'dummyApiKey', - token: 'test_api_token', - prefixProperties: true, - useNativeSDK: false, - apiSecret: 'test_api_secret', - useOldMapping: true, - strictMode: true, - }, - DestinationDefinition: { - DisplayName: 'Mixpanel', - ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', - Name: 'MP', - }, - Enabled: true, - ID: '1WhcOCGgj9asZu850HvugU2C3Aq', - Name: 'MP', - Transformations: [], + destination: overrideDestination(sampleDestination, { + apiSecret: 'test_api_secret', + token: 'test_api_token', + useOldMapping: true, + strictMode: true, + }), + metadata: { + jobId: 3, + additionalProp: 3, }, - metadata: { jobId: 3, additionalProp: 3, userId: 'u1' }, message: { anonymousId: 'e6ab2c5e-2cda-44a9-a962-e2f67df78bca', channel: 'web', @@ -990,10 +1061,18 @@ export const data = [ version: '1.0.5', }, ip: '0.0.0.0', - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.5' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, locale: 'en-GB', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, traits: { city: 'Disney', country: 'USA', @@ -1013,7 +1092,9 @@ 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.117 Safari/537.36', }, - integrations: { All: true }, + integrations: { + All: true, + }, page: { path: '/destinations/mixpanel', referrer: '', @@ -1037,27 +1118,16 @@ export const data = [ { description: 'Identify: append $device: to deviceId while creating the user when simplified id merge api is selected', - destination: { - Config: { - apiKey: 'dummyApiKey', - token: 'test_api_token', - prefixProperties: true, - useNativeSDK: false, - apiSecret: 'test_api_secret', - identityMergeApi: 'simplified', - strictMode: true, - }, - DestinationDefinition: { - DisplayName: 'Mixpanel', - ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', - Name: 'MP', - }, - Enabled: true, - ID: '1WhcOCGgj9asZu850HvugU2C3Aq', - Name: 'MP', - Transformations: [], + destination: overrideDestination(sampleDestination, { + apiSecret: 'test_api_secret', + token: 'test_api_token', + identityMergeApi: 'simplified', + strictMode: true, + }), + metadata: { + jobId: 4, + additionalProp: 4, }, - metadata: { jobId: 4, additionalProp: 4, userId: 'u1' }, message: { anonymousId: 'anonId01', channel: 'web', @@ -1069,10 +1139,18 @@ export const data = [ version: '1.0.5', }, ip: '0.0.0.0', - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.5' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, locale: 'en-GB', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, traits: { city: 'Disney', country: 'USA', @@ -1094,7 +1172,9 @@ 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.117 Safari/537.36', }, - integrations: { All: true }, + integrations: { + All: true, + }, page: { path: '/destinations/mixpanel', referrer: '', @@ -1116,26 +1196,15 @@ export const data = [ }, { description: 'Merge call with strict mode enabled', - destination: { - Config: { - apiKey: 'dummyApiKey', - token: 'test_api_token', - prefixProperties: true, - useNativeSDK: false, - apiSecret: 'test_api_secret', - strictMode: true, - }, - DestinationDefinition: { - DisplayName: 'Mixpanel', - ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', - Name: 'MP', - }, - Enabled: true, - ID: '1WhcOCGgj9asZu850HvugU2C3Aq', - Name: 'MP', - Transformations: [], + destination: overrideDestination(sampleDestination, { + apiSecret: 'test_api_secret', + token: 'test_api_token', + strictMode: true, + }), + metadata: { + jobId: 5, + additionalProp: 5, }, - metadata: { jobId: 5, additionalProp: 5, userId: 'u1' }, message: { anonymousId: '5094f5704b9cf2b3', channel: 'mobile', @@ -1154,21 +1223,44 @@ export const data = [ type: 'ios', token: 'test_device_token', }, - library: { name: 'com.rudderstack.android.sdk.core', version: '1.0.1-beta.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: 'iOS', version: '8.1.0' }, - screen: { density: 420, height: 1794, width: 1080 }, + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, + os: { + name: 'iOS', + version: '8.1.0', + }, + screen: { + density: 420, + height: 1794, + width: 1080, + }, timezone: 'Asia/Kolkata', - traits: { anonymousId: '5094f5704b9cf2b3', userId: 'test_user_id' }, + traits: { + anonymousId: '5094f5704b9cf2b3', + userId: 'test_user_id', + }, userAgent: 'Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)', }, event: 'MainActivity', - integrations: { All: true }, + integrations: { + All: true, + }, userId: 'test_user_id', messageId: 'id2', - properties: { name: 'MainActivity', automatic: true }, + properties: { + name: 'MainActivity', + automatic: true, + }, originalTimestamp: '2020-03-12T09:05:03.421Z', type: 'identify', sentAt: '2020-03-12T09:05:13.042Z', @@ -1176,27 +1268,20 @@ export const data = [ }, { description: 'Group call', - destination: { - Config: { - apiKey: 'dummyApiKey', - token: 'test_api_token', - prefixProperties: true, - useNativeSDK: false, - apiSecret: 'test_api_secret', - groupKeySettings: [{ groupKey: 'company' }], - strictMode: true, - }, - DestinationDefinition: { - DisplayName: 'Mixpanel', - ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', - Name: 'MP', - }, - Enabled: true, - ID: '1WhcOCGgj9asZu850HvugU2C3Aq', - Name: 'MP', - Transformations: [], + destination: overrideDestination(sampleDestination, { + apiSecret: 'test_api_secret', + token: 'test_api_token', + groupKeySettings: [ + { + groupKey: 'company', + }, + ], + strictMode: true, + }), + metadata: { + jobId: 6, + additionalProp: 6, }, - metadata: { jobId: 6, additionalProp: 6, userId: 'u1' }, message: { anonymousId: 'anonId06', channel: 'web', @@ -1208,10 +1293,18 @@ export const data = [ version: '1.0.5', }, ip: '0.0.0.0', - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.5' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, locale: 'en-GB', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, page: { path: '/destinations/mixpanel', referrer: '', @@ -1225,7 +1318,9 @@ 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.117 Safari/537.36', }, - integrations: { All: true }, + integrations: { + All: true, + }, page: { path: '/destinations/mixpanel', referrer: '', @@ -1236,7 +1331,9 @@ export const data = [ initial_referrer: 'https://docs.rudderstack.com', initial_referring_domain: 'docs.rudderstack.com', }, - traits: { company: 'testComp' }, + traits: { + company: 'testComp', + }, messageId: '2536eda4-d638-4c93-8014-8ffe3f083214', originalTimestamp: '2020-01-24T06:29:02.362Z', receivedAt: '2020-01-24T11:59:02.403+05:30', @@ -1249,27 +1346,20 @@ export const data = [ }, { description: 'Group key not present in traits', - destination: { - Config: { - apiKey: 'dummyApiKey', - token: 'test_api_token', - prefixProperties: true, - useNativeSDK: false, - apiSecret: 'test_api_secret', - groupKeySettings: [{ groupKey: 'company' }], - strictMode: true, - }, - DestinationDefinition: { - DisplayName: 'Mixpanel', - ID: '1WhbSZ6uA3H5ChVifHpfL2H6sie', - Name: 'MP', - }, - Enabled: true, - ID: '1WhcOCGgj9asZu850HvugU2C3Aq', - Name: 'MP', - Transformations: [], + destination: overrideDestination(sampleDestination, { + apiSecret: 'test_api_secret', + token: 'test_api_token', + groupKeySettings: [ + { + groupKey: 'company', + }, + ], + strictMode: true, + }), + metadata: { + jobId: 7, + additionalProp: 7, }, - metadata: { jobId: 7, additionalProp: 7, userId: 'u1' }, message: { anonymousId: 'anonId06', channel: 'web', @@ -1281,10 +1371,18 @@ export const data = [ version: '1.0.5', }, ip: '0.0.0.0', - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.5' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.5', + }, locale: 'en-GB', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, page: { path: '/destinations/mixpanel', referrer: '', @@ -1298,7 +1396,9 @@ 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.117 Safari/537.36', }, - integrations: { All: true }, + integrations: { + All: true, + }, page: { path: '/destinations/mixpanel', referrer: '', @@ -1340,7 +1440,9 @@ export const data = [ 'Content-Type': 'application/json', Authorization: 'Basic dGVzdF9hcGlfc2VjcmV0Og==', }, - params: { strict: 1 }, + params: { + strict: 1, + }, body: { JSON: {}, JSON_ARRAY: { @@ -1352,7 +1454,12 @@ export const data = [ }, files: {}, }, - metadata: [{ jobId: 1, additionalProp: 1, userId: 'u1' }], + metadata: [ + { + jobId: 1, + additionalProp: 1, + }, + ], batched: true, statusCode: 200, destination: { @@ -1405,7 +1512,9 @@ export const data = [ 'Content-Type': 'application/json', Authorization: 'Basic dGVzdF9hcGlfc2VjcmV0Og==', }, - params: { strict: 1 }, + params: { + strict: 1, + }, body: { JSON: {}, JSON_ARRAY: { @@ -1418,7 +1527,12 @@ export const data = [ files: {}, }, ], - metadata: [{ jobId: 2, additionalProp: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + additionalProp: 2, + }, + ], batched: true, statusCode: 200, destination: { @@ -1471,7 +1585,9 @@ export const data = [ 'Content-Type': 'application/json', Authorization: 'Basic dGVzdF9hcGlfc2VjcmV0Og==', }, - params: { strict: 1 }, + params: { + strict: 1, + }, body: { JSON: {}, JSON_ARRAY: { @@ -1485,9 +1601,18 @@ export const data = [ }, ], metadata: [ - { jobId: 3, additionalProp: 3, userId: 'u1' }, - { jobId: 4, additionalProp: 4, userId: 'u1' }, - { jobId: 5, additionalProp: 5, userId: 'u1' }, + { + jobId: 3, + additionalProp: 3, + }, + { + jobId: 4, + additionalProp: 4, + }, + { + jobId: 5, + additionalProp: 5, + }, ], batched: true, statusCode: 200, @@ -1551,7 +1676,12 @@ export const data = [ files: {}, }, ], - metadata: [{ jobId: 6, additionalProp: 6, userId: 'u1' }], + metadata: [ + { + jobId: 6, + additionalProp: 6, + }, + ], batched: true, statusCode: 200, destination: { @@ -1560,7 +1690,11 @@ export const data = [ apiSecret: 'test_api_secret', token: 'test_api_token', prefixProperties: true, - groupKeySettings: [{ groupKey: 'company' }], + groupKeySettings: [ + { + groupKey: 'company', + }, + ], strictMode: true, useNativeSDK: false, }, @@ -1576,7 +1710,12 @@ export const data = [ }, }, { - metadata: [{ jobId: 7, additionalProp: 7, userId: 'u1' }], + metadata: [ + { + jobId: 7, + additionalProp: 7, + }, + ], batched: false, statusCode: 400, error: @@ -1596,7 +1735,11 @@ export const data = [ token: 'test_api_token', prefixProperties: true, useNativeSDK: false, - groupKeySettings: [{ groupKey: 'company' }], + groupKeySettings: [ + { + groupKey: 'company', + }, + ], strictMode: true, }, DestinationDefinition: { diff --git a/test/integrations/destinations/ometria/router/data.ts b/test/integrations/destinations/ometria/router/data.ts index 58f3a91d87..ef15eea586 100644 --- a/test/integrations/destinations/ometria/router/data.ts +++ b/test/integrations/destinations/ometria/router/data.ts @@ -16,7 +16,10 @@ export const data = [ userId: 'userId1', channel: 'web', context: { - os: { name: '', version: '' }, + os: { + name: '', + version: '', + }, app: { name: 'RudderLabs JavaScript SDK', build: '1.0.0', @@ -50,7 +53,10 @@ export const data = [ field1: 'val1', ip: '0.0.0.0', }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.2.1' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.2.1', + }, campaign: {}, userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36', @@ -61,10 +67,14 @@ export const data = [ receivedAt: '2021-10-25T15:10:08.889+05:30', request_ip: '[::1]', anonymousId: '7138f7d9-5dd2-4337-805d-ca17be59dc8e', - integrations: { Ometria: { listingId: 'test1' } }, + integrations: { + Ometria: { + listingId: 'test1', + }, + }, originalTimestamp: '2021-10-25T09:40:08.879Z', }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { jobId: 1 }, destination: { ID: '1zzHtStW2ZPlullmz6L7DGnmk9V', Name: 'ometria-dev', @@ -121,7 +131,10 @@ export const data = [ userId: 'userId1', channel: 'web', context: { - os: { name: '', version: '' }, + os: { + name: '', + version: '', + }, app: { name: 'RudderLabs JavaScript SDK', build: '1.0.0', @@ -155,7 +168,10 @@ export const data = [ field1: 'val1', ip: '0.0.0.0', }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.2.1' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.2.1', + }, campaign: {}, userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36', @@ -165,10 +181,15 @@ export const data = [ timestamp: '2021-10-25T15:10:08.888+05:30', receivedAt: '2021-10-25T15:10:08.889+05:30', request_ip: '[::1]', - integrations: { Ometria: { listingId: 'updatedId1', allowMarketing: true } }, + integrations: { + Ometria: { + listingId: 'updatedId1', + allowMarketing: true, + }, + }, originalTimestamp: '2021-10-25T09:40:08.879Z', }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { jobId: 2 }, destination: { ID: '1zzHtStW2ZPlullmz6L7DGnmk9V', Name: 'ometria-dev', @@ -234,7 +255,9 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://api.ometria.com/v2/push', - headers: { 'X-Ometria-Auth': 'dummyApiKey' }, + headers: { + 'X-Ometria-Auth': 'dummyApiKey', + }, params: {}, body: { JSON: {}, @@ -248,8 +271,12 @@ export const data = [ files: {}, }, metadata: [ - { jobId: 1, userId: 'u1' }, - { jobId: 2, userId: 'u1' }, + { + jobId: 1, + }, + { + jobId: 2, + }, ], batched: true, statusCode: 200, diff --git a/test/integrations/destinations/one_signal/router/data.ts b/test/integrations/destinations/one_signal/router/data.ts index fe8460e45d..5f45d2e624 100644 --- a/test/integrations/destinations/one_signal/router/data.ts +++ b/test/integrations/destinations/one_signal/router/data.ts @@ -19,14 +19,19 @@ export const data = [ allowedProperties: [], }, }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, message: { type: 'identify', sentAt: '2021-01-03T17:02:53.195Z', userId: 'user@27', channel: 'web', context: { - os: { name: '', version: '1.12.3' }, + os: { + name: '', + version: '1.12.3', + }, app: { name: 'RudderLabs JavaScript SDK', build: '1.0.0', @@ -41,9 +46,18 @@ export const data = [ userId: 'user@27', }, locale: 'en-US', - device: { token: 'token', id: 'id', type: 'ios' }, - screen: { density: 2 }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.1.11' }, + 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', @@ -61,19 +75,34 @@ export const data = [ emailDeviceType: false, smsDeviceType: false, eventAsTags: false, - allowedProperties: [{ propertyName: 'brand' }, { propertyName: 'price' }], + allowedProperties: [ + { + propertyName: 'brand', + }, + { + propertyName: 'price', + }, + ], }, }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, message: { event: 'add_to_Cart', type: 'track', sentAt: '2021-01-03T17:02:53.195Z', userId: 'user@27', channel: 'web', - properties: { brand: 'Zara', price: '12000' }, + properties: { + brand: 'Zara', + price: '12000', + }, context: { - os: { name: '', version: '' }, + os: { + name: '', + version: '', + }, app: { name: 'RudderLabs JavaScript SDK', build: '1.0.0', @@ -81,8 +110,13 @@ export const data = [ namespace: 'com.rudderlabs.javascript', }, locale: 'en-US', - screen: { density: 2 }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.1.11' }, + 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', @@ -111,7 +145,10 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://onesignal.com/api/v1/players', - headers: { Accept: 'application/json', 'Content-Type': 'application/json' }, + headers: { + Accept: 'application/json', + 'Content-Type': 'application/json', + }, params: {}, body: { JSON: { @@ -143,7 +180,10 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://onesignal.com/api/v1/players', - headers: { Accept: 'application/json', 'Content-Type': 'application/json' }, + headers: { + Accept: 'application/json', + 'Content-Type': 'application/json', + }, params: {}, body: { JSON: { @@ -171,7 +211,11 @@ export const data = [ files: {}, }, ], - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [ + { + jobId: 1, + }, + ], batched: false, statusCode: 200, destination: { @@ -189,19 +233,32 @@ export const data = [ body: { XML: {}, FORM: {}, - JSON: { tags: { brand: 'Zara', price: '12000', add_to_Cart: true } }, + JSON: { + tags: { + brand: 'Zara', + price: '12000', + add_to_Cart: true, + }, + }, JSON_ARRAY: {}, }, type: 'REST', files: {}, method: 'PUT', params: {}, - headers: { Accept: 'application/json', 'Content-Type': 'application/json' }, + headers: { + Accept: 'application/json', + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://onesignal.com/api/v1/apps/random-818c-4a28-b98e-6cd8a994eb22/users/user@27', }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { @@ -210,7 +267,14 @@ export const data = [ emailDeviceType: false, smsDeviceType: false, eventAsTags: false, - allowedProperties: [{ propertyName: 'brand' }, { propertyName: 'price' }], + allowedProperties: [ + { + propertyName: 'brand', + }, + { + propertyName: 'price', + }, + ], }, }, }, diff --git a/test/integrations/destinations/optimizely_fullstack/router/data.ts b/test/integrations/destinations/optimizely_fullstack/router/data.ts index 97806a93a1..1803881f30 100644 --- a/test/integrations/destinations/optimizely_fullstack/router/data.ts +++ b/test/integrations/destinations/optimizely_fullstack/router/data.ts @@ -1,8 +1,11 @@ +import { FEATURES } from '../../../../../src/v0/util/tags'; +import { mockFns } from '../processor/data'; + export const data = [ { name: 'optimizely_fullstack', description: 'Test 0', - feature: 'router', + feature: FEATURES.ROUTER, module: 'destination', version: 'v0', input: { @@ -15,7 +18,11 @@ export const data = [ channel: 'web', properties: {}, context: { - traits: { organization: 'RudderStack', fullName: 'John Doe', country: 'US' }, + traits: { + organization: 'RudderStack', + fullName: 'John Doe', + country: 'US', + }, sessionId: 1685626914716, }, rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', @@ -25,11 +32,17 @@ export const data = [ userId: 'userId123', integrations: { All: true, - optimizely_fullstack: { variationId: 'test_variation_id_1' }, + optimizely_fullstack: { + variationId: 'test_variation_id_1', + }, }, }, destination: { - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, Config: { dataFileUrl: 'https://cdn.optimizely.com/datafiles/abc.json', accountId: 'test_account_id', @@ -37,12 +50,20 @@ export const data = [ experimentId: 'test_experiment_id', trackKnownUsers: true, attributeMapping: [ - { from: 'organization', to: 'company' }, - { from: 'fullName', to: 'name' }, + { + from: 'organization', + to: 'company', + }, + { + from: 'fullName', + to: 'name', + }, ], }, }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, }, { message: { @@ -51,21 +72,34 @@ export const data = [ userId: 'userId123', channel: 'web', context: { - traits: { organization: 'RudderStack', fullName: 'John Doe' }, + traits: { + organization: 'RudderStack', + fullName: 'John Doe', + }, sessionId: 1685626914716, }, rudderId: '5354b3f2-cb72-4355-a2b5-a298c3837c7d', messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', timestamp: '2023-02-10T12:16:07.251Z', - properties: { foo: 'bar', revenue: 123, quantity: 2 }, + properties: { + foo: 'bar', + revenue: 123, + quantity: 2, + }, anonymousId: '856365b8-da4b-4c13-9098-84df18559446', integrations: { All: true, - optimizely_fullstack: { variationId: 'test_variation_id_2' }, + optimizely_fullstack: { + variationId: 'test_variation_id_2', + }, }, }, destination: { - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, Config: { dataFileUrl: 'https://cdn.optimizely.com/datafiles/abc.json', accountId: 'test_account_id', @@ -74,16 +108,30 @@ export const data = [ trackKnownUsers: true, anonymizeIp: true, eventMapping: [ - { from: 'Product Searched', to: 'Searched' }, - { from: 'product_added', to: 'Product Added' }, + { + from: 'Product Searched', + to: 'Searched', + }, + { + from: 'product_added', + to: 'Product Added', + }, ], attributeMapping: [ - { from: 'organization', to: 'company' }, - { from: 'fullName', to: 'name' }, + { + from: 'organization', + to: 'company', + }, + { + from: 'fullName', + to: 'name', + }, ], }, }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, }, { message: { @@ -91,21 +139,33 @@ export const data = [ userId: 'userId123', channel: 'web', context: { - traits: { organization: 'RudderStack', fullName: 'John Doe' }, + traits: { + organization: 'RudderStack', + fullName: 'John Doe', + }, sessionId: 1685626914716, }, rudderId: '5354b3f2-cb72-4355-a2b5-a298c3837c7d', messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', timestamp: '2023-02-10T12:16:07.251Z', - properties: { foo: 'bar', category: 'food' }, + properties: { + foo: 'bar', + category: 'food', + }, anonymousId: '856365b8-da4b-4c13-9098-84df18559446', integrations: { All: true, - optimizely_fullstack: { variationId: 'test_variation_id_1' }, + optimizely_fullstack: { + variationId: 'test_variation_id_1', + }, }, }, destination: { - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, Config: { dataFileUrl: 'https://cdn.optimizely.com/datafiles/abc.json', accountId: 'test_account_id', @@ -116,12 +176,20 @@ export const data = [ trackCategorizedPages: true, trackNamedPages: false, pageMapping: [ - { from: 'meal', to: 'Viewed Meal Page' }, - { from: 'food', to: 'Product Added' }, + { + from: 'meal', + to: 'Viewed Meal Page', + }, + { + from: 'food', + to: 'Product Added', + }, ], }, }, - metadata: { jobId: 3, userId: 'u1' }, + metadata: { + jobId: 3, + }, }, { message: { @@ -133,10 +201,19 @@ export const data = [ rudderId: '8f8fa6b5-8e24-489c-8e22-61f23f2e364f', messageId: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', - integrations: { All: true, optimizely_fullstack: { variationId: '123' } }, + integrations: { + All: true, + optimizely_fullstack: { + variationId: '123', + }, + }, }, destination: { - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, Config: { dataFileUrl: 'https://cdn.optimizely.com/datafiles/abc.json', accountId: 'test_account_id', @@ -146,7 +223,9 @@ export const data = [ trackNamedPages: false, }, }, - metadata: { jobId: 4, userId: 'u1' }, + metadata: { + jobId: 4, + }, }, ], destType: 'optimizely_fullstack', @@ -166,7 +245,9 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://logx.optimizely.com/v1/events', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, params: {}, body: { JSON: { @@ -222,7 +303,11 @@ export const data = [ files: {}, }, destination: { - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, Config: { dataFileUrl: 'https://cdn.optimizely.com/datafiles/abc.json', accountId: 'test_account_id', @@ -230,12 +315,22 @@ export const data = [ experimentId: 'test_experiment_id', trackKnownUsers: true, attributeMapping: [ - { from: 'organization', to: 'company' }, - { from: 'fullName', to: 'name' }, + { + from: 'organization', + to: 'company', + }, + { + from: 'fullName', + to: 'name', + }, ], }, }, - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [ + { + jobId: 1, + }, + ], statusCode: 200, }, { @@ -245,7 +340,9 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://logx.optimizely.com/v1/events', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, params: {}, body: { JSON: { @@ -282,7 +379,9 @@ export const data = [ uuid: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', quantity: 2, revenue: 12300, - tags: { foo: 'bar' }, + tags: { + foo: 'bar', + }, }, ], }, @@ -298,7 +397,11 @@ export const data = [ files: {}, }, destination: { - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, Config: { dataFileUrl: 'https://cdn.optimizely.com/datafiles/abc.json', accountId: 'test_account_id', @@ -307,16 +410,32 @@ export const data = [ trackKnownUsers: true, anonymizeIp: true, eventMapping: [ - { from: 'Product Searched', to: 'Searched' }, - { from: 'product_added', to: 'Product Added' }, + { + from: 'Product Searched', + to: 'Searched', + }, + { + from: 'product_added', + to: 'Product Added', + }, ], attributeMapping: [ - { from: 'organization', to: 'company' }, - { from: 'fullName', to: 'name' }, + { + from: 'organization', + to: 'company', + }, + { + from: 'fullName', + to: 'name', + }, ], }, }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], statusCode: 200, }, { @@ -326,7 +445,9 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://logx.optimizely.com/v1/events', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, params: {}, body: { JSON: { @@ -347,7 +468,10 @@ export const data = [ key: 'Product Added', timestamp: 1676031367251, uuid: '2116ef8c-efc3-4ca4-851b-02ee60dad6ff', - tags: { foo: 'bar', category: 'food' }, + tags: { + foo: 'bar', + category: 'food', + }, }, ], }, @@ -363,7 +487,11 @@ export const data = [ files: {}, }, destination: { - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, Config: { dataFileUrl: 'https://cdn.optimizely.com/datafiles/abc.json', accountId: 'test_account_id', @@ -374,18 +502,32 @@ export const data = [ trackCategorizedPages: true, trackNamedPages: false, pageMapping: [ - { from: 'meal', to: 'Viewed Meal Page' }, - { from: 'food', to: 'Product Added' }, + { + from: 'meal', + to: 'Viewed Meal Page', + }, + { + from: 'food', + to: 'Product Added', + }, ], }, }, - metadata: [{ jobId: 3, userId: 'u1' }], + metadata: [ + { + jobId: 3, + }, + ], statusCode: 200, }, { batched: false, destination: { - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, Config: { accountId: 'test_account_id', campaignId: 'test_campagin_id', @@ -397,7 +539,11 @@ export const data = [ }, error: "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.", - metadata: [{ jobId: 4, userId: 'u1' }], + metadata: [ + { + jobId: 4, + }, + ], statTags: { destType: 'OPTIMIZELY_FULLSTACK', errorCategory: 'dataValidation', @@ -412,5 +558,6 @@ export const data = [ }, }, }, + mockFns, }, ]; diff --git a/test/integrations/destinations/ortto/router/data.ts b/test/integrations/destinations/ortto/router/data.ts index dc0d4ec45c..58a1dc3a5d 100644 --- a/test/integrations/destinations/ortto/router/data.ts +++ b/test/integrations/destinations/ortto/router/data.ts @@ -11,7 +11,11 @@ export const data = [ input: [ { destination: { - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', Name: 'ORTTO', Config: { @@ -22,7 +26,11 @@ export const data = [ rsEventName: 'RudderEvent', orttoEventName: 'Ortto Event', eventProperties: [ - { rudderProperty: 'RudderProp', orttoProperty: 'OrttoProp', type: 'text' }, + { + rudderProperty: 'RudderProp', + orttoProperty: 'OrttoProp', + type: 'text', + }, { rudderProperty: 'RudderProp', orttoProperty: 'OrttoProp', @@ -47,7 +55,7 @@ export const data = [ Enabled: true, Transformations: [], }, - metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', jobId: 1, userId: 'u1' }, + metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', jobId: 1 }, message: { anonymousId: '8d872292709c6fbe', channel: 'mobile', @@ -65,11 +73,26 @@ export const data = [ name: 'generic_x86_arm', type: 'android', }, - library: { name: 'com.rudderstack.android.sdk.core', version: '1.0.2' }, + 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 }, + 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', @@ -98,7 +121,9 @@ export const data = [ userAgent: 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', }, - integrations: { All: true }, + integrations: { + All: true, + }, messageId: '1590431830915-73bed370-5889-436d-9a9e-0c0e0c809d06', originalTimestamp: '2020-05-25T18:37:10.917Z', type: 'identify', @@ -107,7 +132,11 @@ export const data = [ }, { destination: { - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', Name: 'ORTTO', Config: { @@ -118,7 +147,11 @@ export const data = [ rsEventName: 'RudderEvent', orttoEventName: 'Ortto Event', eventProperties: [ - { rudderProperty: 'RudderProp', orttoProperty: 'OrttoProp', type: 'text' }, + { + rudderProperty: 'RudderProp', + orttoProperty: 'OrttoProp', + type: 'text', + }, { rudderProperty: 'RudderProp', orttoProperty: 'OrttoProp', @@ -143,7 +176,7 @@ export const data = [ Enabled: true, Transformations: [], }, - metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', jobId: 2, userId: 'u1' }, + metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', jobId: 2 }, message: { anonymousId: '8d872292709c6fbe', channel: 'mobile', @@ -161,11 +194,26 @@ export const data = [ name: 'generic_x86_arm', type: 'android', }, - library: { name: 'com.rudderstack.android.sdk.core', version: '1.0.2' }, + 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 }, + 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', @@ -196,13 +244,17 @@ export const data = [ 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', }, event: 'RudderEvent', - integrations: { All: true }, + 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' }, + test_key_2: { + test_child_key_1: 'test_child_value_1', + }, price: '58.0', }, originalTimestamp: '2020-05-25T18:37:10.917Z', @@ -230,14 +282,22 @@ export const data = [ 'str::first': 'John', 'str::last': 'Sparrow', 'str::email': 'identify@test.com', - 'geo::city': { name: 'Kolkata' }, + 'geo::city': { + name: 'Kolkata', + }, 'geo::country': {}, 'geo::region': {}, 'str::postal': '700096', - 'dtz::b': { year: 2020, month: 5, day: 26 }, + 'dtz::b': { + year: 2020, + month: 5, + day: 26, + }, 'str::ei': 'sample_user_id', 'str::language': 'en-US', - 'phn::phone': { n: '9112340345' }, + 'phn::phone': { + n: '9112340345', + }, 'bol::gdpr': true, 'bol::p': false, 'bol::sp': false, @@ -256,15 +316,27 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://api.ap3api.com/v1/person/merge', - headers: { 'X-Api-Key': 'dummyApiKey', 'Content-Type': 'application/json' }, + headers: { + 'X-Api-Key': 'dummyApiKey', + 'Content-Type': 'application/json', + }, params: {}, files: {}, }, - metadata: [{ destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', jobId: 1, userId: 'u1' }], + metadata: [ + { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + jobId: 1, + }, + ], batched: true, statusCode: 200, destination: { - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', Name: 'ORTTO', Config: { @@ -275,7 +347,11 @@ export const data = [ rsEventName: 'RudderEvent', orttoEventName: 'Ortto Event', eventProperties: [ - { rudderProperty: 'RudderProp', orttoProperty: 'OrttoProp', type: 'text' }, + { + rudderProperty: 'RudderProp', + orttoProperty: 'OrttoProp', + type: 'text', + }, { rudderProperty: 'RudderProp', orttoProperty: 'OrttoProp', @@ -311,14 +387,22 @@ export const data = [ 'str::first': 'John', 'str::last': 'Sparrow', 'str::email': 'identify@test.com', - 'geo::city': { name: 'Kolkata' }, + 'geo::city': { + name: 'Kolkata', + }, 'geo::country': {}, 'geo::region': {}, 'str::postal': '700096', - 'dtz::b': { year: 2020, month: 5, day: 26 }, + 'dtz::b': { + year: 2020, + month: 5, + day: 26, + }, 'str::ei': 'sample_user_id', 'str::language': 'en-US', - 'phn::phone': { n: '9112340345' }, + 'phn::phone': { + n: '9112340345', + }, 'bol::gdpr': false, 'bol::p': false, 'bol::sp': false, @@ -326,7 +410,10 @@ export const data = [ 'str:cm:ortto-attirbute1': 'def', }, activity_id: 'act:cm:ortto-event', - attributes: { 'str:cm:orttoprop': 'USD', 'txt:cm:orttoprop': 'USD' }, + attributes: { + 'str:cm:orttoprop': 'USD', + 'txt:cm:orttoprop': 'USD', + }, location: {}, }, ], @@ -340,15 +427,27 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://api.ap3api.com/v1/activities/create', - headers: { 'X-Api-Key': 'dummyApiKey', 'Content-Type': 'application/json' }, + headers: { + 'X-Api-Key': 'dummyApiKey', + 'Content-Type': 'application/json', + }, params: {}, files: {}, }, - metadata: [{ destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', jobId: 2, userId: 'u1' }], + metadata: [ + { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + jobId: 2, + }, + ], batched: true, statusCode: 200, destination: { - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', Name: 'ORTTO', Config: { @@ -359,7 +458,11 @@ export const data = [ rsEventName: 'RudderEvent', orttoEventName: 'Ortto Event', eventProperties: [ - { rudderProperty: 'RudderProp', orttoProperty: 'OrttoProp', type: 'text' }, + { + rudderProperty: 'RudderProp', + orttoProperty: 'OrttoProp', + type: 'text', + }, { rudderProperty: 'RudderProp', orttoProperty: 'OrttoProp', diff --git a/test/integrations/destinations/pagerduty/router/data.ts b/test/integrations/destinations/pagerduty/router/data.ts index 87761656f9..02fd53c629 100644 --- a/test/integrations/destinations/pagerduty/router/data.ts +++ b/test/integrations/destinations/pagerduty/router/data.ts @@ -18,7 +18,10 @@ export const data = [ userId: 'user@45', properties: { source: 'rudder-webapp', - customDetails: { 'ping time': '1500ms', 'load avg': 0.75 }, + customDetails: { + 'ping time': '1500ms', + 'load avg': 0.75, + }, imageURLs: [ { src: 'https://static.s4be.cochrane.org/app/uploads/2017/04/shutterstock_531145954.jpg', @@ -28,7 +31,9 @@ export const data = [ src: 'https://chart.googleapis.com/chart?chs=600x400&chd=t:6,2,9,5,2,5,7,4,8,2,1&cht=lc&chds=a&chxt=y&chm=D,0033FF,0,0,5,1', alt: 'second image', }, - { alt: 'third image' }, + { + alt: 'third image', + }, ], linkURLs: [ { @@ -39,12 +44,20 @@ export const data = [ href: 'https://www.techtarget.com/whatis/definition/stack-overflow#:~:text=A%20stack%20overflow%20is%20a,been%20allocated%20to%20that%20stack', text: 'Stack Overflow Error', }, - { text: 'Destructure Error' }, + { + text: 'Destructure Error', + }, ], }, - integrations: { pagerduty: { type: 'changeEvent' } }, + integrations: { + pagerduty: { + type: 'changeEvent', + }, + }, + }, + metadata: { + jobId: 1, }, - metadata: { jobId: 1, userId: 'u1' }, destination: { Config: { routingKey: '9552b56325dc490bd0139be85f7b8fac', @@ -67,7 +80,10 @@ export const data = [ source: 'rudder-webapp', group: 'destination', class: 'connection settings', - customDetails: { 'ping time': '1500ms', 'load avg': 0.75 }, + customDetails: { + 'ping time': '1500ms', + 'load avg': 0.75, + }, imageURLs: [ { src: 'https://static.s4be.cochrane.org/app/uploads/2017/04/shutterstock_531145954.jpg', @@ -77,7 +93,9 @@ export const data = [ src: 'https://chart.googleapis.com/chart?chs=600x400&chd=t:6,2,9,5,2,5,7,4,8,2,1&cht=lc&chds=a&chxt=y&chm=D,0033FF,0,0,5,1', alt: 'second image', }, - { alt: 'third image' }, + { + alt: 'third image', + }, ], linkURLs: [ { @@ -88,11 +106,15 @@ export const data = [ href: 'https://www.techtarget.com/whatis/definition/stack-overflow#:~:text=A%20stack%20overflow%20is%20a,been%20allocated%20to%20that%20stack', text: 'Stack Overflow Error', }, - { text: 'Destructure Error' }, + { + text: 'Destructure Error', + }, ], }, }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, destination: { Config: { routingKey: '9552b56325dc490bd0139be85f7b8fac', @@ -116,7 +138,10 @@ export const data = [ source: 'rudder-webapp', group: 'destination', class: 'connection settings', - customDetails: { 'ping time': '1500ms', 'load avg': 0.75 }, + customDetails: { + 'ping time': '1500ms', + 'load avg': 0.75, + }, imageURLs: [ { src: 'https://static.s4be.cochrane.org/app/uploads/2017/04/shutterstock_531145954.jpg', @@ -126,7 +151,9 @@ export const data = [ src: 'https://chart.googleapis.com/chart?chs=600x400&chd=t:6,2,9,5,2,5,7,4,8,2,1&cht=lc&chds=a&chxt=y&chm=D,0033FF,0,0,5,1', alt: 'second image', }, - { alt: 'third image' }, + { + alt: 'third image', + }, ], linkURLs: [ { @@ -137,11 +164,15 @@ export const data = [ href: 'https://www.techtarget.com/whatis/definition/stack-overflow#:~:text=A%20stack%20overflow%20is%20a,been%20allocated%20to%20that%20stack', text: 'Stack Overflow Error', }, - { text: 'Destructure Error' }, + { + text: 'Destructure Error', + }, ], }, }, - metadata: { jobId: 3, userId: 'u1' }, + metadata: { + jobId: 3, + }, destination: { Config: { routingKey: '9552b56325dc490bd0139be85f7b8fac', @@ -190,7 +221,10 @@ export const data = [ payload: { source: 'rudder-webapp', summary: 'Github CI/CD Triggered', - custom_details: { 'load avg': 0.75, 'ping time': '1500ms' }, + custom_details: { + 'load avg': 0.75, + 'ping time': '1500ms', + }, }, routing_key: '9552b56325dc490bd0139be85f7b8fac', }, @@ -200,7 +234,9 @@ export const data = [ files: {}, method: 'POST', params: {}, - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://events.pagerduty.com/v2/change/enqueue', }, @@ -210,7 +246,7 @@ export const data = [ dedupKeyFieldIdentifier: 'properties.dedupKey', }, }, - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [{ jobId: 1 }], statusCode: 200, }, { @@ -230,7 +266,9 @@ export const data = [ files: {}, method: 'POST', params: {}, - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://events.pagerduty.com/v2/enqueue', }, @@ -240,13 +278,13 @@ export const data = [ dedupKeyFieldIdentifier: 'properties.dedupKey', }, }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [{ jobId: 2 }], statusCode: 200, }, { batched: false, error: 'Events must be sent within ninety days of their occurrence', - metadata: [{ jobId: 3, userId: 'u1' }], + metadata: [{ jobId: 3 }], statusCode: 400, statTags: { destType: 'PAGERDUTY', diff --git a/test/integrations/destinations/pardot/router/data.ts b/test/integrations/destinations/pardot/router/data.ts index 053897b085..7c2a2a11e3 100644 --- a/test/integrations/destinations/pardot/router/data.ts +++ b/test/integrations/destinations/pardot/router/data.ts @@ -1,3 +1,5 @@ +import { FEATURES, MODULES } from '../../../../../src/v0/util/tags'; + export const data = [ { name: 'pardot', @@ -23,7 +25,9 @@ export const data = [ name: 'PARDOT', displayName: 'Pardot', config: { - auth: { type: 'OAuth' }, + auth: { + type: 'OAuth', + }, transformAt: 'router', transformAtV1: 'router', saveDestinationResponse: true, @@ -54,8 +58,10 @@ export const data = [ }, metadata: { jobId: 1, - secret: { access_token: 'myToken', refresh_token: 'myRefreshToken' }, - userId: 'u1', + secret: { + access_token: 'myToken', + refresh_token: 'myRefreshToken', + }, }, message: { type: 'identify', @@ -64,7 +70,10 @@ export const data = [ userId: 'user12345', channel: 'web', context: { - os: { name: '', version: '' }, + os: { + name: '', + version: '', + }, app: { name: 'RudderLabs JavaScript SDK', build: '1.0.0', @@ -91,11 +100,19 @@ export const data = [ innerHeight: 776, }, traits: {}, - library: { name: 'RudderLabs JavaScript SDK', version: '1.1.18' }, + 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', - externalId: [{ type: 'pardotId', id: 123435 }], + externalId: [ + { + type: 'pardotId', + id: 123435, + }, + ], }, rudderId: 'fa2994a5-2a81-45fd-9919-fcf5596ad380', messageId: 'e2d1a383-d9a2-4e03-a9dc-131d153c4d95', @@ -104,7 +121,9 @@ export const data = [ receivedAt: '2021-11-15T14:06:42.497+05:30', request_ip: '[::1]', anonymousId: 'd8b2ed61-7fa5-4ef8-bd92-6a506157c0cf', - integrations: { All: true }, + integrations: { + All: true, + }, originalTimestamp: '2021-09-08T11:10:45.466Z', traits: { email: 'Roger12@waltair.io', @@ -130,7 +149,9 @@ export const data = [ name: 'PARDOT', displayName: 'Pardot', config: { - auth: { type: 'OAuth' }, + auth: { + type: 'OAuth', + }, transformAt: 'router', transformAtV1: 'router', saveDestinationResponse: true, @@ -161,8 +182,10 @@ export const data = [ }, metadata: { jobId: 2, - secret: { access_token: 'myToken', refresh_token: 'myRefreshToken' }, - userId: 'u1', + secret: { + access_token: 'myToken', + refresh_token: 'myRefreshToken', + }, }, message: { type: 'identify', @@ -171,7 +194,10 @@ export const data = [ userId: 'user12345', channel: 'web', context: { - os: { name: '', version: '' }, + os: { + name: '', + version: '', + }, app: { name: 'RudderLabs JavaScript SDK', build: '1.0.0', @@ -198,7 +224,10 @@ export const data = [ innerHeight: 776, }, traits: {}, - library: { name: 'RudderLabs JavaScript SDK', version: '1.1.18' }, + 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', @@ -210,7 +239,9 @@ export const data = [ receivedAt: '2021-11-15T14:06:42.497+05:30', request_ip: '[::1]', anonymousId: 'd8b2ed61-7fa5-4ef8-bd92-6a506157c0cf', - integrations: { All: true }, + integrations: { + All: true, + }, originalTimestamp: '2021-09-08T11:10:45.466Z', traits: { email: 'Roger_12@waltair.io', @@ -236,7 +267,9 @@ export const data = [ name: 'PARDOT', displayName: 'Pardot', config: { - auth: { type: 'OAuth' }, + auth: { + type: 'OAuth', + }, transformAt: 'router', transformAtV1: 'router', saveDestinationResponse: true, @@ -267,8 +300,10 @@ export const data = [ }, metadata: { jobId: 3, - secret: { access_token: 'myToken', refresh_token: 'myRefreshToken' }, - userId: 'u1', + secret: { + access_token: 'myToken', + refresh_token: 'myRefreshToken', + }, }, message: { type: 'identify', @@ -277,7 +312,10 @@ export const data = [ userId: 'user12345', channel: 'web', context: { - os: { name: '', version: '' }, + os: { + name: '', + version: '', + }, app: { name: 'RudderLabs JavaScript SDK', build: '1.0.0', @@ -304,11 +342,19 @@ export const data = [ innerHeight: 776, }, traits: {}, - library: { name: 'RudderLabs JavaScript SDK', version: '1.1.18' }, + 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', - externalId: [{ type: 'crmfid', id: '00Q6r000002LKhTPVR' }], + externalId: [ + { + type: 'crmfid', + id: '00Q6r000002LKhTPVR', + }, + ], }, rudderId: 'fa2994a5-2a81-45fd-9919-fcf5596ad380', messageId: 'e2d1a383-d9a2-4e03-a9dc-131d153c4d95', @@ -317,7 +363,9 @@ export const data = [ receivedAt: '2021-11-15T14:06:42.497+05:30', request_ip: '[::1]', anonymousId: 'd8b2ed61-7fa5-4ef8-bd92-6a506157c0cf', - integrations: { All: true }, + integrations: { + All: true, + }, originalTimestamp: '2021-09-08T11:10:45.466Z', traits: { email: 'nick_kyrgios@waltair.io', @@ -343,7 +391,9 @@ export const data = [ name: 'PARDOT', displayName: 'Pardot', config: { - auth: { type: 'OAuth' }, + auth: { + type: 'OAuth', + }, transformAt: 'router', transformAtV1: 'router', saveDestinationResponse: true, @@ -374,8 +424,10 @@ export const data = [ }, metadata: { jobId: 4, - secret: { access_token: 'myExpiredToken', refresh_token: 'myRefreshToken' }, - userId: 'u1', + secret: { + access_token: 'myExpiredToken', + refresh_token: 'myRefreshToken', + }, }, message: { type: 'identify', @@ -384,7 +436,10 @@ export const data = [ userId: 'user12345', channel: 'web', context: { - os: { name: '', version: '' }, + os: { + name: '', + version: '', + }, app: { name: 'RudderLabs JavaScript SDK', build: '1.0.0', @@ -411,7 +466,10 @@ export const data = [ innerHeight: 776, }, traits: {}, - library: { name: 'RudderLabs JavaScript SDK', version: '1.1.18' }, + 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', @@ -423,7 +481,9 @@ export const data = [ receivedAt: '2021-11-15T14:06:42.497+05:30', request_ip: '[::1]', anonymousId: 'd8b2ed61-7fa5-4ef8-bd92-6a506157c0cf', - integrations: { All: true }, + integrations: { + All: true, + }, originalTimestamp: '2021-09-08T11:10:45.466Z', traits: { email: 'rolex_waltair@mywebsite.io', @@ -449,7 +509,9 @@ export const data = [ name: 'PARDOT', displayName: 'Pardot', config: { - auth: { type: 'OAuth' }, + auth: { + type: 'OAuth', + }, transformAt: 'router', transformAtV1: 'router', saveDestinationResponse: true, @@ -478,7 +540,10 @@ export const data = [ Name: 'test destination', Transformations: [], }, - metadata: { jobId: 5, secret: null, userId: 'u1' }, + metadata: { + jobId: 5, + secret: null, + }, message: { type: 'identify', event: 'navigated user', @@ -486,7 +551,10 @@ export const data = [ userId: 'user12345', channel: 'web', context: { - os: { name: '', version: '' }, + os: { + name: '', + version: '', + }, app: { name: 'RudderLabs JavaScript SDK', build: '1.0.0', @@ -513,7 +581,10 @@ export const data = [ innerHeight: 776, }, traits: {}, - library: { name: 'RudderLabs JavaScript SDK', version: '1.1.18' }, + 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', @@ -525,7 +596,9 @@ export const data = [ receivedAt: '2021-11-15T14:06:42.497+05:30', request_ip: '[::1]', anonymousId: 'd8b2ed61-7fa5-4ef8-bd92-6a506157c0cf', - integrations: { All: true }, + integrations: { + All: true, + }, originalTimestamp: '2021-09-08T11:10:45.466Z', traits: { email: 'rolex_waltair@mywebsite.io', @@ -576,8 +649,10 @@ export const data = [ metadata: [ { jobId: 1, - secret: { access_token: 'myToken', refresh_token: 'myRefreshToken' }, - userId: 'u1', + secret: { + access_token: 'myToken', + refresh_token: 'myRefreshToken', + }, }, ], batched: false, @@ -595,7 +670,9 @@ export const data = [ name: 'PARDOT', displayName: 'Pardot', config: { - auth: { type: 'OAuth' }, + auth: { + type: 'OAuth', + }, transformAt: 'router', transformAtV1: 'router', saveDestinationResponse: true, @@ -654,8 +731,10 @@ export const data = [ metadata: [ { jobId: 2, - secret: { access_token: 'myToken', refresh_token: 'myRefreshToken' }, - userId: 'u1', + secret: { + access_token: 'myToken', + refresh_token: 'myRefreshToken', + }, }, ], batched: false, @@ -673,7 +752,9 @@ export const data = [ name: 'PARDOT', displayName: 'Pardot', config: { - auth: { type: 'OAuth' }, + auth: { + type: 'OAuth', + }, transformAt: 'router', transformAtV1: 'router', saveDestinationResponse: true, @@ -732,8 +813,10 @@ export const data = [ metadata: [ { jobId: 3, - secret: { access_token: 'myToken', refresh_token: 'myRefreshToken' }, - userId: 'u1', + secret: { + access_token: 'myToken', + refresh_token: 'myRefreshToken', + }, }, ], batched: false, @@ -751,7 +834,9 @@ export const data = [ name: 'PARDOT', displayName: 'Pardot', config: { - auth: { type: 'OAuth' }, + auth: { + type: 'OAuth', + }, transformAt: 'router', transformAtV1: 'router', saveDestinationResponse: true, @@ -810,8 +895,10 @@ export const data = [ metadata: [ { jobId: 4, - secret: { access_token: 'myExpiredToken', refresh_token: 'myRefreshToken' }, - userId: 'u1', + secret: { + access_token: 'myExpiredToken', + refresh_token: 'myRefreshToken', + }, }, ], batched: false, @@ -829,7 +916,9 @@ export const data = [ name: 'PARDOT', displayName: 'Pardot', config: { - auth: { type: 'OAuth' }, + auth: { + type: 'OAuth', + }, transformAt: 'router', transformAtV1: 'router', saveDestinationResponse: true, @@ -873,7 +962,9 @@ export const data = [ name: 'PARDOT', displayName: 'Pardot', config: { - auth: { type: 'OAuth' }, + auth: { + type: 'OAuth', + }, transformAt: 'router', transformAtV1: 'router', saveDestinationResponse: true, @@ -902,7 +993,12 @@ export const data = [ Name: 'test destination', Transformations: [], }, - metadata: [{ jobId: 5, secret: null, userId: 'u1' }], + metadata: [ + { + jobId: 5, + secret: null, + }, + ], batched: false, statusCode: 500, error: 'OAuth - access token not found', @@ -923,8 +1019,8 @@ export const data = [ { name: 'pardot', description: 'Test proxy - 0', - feature: 'dataDelivery', - module: 'destination', + feature: FEATURES.DATA_DELIVERY, + module: MODULES.DESTINATION, version: 'v0', input: { request: { @@ -950,7 +1046,9 @@ export const data = [ }, }, files: {}, - params: { destination: 'pardot' }, + params: { + destination: 'pardot', + }, }, method: 'POST', }, @@ -964,7 +1062,10 @@ export const data = [ status: 200, destinationResponse: { response: { - '@attributes': { stat: 'ok', version: 1 }, + '@attributes': { + stat: 'ok', + version: 1, + }, prospect: { id: 123435, campaign_id: 42213, @@ -1011,7 +1112,11 @@ export const data = [ is_starred: null, created_at: '2022-01-21 18:21:46', updated_at: '2022-01-21 18:48:41', - campaign: { id: 42113, name: 'Test', crm_fid: '7012y000000MNOCLL4' }, + campaign: { + id: 42113, + name: 'Test', + crm_fid: '7012y000000MNOCLL4', + }, assigned_to: { user: { id: 38443703, @@ -1037,10 +1142,26 @@ export const data = [ id: 304, name: 'Default', profile_criteria: [ - { id: 1500, name: 'Shipping Volume', matches: 'Unknown' }, - { id: 1502, name: 'Industry', matches: 'Unknown' }, - { id: 1506, name: 'Job Title', matches: 'Unknown' }, - { id: 1508, name: 'Department', matches: 'Unknown' }, + { + id: 1500, + name: 'Shipping Volume', + matches: 'Unknown', + }, + { + id: 1502, + name: 'Industry', + matches: 'Unknown', + }, + { + id: 1506, + name: 'Job Title', + matches: 'Unknown', + }, + { + id: 1508, + name: 'Department', + matches: 'Unknown', + }, ], }, visitors: null, @@ -1058,8 +1179,8 @@ export const data = [ { name: 'pardot', description: 'Test proxy - 1', - feature: 'dataDelivery', - module: 'destination', + feature: FEATURES.DATA_DELIVERY, + module: MODULES.DESTINATION, version: 'v0', input: { request: { @@ -1086,7 +1207,9 @@ export const data = [ }, }, files: {}, - params: { destination: 'pardot' }, + params: { + destination: 'pardot', + }, }, method: 'POST', }, @@ -1100,7 +1223,10 @@ export const data = [ status: 201, destinationResponse: { response: { - '@attributes': { stat: 'ok', version: 1 }, + '@attributes': { + stat: 'ok', + version: 1, + }, prospect: { id: 123435, campaign_id: 42213, @@ -1147,7 +1273,11 @@ export const data = [ is_starred: null, created_at: '2022-01-21 18:21:46', updated_at: '2022-01-21 18:48:41', - campaign: { id: 42113, name: 'Test', crm_fid: '7012y000000MNOCLL4' }, + campaign: { + id: 42113, + name: 'Test', + crm_fid: '7012y000000MNOCLL4', + }, assigned_to: { user: { id: 38443703, @@ -1173,10 +1303,26 @@ export const data = [ id: 304, name: 'Default', profile_criteria: [ - { id: 1500, name: 'Shipping Volume', matches: 'Unknown' }, - { id: 1502, name: 'Industry', matches: 'Unknown' }, - { id: 1506, name: 'Job Title', matches: 'Unknown' }, - { id: 1508, name: 'Department', matches: 'Unknown' }, + { + id: 1500, + name: 'Shipping Volume', + matches: 'Unknown', + }, + { + id: 1502, + name: 'Industry', + matches: 'Unknown', + }, + { + id: 1506, + name: 'Job Title', + matches: 'Unknown', + }, + { + id: 1508, + name: 'Department', + matches: 'Unknown', + }, ], }, visitors: null, @@ -1194,8 +1340,8 @@ export const data = [ { name: 'pardot', description: 'Test proxy - 2', - feature: 'dataDelivery', - module: 'destination', + feature: FEATURES.DATA_DELIVERY, + module: MODULES.DESTINATION, version: 'v0', input: { request: { @@ -1221,7 +1367,9 @@ export const data = [ }, }, files: {}, - params: { destination: 'pardot' }, + params: { + destination: 'pardot', + }, }, method: 'POST', }, @@ -1235,7 +1383,10 @@ export const data = [ status: 200, destinationResponse: { response: { - '@attributes': { stat: 'ok', version: 1 }, + '@attributes': { + stat: 'ok', + version: 1, + }, prospect: { id: 123435, campaign_id: 42213, @@ -1282,7 +1433,11 @@ export const data = [ is_starred: null, created_at: '2022-01-21 18:21:46', updated_at: '2022-01-21 18:48:41', - campaign: { id: 42113, name: 'Test', crm_fid: '7012y000000MNOCLL4' }, + campaign: { + id: 42113, + name: 'Test', + crm_fid: '7012y000000MNOCLL4', + }, assigned_to: { user: { id: 38443703, @@ -1308,10 +1463,26 @@ export const data = [ id: 304, name: 'Default', profile_criteria: [ - { id: 1500, name: 'Shipping Volume', matches: 'Unknown' }, - { id: 1502, name: 'Industry', matches: 'Unknown' }, - { id: 1506, name: 'Job Title', matches: 'Unknown' }, - { id: 1508, name: 'Department', matches: 'Unknown' }, + { + id: 1500, + name: 'Shipping Volume', + matches: 'Unknown', + }, + { + id: 1502, + name: 'Industry', + matches: 'Unknown', + }, + { + id: 1506, + name: 'Job Title', + matches: 'Unknown', + }, + { + id: 1508, + name: 'Department', + matches: 'Unknown', + }, ], }, visitors: null, @@ -1329,8 +1500,8 @@ export const data = [ { name: 'pardot', description: 'Test proxy - 3', - feature: 'dataDelivery', - module: 'destination', + feature: FEATURES.DATA_DELIVERY, + module: MODULES.DESTINATION, version: 'v0', input: { request: { @@ -1357,7 +1528,9 @@ export const data = [ }, }, files: {}, - params: { destination: 'pardot' }, + params: { + destination: 'pardot', + }, }, method: 'POST', }, @@ -1372,7 +1545,11 @@ export const data = [ status: 500, authErrorCategory: 'REFRESH_TOKEN', destinationResponse: { - '@attributes': { stat: 'fail', version: 1, err_code: 184 }, + '@attributes': { + stat: 'fail', + version: 1, + err_code: 184, + }, err: 'access_token is invalid, unknown, or malformed: Inactive token', }, statTags: { diff --git a/test/integrations/destinations/persistiq/router/data.ts b/test/integrations/destinations/persistiq/router/data.ts index ddb39b9028..051a8a4bca 100644 --- a/test/integrations/destinations/persistiq/router/data.ts +++ b/test/integrations/destinations/persistiq/router/data.ts @@ -26,22 +26,33 @@ export const data = [ Snippet: 'extra value', extra: 'extraVal', }, - externalId: [{ type: 'persistIqLeadId', id: 'lel1c5u1wuk8' }], + externalId: [ + { + type: 'persistIqLeadId', + id: 'lel1c5u1wuk8', + }, + ], }, traits: { linkedinUrl: 'www.google.com', dup: 'update', status: 'open', - company: { name: 'abc123' }, + company: { + name: 'abc123', + }, }, }, destination: { Config: { apiKey: 'dummyApiKey', - persistIqAttributesMapping: [{ from: 'useroccupation', to: 'occupation' }], + persistIqAttributesMapping: [ + { + from: 'useroccupation', + to: 'occupation', + }, + ], }, }, - metadata: { jobId: 1, userId: 'u1' }, }, ], destType: 'persistiq', @@ -91,7 +102,7 @@ export const data = [ persistIqAttributesMapping: [{ from: 'useroccupation', to: 'occupation' }], }, }, - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [null], statusCode: 200, }, ], diff --git a/test/integrations/destinations/pinterest_tag/router/data.ts b/test/integrations/destinations/pinterest_tag/router/data.ts index c02b1781e3..e004be25f0 100644 --- a/test/integrations/destinations/pinterest_tag/router/data.ts +++ b/test/integrations/destinations/pinterest_tag/router/data.ts @@ -26,10 +26,20 @@ export const data = [ db: '19950715', lastname: 'Rudderlabs', firstName: 'Test', - address: { city: 'Kolkata', state: 'WB', zip: '700114', country: 'IN' }, + address: { + city: 'Kolkata', + state: 'WB', + zip: '700114', + country: 'IN', + }, + }, + device: { + advertisingId: 'abc123', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', }, - 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', @@ -71,9 +81,14 @@ export const data = [ checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', }, anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', - integrations: { All: true }, + integrations: { + All: true, + }, + }, + metadata: { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + jobId: 1, }, - metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', jobId: 1, userId: 'u1' }, destination: { DestinationDefinition: { Config: { cdkV2Enabled: true } }, ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', @@ -88,14 +103,30 @@ export const data = [ deduplicationKey: 'messageId', enhancedMatch: true, customProperties: [ - { properties: 'presentclass' }, - { properties: 'presentgrade' }, + { + properties: 'presentclass', + }, + { + properties: 'presentgrade', + }, ], eventsMapping: [ - { from: 'ABC Searched', to: 'WatchVideo' }, - { from: 'ABC Searched', to: 'Signup' }, - { from: 'User Signup', to: 'Signup' }, - { from: 'User Created', to: 'Signup' }, + { + from: 'ABC Searched', + to: 'WatchVideo', + }, + { + from: 'ABC Searched', + to: 'Signup', + }, + { + from: 'User Signup', + to: 'Signup', + }, + { + from: 'User Created', + to: 'Signup', + }, ], }, Enabled: true, @@ -119,10 +150,20 @@ export const data = [ db: '19950715', lastname: 'Rudderlabs', firstName: 'Test', - address: { city: 'Kolkata', state: 'WB', zip: '700114', country: 'IN' }, + address: { + city: 'Kolkata', + state: 'WB', + zip: '700114', + country: 'IN', + }, + }, + device: { + advertisingId: 'abc123', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', }, - 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', @@ -163,9 +204,14 @@ export const data = [ checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', }, anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', - integrations: { All: true }, + integrations: { + All: true, + }, + }, + metadata: { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + jobId: 2, }, - metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', jobId: 2, userId: 'u1' }, destination: { DestinationDefinition: { Config: { cdkV2Enabled: true } }, ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', @@ -180,14 +226,30 @@ export const data = [ deduplicationKey: 'messageId', enhancedMatch: true, customProperties: [ - { properties: 'presentclass' }, - { properties: 'presentgrade' }, + { + properties: 'presentclass', + }, + { + properties: 'presentgrade', + }, ], eventsMapping: [ - { from: 'ABC Searched', to: 'WatchVideo' }, - { from: 'ABC Searched', to: 'Signup' }, - { from: 'User Signup', to: 'Signup' }, - { from: 'User Created', to: 'Signup' }, + { + from: 'ABC Searched', + to: 'WatchVideo', + }, + { + from: 'ABC Searched', + to: 'Signup', + }, + { + from: 'User Signup', + to: 'Signup', + }, + { + from: 'User Created', + to: 'Signup', + }, ], }, Enabled: true, @@ -211,10 +273,20 @@ export const data = [ db: '19950715', lastname: 'Rudderlabs', firstName: 'Test', - address: { city: 'Kolkata', state: 'WB', zip: '700114', country: 'IN' }, + address: { + city: 'Kolkata', + state: 'WB', + zip: '700114', + country: 'IN', + }, + }, + device: { + advertisingId: 'abc123', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', }, - 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', @@ -236,9 +308,14 @@ export const data = [ checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', }, anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', - integrations: { All: true }, + integrations: { + All: true, + }, + }, + metadata: { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + jobId: 3, }, - metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', jobId: 3, userId: 'u1' }, destination: { DestinationDefinition: { Config: { cdkV2Enabled: true } }, ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', @@ -253,14 +330,30 @@ export const data = [ deduplicationKey: 'messageId', enhancedMatch: true, customProperties: [ - { properties: 'presentclass' }, - { properties: 'presentgrade' }, + { + properties: 'presentclass', + }, + { + properties: 'presentgrade', + }, ], eventsMapping: [ - { from: 'ABC Searched', to: 'WatchVideo' }, - { from: 'ABC Searched', to: 'Signup' }, - { from: 'User Signup', to: 'Signup' }, - { from: 'User Created', to: 'Signup' }, + { + from: 'ABC Searched', + to: 'WatchVideo', + }, + { + from: 'ABC Searched', + to: 'Signup', + }, + { + from: 'User Signup', + to: 'Signup', + }, + { + from: 'User Created', + to: 'Signup', + }, ], }, Enabled: true, @@ -284,10 +377,20 @@ export const data = [ db: '19950715', lastname: 'Rudderlabs', firstName: 'Test', - address: { city: 'Kolkata', state: 'WB', zip: '700114', country: 'IN' }, + address: { + city: 'Kolkata', + state: 'WB', + zip: '700114', + country: 'IN', + }, + }, + device: { + advertisingId: 'abc123', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', }, - 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', @@ -328,9 +431,14 @@ export const data = [ checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', }, anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', - integrations: { All: true }, + integrations: { + All: true, + }, + }, + metadata: { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + jobId: 4, }, - metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', jobId: 4, userId: 'u1' }, destination: { DestinationDefinition: { Config: { cdkV2Enabled: true } }, ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', @@ -345,14 +453,30 @@ export const data = [ deduplicationKey: 'messageId', enhancedMatch: true, customProperties: [ - { properties: 'presentclass' }, - { properties: 'presentgrade' }, + { + properties: 'presentclass', + }, + { + properties: 'presentgrade', + }, ], eventsMapping: [ - { from: 'ABC Searched', to: 'WatchVideo' }, - { from: 'ABC Searched', to: 'Signup' }, - { from: 'User Signup', to: 'Signup' }, - { from: 'User Created', to: 'Signup' }, + { + from: 'ABC Searched', + to: 'WatchVideo', + }, + { + from: 'ABC Searched', + to: 'Signup', + }, + { + from: 'User Signup', + to: 'Signup', + }, + { + from: 'User Created', + to: 'Signup', + }, ], }, Enabled: true, @@ -376,10 +500,20 @@ export const data = [ db: '19950715', lastname: 'Rudderlabs', firstName: 'Test', - address: { city: 'Kolkata', state: 'WB', zip: '700114', country: 'IN' }, + address: { + city: 'Kolkata', + state: 'WB', + zip: '700114', + country: 'IN', + }, + }, + device: { + advertisingId: 'abc123', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', }, - 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', @@ -420,9 +554,14 @@ export const data = [ checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', }, anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', - integrations: { All: true }, + integrations: { + All: true, + }, + }, + metadata: { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + jobId: 5, }, - metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', jobId: 5, userId: 'u1' }, destination: { DestinationDefinition: { Config: { cdkV2Enabled: true } }, ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', @@ -437,14 +576,30 @@ export const data = [ deduplicationKey: 'messageId', enhancedMatch: true, customProperties: [ - { properties: 'presentclass' }, - { properties: 'presentgrade' }, + { + properties: 'presentclass', + }, + { + properties: 'presentgrade', + }, ], eventsMapping: [ - { from: 'ABC Searched', to: 'WatchVideo' }, - { from: 'ABC Searched', to: 'Signup' }, - { from: 'User Signup', to: 'Signup' }, - { from: 'User Created', to: 'Signup' }, + { + from: 'ABC Searched', + to: 'WatchVideo', + }, + { + from: 'ABC Searched', + to: 'Signup', + }, + { + from: 'User Signup', + to: 'Signup', + }, + { + from: 'User Created', + to: 'Signup', + }, ], }, Enabled: true, @@ -468,10 +623,20 @@ export const data = [ db: '19950715', lastname: 'Rudderlabs', firstName: 'Test', - address: { city: 'Kolkata', state: 'WB', zip: '700114', country: 'IN' }, + address: { + city: 'Kolkata', + state: 'WB', + zip: '700114', + country: 'IN', + }, + }, + device: { + advertisingId: 'abc123', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', }, - 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', @@ -512,9 +677,14 @@ export const data = [ checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', }, anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', - integrations: { All: true }, + integrations: { + All: true, + }, + }, + metadata: { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + jobId: 6, }, - metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', jobId: 6, userId: 'u1' }, destination: { DestinationDefinition: { Config: { cdkV2Enabled: true } }, ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', @@ -529,14 +699,30 @@ export const data = [ deduplicationKey: 'messageId', enhancedMatch: true, customProperties: [ - { properties: 'presentclass' }, - { properties: 'presentgrade' }, + { + properties: 'presentclass', + }, + { + properties: 'presentgrade', + }, ], eventsMapping: [ - { from: 'ABC Searched', to: 'WatchVideo' }, - { from: 'ABC Searched', to: 'Signup' }, - { from: 'User Signup', to: 'Signup' }, - { from: 'User Created', to: 'Signup' }, + { + from: 'ABC Searched', + to: 'WatchVideo', + }, + { + from: 'ABC Searched', + to: 'Signup', + }, + { + from: 'User Signup', + to: 'Signup', + }, + { + from: 'User Created', + to: 'Signup', + }, ], }, Enabled: true, @@ -550,7 +736,9 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://ct.pinterest.com/events/v3', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, params: {}, body: { JSON: { @@ -581,8 +769,14 @@ export const data = [ num_items: 3, content_ids: ['507f1f77bcf86cd799439011', '505bd76785ebb509fc183733'], contents: [ - { quantity: 1, item_price: '19' }, - { quantity: 2, item_price: '3' }, + { + quantity: 1, + item_price: '19', + }, + { + quantity: 2, + item_price: '3', + }, ], }, }, @@ -592,7 +786,10 @@ export const data = [ }, files: {}, }, - metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', jobId: 7, userId: 'u1' }, + metadata: { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + jobId: 7, + }, destination: { DestinationDefinition: { Config: { cdkV2Enabled: true } }, ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', @@ -607,14 +804,30 @@ export const data = [ deduplicationKey: 'messageId', enhancedMatch: true, customProperties: [ - { properties: 'presentclass' }, - { properties: 'presentgrade' }, + { + properties: 'presentclass', + }, + { + properties: 'presentgrade', + }, ], eventsMapping: [ - { from: 'ABC Searched', to: 'WatchVideo' }, - { from: 'ABC Searched', to: 'Signup' }, - { from: 'User Signup', to: 'Signup' }, - { from: 'User Created', to: 'Signup' }, + { + from: 'ABC Searched', + to: 'WatchVideo', + }, + { + from: 'ABC Searched', + to: 'Signup', + }, + { + from: 'User Signup', + to: 'Signup', + }, + { + from: 'User Created', + to: 'Signup', + }, ], }, Enabled: true, @@ -638,7 +851,9 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://ct.pinterest.com/events/v3', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, params: {}, body: { JSON: { @@ -674,8 +889,14 @@ export const data = [ opt_out_type: 'LDP', content_ids: ['507f1f77bcf86cd799439011', '505bd76785ebb509fc183733'], contents: [ - { quantity: 1, item_price: '19' }, - { quantity: 2, item_price: '3' }, + { + quantity: 1, + item_price: '19', + }, + { + quantity: 2, + item_price: '3', + }, ], }, }, @@ -710,8 +931,14 @@ export const data = [ opt_out_type: 'LDP', content_ids: ['507f1f77bcf86cd799439011', '505bd76785ebb509fc183733'], contents: [ - { quantity: 1, item_price: '19' }, - { quantity: 2, item_price: '3' }, + { + quantity: 1, + item_price: '19', + }, + { + quantity: 2, + item_price: '3', + }, ], }, }, @@ -745,8 +972,14 @@ export const data = [ num_items: 3, content_ids: ['507f1f77bcf86cd799439011', '505bd76785ebb509fc183733'], contents: [ - { quantity: 1, item_price: '19' }, - { quantity: 2, item_price: '3' }, + { + quantity: 1, + item_price: '19', + }, + { + quantity: 2, + item_price: '3', + }, ], }, }, @@ -779,7 +1012,12 @@ export const data = [ order_id: '50314b8e9bcf000000000000', num_items: 2, content_ids: ['123'], - contents: [{ quantity: 2, item_price: '25' }], + contents: [ + { + quantity: 2, + item_price: '25', + }, + ], }, }, { @@ -812,8 +1050,14 @@ export const data = [ num_items: 3, content_ids: ['507f1f77bcf86cd799439011', '505bd76785ebb509fc183733'], contents: [ - { quantity: 1, item_price: '19' }, - { quantity: 2, item_price: '3' }, + { + quantity: 1, + item_price: '19', + }, + { + quantity: 2, + item_price: '3', + }, ], }, }, @@ -847,8 +1091,14 @@ export const data = [ num_items: 3, content_ids: ['507f1f77bcf86cd799439011', '505bd76785ebb509fc183733'], contents: [ - { quantity: 1, item_price: '19' }, - { quantity: 2, item_price: '3' }, + { + quantity: 1, + item_price: '19', + }, + { + quantity: 2, + item_price: '3', + }, ], }, }, @@ -882,8 +1132,14 @@ export const data = [ num_items: 3, content_ids: ['507f1f77bcf86cd799439011', '505bd76785ebb509fc183733'], contents: [ - { quantity: 1, item_price: '19' }, - { quantity: 2, item_price: '3' }, + { + quantity: 1, + item_price: '19', + }, + { + quantity: 2, + item_price: '3', + }, ], }, }, @@ -896,12 +1152,30 @@ export const data = [ files: {}, }, metadata: [ - { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', jobId: 1, userId: 'u1' }, - { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', jobId: 2, userId: 'u1' }, - { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', jobId: 3, userId: 'u1' }, - { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', jobId: 4, userId: 'u1' }, - { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', jobId: 6, userId: 'u1' }, - { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', jobId: 7, userId: 'u1' }, + { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + jobId: 1, + }, + { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + jobId: 2, + }, + { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + jobId: 3, + }, + { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + jobId: 4, + }, + { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + jobId: 6, + }, + { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + jobId: 7, + }, ], batched: true, statusCode: 200, @@ -919,14 +1193,30 @@ export const data = [ deduplicationKey: 'messageId', enhancedMatch: true, customProperties: [ - { properties: 'presentclass' }, - { properties: 'presentgrade' }, + { + properties: 'presentclass', + }, + { + properties: 'presentgrade', + }, ], eventsMapping: [ - { from: 'ABC Searched', to: 'WatchVideo' }, - { from: 'ABC Searched', to: 'Signup' }, - { from: 'User Signup', to: 'Signup' }, - { from: 'User Created', to: 'Signup' }, + { + from: 'ABC Searched', + to: 'WatchVideo', + }, + { + from: 'ABC Searched', + to: 'Signup', + }, + { + from: 'User Signup', + to: 'Signup', + }, + { + from: 'User Created', + to: 'Signup', + }, ], }, Enabled: true, @@ -934,7 +1224,12 @@ export const data = [ }, }, { - metadata: [{ destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', jobId: 5, userId: 'u1' }], + metadata: [ + { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + jobId: 5, + }, + ], statTags: { destType: 'PINTEREST_TAG', feature: 'router', @@ -960,14 +1255,30 @@ export const data = [ deduplicationKey: 'messageId', enhancedMatch: true, customProperties: [ - { properties: 'presentclass' }, - { properties: 'presentgrade' }, + { + properties: 'presentclass', + }, + { + properties: 'presentgrade', + }, ], eventsMapping: [ - { from: 'ABC Searched', to: 'WatchVideo' }, - { from: 'ABC Searched', to: 'Signup' }, - { from: 'User Signup', to: 'Signup' }, - { from: 'User Created', to: 'Signup' }, + { + from: 'ABC Searched', + to: 'WatchVideo', + }, + { + from: 'ABC Searched', + to: 'Signup', + }, + { + from: 'User Signup', + to: 'Signup', + }, + { + from: 'User Created', + to: 'Signup', + }, ], }, Enabled: true, @@ -1006,10 +1317,20 @@ export const data = [ db: '19950715', lastname: 'Rudderlabs', firstName: 'Test', - address: { city: 'Kolkata', state: 'WB', zip: '700114', country: 'IN' }, + address: { + city: 'Kolkata', + state: 'WB', + zip: '700114', + country: 'IN', + }, + }, + device: { + advertisingId: 'abc123', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', }, - 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', @@ -1051,9 +1372,14 @@ export const data = [ checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', }, anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', - integrations: { All: true }, + integrations: { + All: true, + }, + }, + metadata: { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + jobId: 8, }, - metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', jobId: 8, userId: 'u1' }, destination: { DestinationDefinition: { Config: { cdkV2Enabled: true } }, ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', @@ -1070,14 +1396,30 @@ export const data = [ deduplicationKey: 'messageId', enhancedMatch: true, customProperties: [ - { properties: 'presentclass' }, - { properties: 'presentgrade' }, + { + properties: 'presentclass', + }, + { + properties: 'presentgrade', + }, ], eventsMapping: [ - { from: 'ABC Searched', to: 'WatchVideo' }, - { from: 'ABC Searched', to: 'Signup' }, - { from: 'User Signup', to: 'Signup' }, - { from: 'User Created', to: 'Signup' }, + { + from: 'ABC Searched', + to: 'WatchVideo', + }, + { + from: 'ABC Searched', + to: 'Signup', + }, + { + from: 'User Signup', + to: 'Signup', + }, + { + from: 'User Created', + to: 'Signup', + }, ], }, Enabled: true, @@ -1101,10 +1443,20 @@ export const data = [ db: '19950715', lastname: 'Rudderlabs', firstName: 'Test', - address: { city: 'Kolkata', state: 'WB', zip: '700114', country: 'IN' }, + address: { + city: 'Kolkata', + state: 'WB', + zip: '700114', + country: 'IN', + }, + }, + device: { + advertisingId: 'abc123', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', }, - 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', @@ -1145,9 +1497,14 @@ export const data = [ checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', }, anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', - integrations: { All: true }, + integrations: { + All: true, + }, + }, + metadata: { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + jobId: 9, }, - metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', jobId: 9, userId: 'u1' }, destination: { DestinationDefinition: { Config: { cdkV2Enabled: true } }, ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', @@ -1164,14 +1521,30 @@ export const data = [ deduplicationKey: 'messageId', enhancedMatch: true, customProperties: [ - { properties: 'presentclass' }, - { properties: 'presentgrade' }, + { + properties: 'presentclass', + }, + { + properties: 'presentgrade', + }, ], eventsMapping: [ - { from: 'ABC Searched', to: 'WatchVideo' }, - { from: 'ABC Searched', to: 'Signup' }, - { from: 'User Signup', to: 'Signup' }, - { from: 'User Created', to: 'Signup' }, + { + from: 'ABC Searched', + to: 'WatchVideo', + }, + { + from: 'ABC Searched', + to: 'Signup', + }, + { + from: 'User Signup', + to: 'Signup', + }, + { + from: 'User Created', + to: 'Signup', + }, ], }, Enabled: true, @@ -1195,10 +1568,20 @@ export const data = [ db: '19950715', lastname: 'Rudderlabs', firstName: 'Test', - address: { city: 'Kolkata', state: 'WB', zip: '700114', country: 'IN' }, + address: { + city: 'Kolkata', + state: 'WB', + zip: '700114', + country: 'IN', + }, + }, + device: { + advertisingId: 'abc123', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', }, - 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', @@ -1239,9 +1622,14 @@ export const data = [ checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', }, anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', - integrations: { All: true }, + integrations: { + All: true, + }, + }, + metadata: { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + jobId: 10, }, - metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', jobId: 10, userId: 'u1' }, destination: { DestinationDefinition: { Config: { cdkV2Enabled: true } }, ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', @@ -1259,14 +1647,30 @@ export const data = [ enhancedMatch: true, sendAsCustomEvent: true, customProperties: [ - { properties: 'presentclass' }, - { properties: 'presentgrade' }, + { + properties: 'presentclass', + }, + { + properties: 'presentgrade', + }, ], eventsMapping: [ - { from: 'ABC Searched', to: 'WatchVideo' }, - { from: 'ABC Searched', to: 'Signup' }, - { from: 'User Signup', to: 'Signup' }, - { from: 'User Created', to: 'Signup' }, + { + from: 'ABC Searched', + to: 'WatchVideo', + }, + { + from: 'ABC Searched', + to: 'Signup', + }, + { + from: 'User Signup', + to: 'Signup', + }, + { + from: 'User Created', + to: 'Signup', + }, ], }, Enabled: true, @@ -1328,8 +1732,14 @@ export const data = [ opt_out_type: 'LDP', content_ids: ['507f1f77bcf86cd799439011', '505bd76785ebb509fc183733'], contents: [ - { quantity: 1, item_price: '19' }, - { quantity: 2, item_price: '3' }, + { + quantity: 1, + item_price: '19', + }, + { + quantity: 2, + item_price: '3', + }, ], }, }, @@ -1363,8 +1773,14 @@ export const data = [ opt_out_type: 'LDP', content_ids: ['507f1f77bcf86cd799439011', '505bd76785ebb509fc183733'], contents: [ - { quantity: 1, item_price: '19' }, - { quantity: 2, item_price: '3' }, + { + quantity: 1, + item_price: '19', + }, + { + quantity: 2, + item_price: '3', + }, ], }, }, @@ -1397,8 +1813,14 @@ export const data = [ num_items: 3, content_ids: ['507f1f77bcf86cd799439011', '505bd76785ebb509fc183733'], contents: [ - { quantity: 1, item_price: '19' }, - { quantity: 2, item_price: '3' }, + { + quantity: 1, + item_price: '19', + }, + { + quantity: 2, + item_price: '3', + }, ], }, }, @@ -1431,8 +1853,14 @@ export const data = [ num_items: 3, content_ids: ['507f1f77bcf86cd799439011', '505bd76785ebb509fc183733'], contents: [ - { quantity: 1, item_price: '19' }, - { quantity: 2, item_price: '3' }, + { + quantity: 1, + item_price: '19', + }, + { + quantity: 2, + item_price: '3', + }, ], }, }, @@ -1445,9 +1873,18 @@ export const data = [ files: {}, }, metadata: [ - { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', jobId: 8, userId: 'u1' }, - { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', jobId: 9, userId: 'u1' }, - { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', jobId: 10, userId: 'u1' }, + { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + jobId: 8, + }, + { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + jobId: 9, + }, + { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + jobId: 10, + }, ], batched: true, statusCode: 200, @@ -1467,14 +1904,30 @@ export const data = [ deduplicationKey: 'messageId', enhancedMatch: true, customProperties: [ - { properties: 'presentclass' }, - { properties: 'presentgrade' }, + { + properties: 'presentclass', + }, + { + properties: 'presentgrade', + }, ], eventsMapping: [ - { from: 'ABC Searched', to: 'WatchVideo' }, - { from: 'ABC Searched', to: 'Signup' }, - { from: 'User Signup', to: 'Signup' }, - { from: 'User Created', to: 'Signup' }, + { + from: 'ABC Searched', + to: 'WatchVideo', + }, + { + from: 'ABC Searched', + to: 'Signup', + }, + { + from: 'User Signup', + to: 'Signup', + }, + { + from: 'User Created', + to: 'Signup', + }, ], }, Enabled: true, @@ -1513,10 +1966,20 @@ export const data = [ db: '19950715', lastname: 'Rudderlabs', firstName: 'Test', - address: { city: 'Kolkata', state: 'WB', zip: '700114', country: 'IN' }, + address: { + city: 'Kolkata', + state: 'WB', + zip: '700114', + country: 'IN', + }, + }, + device: { + advertisingId: 'abc123', + }, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.6', }, - 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', @@ -1557,9 +2020,14 @@ export const data = [ checkout_id: 'fksdjfsdjfisjf9sdfjsd9f', }, anonymousId: '50be5c78-6c3f-4b60-be84-97805a316fb1', - integrations: { All: true }, + integrations: { + All: true, + }, + }, + metadata: { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + jobId: 5, }, - metadata: { destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', jobId: 5, userId: 'u1' }, destination: { DestinationDefinition: { Config: { cdkV2Enabled: true } }, ID: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', @@ -1574,14 +2042,30 @@ export const data = [ deduplicationKey: 'messageId', enhancedMatch: true, customProperties: [ - { properties: 'presentclass' }, - { properties: 'presentgrade' }, + { + properties: 'presentclass', + }, + { + properties: 'presentgrade', + }, ], eventsMapping: [ - { from: 'ABC Searched', to: 'Watch Video' }, - { from: 'ABC Searched', to: 'Signup' }, - { from: 'User Signup', to: 'Signup' }, - { from: 'User Created', to: 'Signup' }, + { + from: 'ABC Searched', + to: 'Watch Video', + }, + { + from: 'ABC Searched', + to: 'Signup', + }, + { + from: 'User Signup', + to: 'Signup', + }, + { + from: 'User Created', + to: 'Signup', + }, ], }, Enabled: true, @@ -1600,7 +2084,12 @@ export const data = [ body: { output: [ { - metadata: [{ destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', jobId: 5, userId: 'u1' }], + metadata: [ + { + destintionId: '1pYpzzvcn7AQ2W9GGIAZSsN6Mfq', + jobId: 5, + }, + ], batched: false, statusCode: 400, error: 'message type identify is not supported', @@ -1626,14 +2115,30 @@ export const data = [ deduplicationKey: 'messageId', enhancedMatch: true, customProperties: [ - { properties: 'presentclass' }, - { properties: 'presentgrade' }, + { + properties: 'presentclass', + }, + { + properties: 'presentgrade', + }, ], eventsMapping: [ - { from: 'ABC Searched', to: 'Watch Video' }, - { from: 'ABC Searched', to: 'Signup' }, - { from: 'User Signup', to: 'Signup' }, - { from: 'User Created', to: 'Signup' }, + { + from: 'ABC Searched', + to: 'Watch Video', + }, + { + from: 'ABC Searched', + to: 'Signup', + }, + { + from: 'User Signup', + to: 'Signup', + }, + { + from: 'User Created', + to: 'Signup', + }, ], }, Enabled: true, diff --git a/test/integrations/destinations/pipedream/router/data.ts b/test/integrations/destinations/pipedream/router/data.ts index 3e05ad9551..fa71e6a592 100644 --- a/test/integrations/destinations/pipedream/router/data.ts +++ b/test/integrations/destinations/pipedream/router/data.ts @@ -19,15 +19,25 @@ export const data = [ model: 'Redmi 6', name: 'xiaomi', }, - network: { carrier: 'Banglalink' }, - os: { name: 'android', version: '8.1.0' }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, traits: { - address: { city: 'Dhaka', country: 'Bangladesh' }, + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', }, }, event: 'spin_result', - integrations: { All: true }, + integrations: { + All: true, + }, message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', properties: { additional_bet_index: 0, @@ -90,13 +100,21 @@ export const data = [ versionSessionCount: 2, }, }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, destination: { Config: { pipedreamUrl: 'http://6b0e6a60.ngrok.io', headers: [ - { from: '', to: '' }, - { from: 'test2', to: 'value2' }, + { + from: '', + to: '', + }, + { + from: 'test2', + to: 'value2', + }, ], }, }, @@ -139,7 +157,9 @@ export const data = [ versionSessionCount: 2, game_name: 'FireEagleSlots', }, - integrations: { All: true }, + integrations: { + All: true, + }, event: 'spin_result', message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', @@ -152,10 +172,18 @@ export const data = [ }, traits: { anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - address: { city: 'Dhaka', country: 'Bangladesh' }, + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, + }, + os: { + version: '8.1.0', + name: 'android', + }, + network: { + carrier: 'Banglalink', }, - os: { version: '8.1.0', name: 'android' }, - network: { carrier: 'Banglalink' }, }, type: 'track', properties: { @@ -202,21 +230,34 @@ export const data = [ files: {}, endpoint: 'http://6b0e6a60.ngrok.io', userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - headers: { 'content-type': 'application/json', test2: 'value2' }, + headers: { + 'content-type': 'application/json', + test2: 'value2', + }, version: '1', params: {}, type: 'REST', method: 'POST', }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { Config: { pipedreamUrl: 'http://6b0e6a60.ngrok.io', headers: [ - { from: '', to: '' }, - { from: 'test2', to: 'value2' }, + { + from: '', + to: '', + }, + { + from: 'test2', + to: 'value2', + }, ], }, }, @@ -246,15 +287,25 @@ export const data = [ model: 'Redmi 6', name: 'xiaomi', }, - network: { carrier: 'Banglalink' }, - os: { name: 'android', version: '8.1.0' }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, traits: { - address: { city: 'Dhaka', country: 'Bangladesh' }, + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', }, }, event: 'spin_result', - integrations: { All: true }, + integrations: { + All: true, + }, message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', properties: { additional_bet_index: 0, @@ -317,8 +368,14 @@ export const data = [ versionSessionCount: 2, }, }, - metadata: { jobId: 2, userId: 'u1' }, - destination: { Config: { pipedreamUrl: 'https://6b0e6a60.ngrok.io/n' } }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + pipedreamUrl: 'https://6b0e6a60.ngrok.io/n', + }, + }, }, ], destType: 'pipedream', @@ -358,7 +415,9 @@ export const data = [ versionSessionCount: 2, game_name: 'FireEagleSlots', }, - integrations: { All: true }, + integrations: { + All: true, + }, event: 'spin_result', message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', @@ -371,10 +430,18 @@ export const data = [ }, traits: { anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - address: { city: 'Dhaka', country: 'Bangladesh' }, + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, + }, + os: { + version: '8.1.0', + name: 'android', + }, + network: { + carrier: 'Banglalink', }, - os: { version: '8.1.0', name: 'android' }, - network: { carrier: 'Banglalink' }, }, type: 'track', properties: { @@ -421,16 +488,26 @@ export const data = [ files: {}, endpoint: 'https://6b0e6a60.ngrok.io/n', userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - headers: { 'content-type': 'application/json' }, + headers: { + 'content-type': 'application/json', + }, version: '1', params: {}, type: 'REST', method: 'POST', }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, - destination: { Config: { pipedreamUrl: 'https://6b0e6a60.ngrok.io/n' } }, + destination: { + Config: { + pipedreamUrl: 'https://6b0e6a60.ngrok.io/n', + }, + }, }, ], }, diff --git a/test/integrations/destinations/posthog/router/data.ts b/test/integrations/destinations/posthog/router/data.ts index dab8ba8b1c..f69b4bfbdd 100644 --- a/test/integrations/destinations/posthog/router/data.ts +++ b/test/integrations/destinations/posthog/router/data.ts @@ -16,7 +16,9 @@ export const data = [ yourInstance: 'https://app.posthog.com/', }, }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, message: { event: 'event-alias', context: { @@ -27,8 +29,13 @@ export const data = [ model: 'Redmi 6', name: 'xiaomi', }, - network: { carrier: 'Banglalink' }, - os: { name: 'android', version: '8.1.0' }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, app: { build: '1.0.0', name: 'RudderLabs JavaScript SDK', @@ -36,7 +43,10 @@ export const data = [ version: '1.1.7', }, traits: { - address: { city: 'Dhaka', country: 'Bangladesh' }, + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', }, }, @@ -64,13 +74,18 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://app.posthog.com/batch', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, params: {}, body: { JSON: { properties: { $set: { - address: { city: 'Dhaka', country: 'Bangladesh' }, + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', }, $os: 'android', @@ -102,7 +117,11 @@ export const data = [ }, files: {}, }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { @@ -129,9 +148,13 @@ export const data = [ input: [ { destination: { - Config: { teamApiKey: 'K_HlByO3IE73-Tz4ch1LNDs0JGdwbknNGolFc4HdoAE' }, + Config: { + teamApiKey: 'K_HlByO3IE73-Tz4ch1LNDs0JGdwbknNGolFc4HdoAE', + }, + }, + metadata: { + jobId: 2, }, - metadata: { jobId: 2, userId: 'u1' }, message: { anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', event: 'Product Brought', @@ -143,10 +166,18 @@ export const data = [ model: 'Redmi 6', name: 'xiaomi', }, - network: { carrier: 'Banglalink' }, - os: { name: 'android', version: '8.1.0' }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, traits: { - address: { city: 'Dhaka', country: 'Bangladesh' }, + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', }, }, @@ -210,7 +241,9 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://app.posthog.com/batch', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, params: {}, body: { JSON: { @@ -219,7 +252,10 @@ export const data = [ messageId: 'e4408cb8-16dd-41e9-a313-a7a9cdc4bac5', properties: { $set: { - address: { city: 'Dhaka', country: 'Bangladesh' }, + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', }, $os: 'android', @@ -280,11 +316,17 @@ export const data = [ }, files: {}, }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { - Config: { teamApiKey: 'K_HlByO3IE73-Tz4ch1LNDs0JGdwbknNGolFc4HdoAE' }, + Config: { + teamApiKey: 'K_HlByO3IE73-Tz4ch1LNDs0JGdwbknNGolFc4HdoAE', + }, }, }, ], diff --git a/test/integrations/destinations/profitwell/router/data.ts b/test/integrations/destinations/profitwell/router/data.ts index b308155dae..11f08c2139 100644 --- a/test/integrations/destinations/profitwell/router/data.ts +++ b/test/integrations/destinations/profitwell/router/data.ts @@ -10,8 +10,14 @@ export const data = [ body: { input: [ { - destination: { Config: { privateApiKey: '9270161a8e5abaa0e56efddfd9dbcb62' } }, - metadata: { jobId: 2, userId: 'u1' }, + destination: { + Config: { + privateApiKey: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + }, + metadata: { + jobId: 2, + }, message: { channel: 'web', context: { @@ -86,10 +92,18 @@ export const data = [ version: '1', endpoint: 'https://api.profitwell.com/v2/subscriptions/', }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, - destination: { Config: { privateApiKey: '9270161a8e5abaa0e56efddfd9dbcb62' } }, + destination: { + Config: { + privateApiKey: '9270161a8e5abaa0e56efddfd9dbcb62', + }, + }, }, ], }, diff --git a/test/integrations/destinations/reddit/router/data.ts b/test/integrations/destinations/reddit/router/data.ts index 0097b29067..317bb41a14 100644 --- a/test/integrations/destinations/reddit/router/data.ts +++ b/test/integrations/destinations/reddit/router/data.ts @@ -12,7 +12,9 @@ export const data = [ { message: { context: { - traits: { email: 'testone@gmail.com' }, + 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', @@ -55,29 +57,38 @@ export const data = [ }, ], }, - integrations: { All: true }, + integrations: { + All: true, + }, sentAt: '2019-10-14T09:03:22.563Z', }, destination: { Config: { accountId: 'a2_fsddXXXfsfd', hashData: true, - eventsMapping: [{ from: 'Order Completed', to: 'Purchase' }], + eventsMapping: [ + { + from: 'Order Completed', + to: 'Purchase', + }, + ], }, DestinationDefinition: { Config: { cdkV2Enabled: true } }, }, metadata: { destinationId: 'destId', workspaceId: 'wspId', - secret: { accessToken: 'dummyAccessToken' }, - jobId: 1, - userId: 'u1', + secret: { + accessToken: 'dummyAccessToken', + }, }, }, { message: { context: { - traits: { email: 'testone@gmail.com' }, + 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', @@ -111,29 +122,38 @@ export const data = [ }, ], }, - integrations: { All: true }, + integrations: { + All: true, + }, sentAt: '2019-10-14T09:03:22.563Z', }, destination: { Config: { accountId: 'a2_fsddXXXfsfd', hashData: true, - eventsMapping: [{ from: 'Order Completed', to: 'Purchase' }], + eventsMapping: [ + { + from: 'Order Completed', + to: 'Purchase', + }, + ], }, DestinationDefinition: { Config: { cdkV2Enabled: true } }, }, metadata: { destinationId: 'destId', workspaceId: 'wspId', - secret: { accessToken: 'dummyAccessToken' }, - jobId: 2, - userId: 'u1', + secret: { + accessToken: 'dummyAccessToken', + }, }, }, { message: { context: { - traits: { email: 'testone@gmail.com' }, + 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', @@ -157,23 +177,30 @@ export const data = [ url: 'https://www.website.com/product/path', image_url: 'https://www.website.com/product/path.webp', }, - integrations: { All: true }, + integrations: { + All: true, + }, sentAt: '2019-10-14T09:03:22.563Z', }, destination: { Config: { accountId: 'a2_fsddXXXfsfd', hashData: true, - eventsMapping: [{ from: 'Order Completed', to: 'Purchase' }], + eventsMapping: [ + { + from: 'Order Completed', + to: 'Purchase', + }, + ], }, DestinationDefinition: { Config: { cdkV2Enabled: true } }, }, metadata: { destinationId: 'destId', workspaceId: 'wspId', - secret: { accessToken: 'dummyAccessToken' }, - jobId: 3, - userId: 'u1', + secret: { + accessToken: 'dummyAccessToken', + }, }, }, ], @@ -193,7 +220,9 @@ export const data = [ events: [ { event_at: '2019-10-14T09:03:17.562Z', - event_type: { tracking_type: 'Purchase' }, + event_type: { + tracking_type: 'Purchase', + }, user: { email: 'ac144532d9e4efeab19475d9253a879173ea12a3d2238d1cb8a332a7b3a105f2', external_id: @@ -207,14 +236,24 @@ export const data = [ event_metadata: { item_count: 3, products: [ - { id: '123', name: 'Monopoly', category: 'Games' }, - { id: '345', name: 'UNO', category: 'Games' }, + { + 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' }, + event_type: { + tracking_type: 'ViewContent', + }, user: { email: 'ac144532d9e4efeab19475d9253a879173ea12a3d2238d1cb8a332a7b3a105f2', external_id: @@ -243,7 +282,9 @@ export const data = [ }, { event_at: '2019-10-14T09:03:17.562Z', - event_type: { tracking_type: 'AddToCart' }, + event_type: { + tracking_type: 'AddToCart', + }, user: { email: 'ac144532d9e4efeab19475d9253a879173ea12a3d2238d1cb8a332a7b3a105f2', external_id: @@ -286,23 +327,23 @@ export const data = [ { destinationId: 'destId', workspaceId: 'wspId', - secret: { accessToken: 'dummyAccessToken' }, - jobId: 1, - userId: 'u1', + secret: { + accessToken: 'dummyAccessToken', + }, }, { destinationId: 'destId', workspaceId: 'wspId', - secret: { accessToken: 'dummyAccessToken' }, - jobId: 2, - userId: 'u1', + secret: { + accessToken: 'dummyAccessToken', + }, }, { destinationId: 'destId', workspaceId: 'wspId', - secret: { accessToken: 'dummyAccessToken' }, - jobId: 3, - userId: 'u1', + secret: { + accessToken: 'dummyAccessToken', + }, }, ], batched: true, @@ -311,9 +352,18 @@ export const data = [ Config: { accountId: 'a2_fsddXXXfsfd', hashData: true, - eventsMapping: [{ from: 'Order Completed', to: 'Purchase' }], + eventsMapping: [ + { + from: 'Order Completed', + to: 'Purchase', + }, + ], + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, }, - DestinationDefinition: { Config: { cdkV2Enabled: true } }, }, }, ], @@ -334,7 +384,9 @@ export const data = [ { message: { context: { - traits: { email: 'testone@gmail.com' }, + 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', @@ -367,22 +419,29 @@ export const data = [ }, ], }, - integrations: { All: true }, + integrations: { + All: true, + }, sentAt: '2019-10-14T09:03:22.563Z', }, destination: { Config: { accountId: 'a2_fsddXXXfsfd', - eventsMapping: [{ from: 'Order Completed', to: 'Purchase' }], + eventsMapping: [ + { + from: 'Order Completed', + to: 'Purchase', + }, + ], }, DestinationDefinition: { Config: { cdkV2Enabled: true } }, }, metadata: { destinationId: 'destId', workspaceId: 'wspId', - secret: { accessToken: 'dummyAccessToken' }, - jobId: 4, - userId: 'u1', + secret: { + accessToken: 'dummyAccessToken', + }, }, }, ], @@ -400,17 +459,26 @@ export const data = [ { destinationId: 'destId', workspaceId: 'wspId', - secret: { accessToken: 'dummyAccessToken' }, - jobId: 4, - userId: 'u1', + secret: { + accessToken: 'dummyAccessToken', + }, }, ], destination: { Config: { accountId: 'a2_fsddXXXfsfd', - eventsMapping: [{ from: 'Order Completed', to: 'Purchase' }], + eventsMapping: [ + { + from: 'Order Completed', + to: 'Purchase', + }, + ], + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, }, - DestinationDefinition: { Config: { cdkV2Enabled: true } }, }, batched: false, statusCode: 400, diff --git a/test/integrations/destinations/refiner/router/data.ts b/test/integrations/destinations/refiner/router/data.ts index 0ff75120d6..bea4d3ddcc 100644 --- a/test/integrations/destinations/refiner/router/data.ts +++ b/test/integrations/destinations/refiner/router/data.ts @@ -21,7 +21,10 @@ export const data = [ city: 'Banglore', email: 'test@user.com', phone: '7267286346802347827', - address: { city: 'ahmedabad', state: 'india' }, + address: { + city: 'ahmedabad', + state: 'india', + }, lastName: 'user', username: 'testUser', firstName: 'test', @@ -35,7 +38,9 @@ export const data = [ request_ip: '[::1]', originalTimestamp: '2022-10-11T13:10:54.877+05:30', }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, destination: { Config: { apiKey: 'dummyApiKey', @@ -70,7 +75,10 @@ export const data = [ firstName: 'test', lastName: 'user', phone: '7267286346802347827', - userAddress: { city: 'ahmedabad', state: 'india' }, + userAddress: { + city: 'ahmedabad', + state: 'india', + }, userCountry: 'india', userId: 'user@45', username: 'testUser', @@ -101,7 +109,7 @@ export const data = [ whitelistedEvents: [{ eventName: '' }], }, }, - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [{ jobId: 1 }], statusCode: 200, }, ], @@ -153,7 +161,10 @@ export const data = [ firstName: 'test', userCountry: 'india', }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.1.2' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.2', + }, userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36', }, @@ -165,16 +176,30 @@ export const data = [ currency: 'IND', order_id: '5241735', products: [ - { id: 'product-bacon-jam', category: 'Merch', brand: '' }, - { id: 'product-t-shirt', category: 'Merch', brand: 'Levis' }, - { id: 'offer-t-shirt', category: 'Merch', brand: 'Levis' }, + { + id: 'product-bacon-jam', + category: 'Merch', + brand: '', + }, + { + id: 'product-t-shirt', + category: 'Merch', + brand: 'Levis', + }, + { + id: 'offer-t-shirt', + category: 'Merch', + brand: 'Levis', + }, ], }, receivedAt: '2022-10-11T13:38:29.178+05:30', request_ip: '[::1]', originalTimestamp: '2022-10-11T13:38:31.827+05:30', }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, destination: { Config: { apiKey: 'dummyApiKey', @@ -202,7 +227,11 @@ export const data = [ batched: false, batchedRequest: { body: { - FORM: { email: 'test@user.com', event: 'Product Searched', id: 'user@45' }, + FORM: { + email: 'test@user.com', + event: 'Product Searched', + id: 'user@45', + }, JSON: {}, JSON_ARRAY: {}, XML: {}, @@ -229,7 +258,7 @@ export const data = [ whitelistedEvents: [{ eventName: '' }], }, }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [{ jobId: 2 }], statusCode: 200, }, ], @@ -251,7 +280,10 @@ export const data = [ message: { type: 'group', sentAt: '2015-02-23T22:28:55.111Z', - traits: { name: 'rudder ventures', email: 'business@rudderstack.com' }, + traits: { + name: 'rudder ventures', + email: 'business@rudderstack.com', + }, userId: 'test@12', channel: 'browser', context: { @@ -265,7 +297,9 @@ export const data = [ integrations: { All: true }, originalTimestamp: '2022-10-11T13:51:00.906+05:30', }, - metadata: { jobId: 3, userId: 'u1' }, + metadata: { + jobId: 3, + }, destination: { Config: { accountAttributesMapping: [{ from: 'email', to: 'businessEmail' }], @@ -327,7 +361,7 @@ export const data = [ whitelistedEvents: [{ eventName: '' }], }, }, - metadata: [{ jobId: 3, userId: 'u1' }], + metadata: [{ jobId: 3 }], statusCode: 200, }, ], diff --git a/test/integrations/destinations/revenue_cat/processor/data.ts b/test/integrations/destinations/revenue_cat/processor/data.ts index 84b7c5975f..45ff5d8499 100644 --- a/test/integrations/destinations/revenue_cat/processor/data.ts +++ b/test/integrations/destinations/revenue_cat/processor/data.ts @@ -1,1083 +1,1079 @@ export const data = [ - { - name: 'revenue_cat', - description: 'Test 0', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - apiKey: 'as9d920a5e75a18acb4a29abd9ec1e2e', - xPlatform: 'stripe', - }, - }, - message: { - userId: 'rudder1235678', - channel: 'web', - context: { - ip: '14.5.67.21', - app: { - build: '1', - name: 'RudderAndroidClient', - namespace: 'com.rudderstack.demo.android', - version: '1.0', - }, - device: { - manufacturer: 'Google', - model: 'Android SDK built for x86', - name: 'generic_x86', - type: 'android', - }, - library: { - name: 'com.rudderstack.android.sdk.core', - version: '0.1.4', - }, - locale: 'en-US', - network: { - carrier: 'Android', - bluetooth: false, - cellular: true, - wifi: true, - }, - campaign: { - source: 'google', - medium: 'medium', - term: 'keyword', - content: 'some content', - }, - os: { - name: 'Android', - version: '9', - }, - screen: { - density: 420, - height: 1794, - width: 1080, - }, - timezone: 'Asia/Mumbai', - userAgent: - 'Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)', - }, - type: 'identify', - traits: { - email: 'chandan@companyname.com', - phone: '92374162212', - lastname: 'Doe', - density: '420', - height: '1794', - width: '1080', - iterableCampaignId: '1234', - iterableTemplateId: '1234', - }, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'GET', - endpoint: 'https://api.revenuecat.com/v1/subscribers/rudder1235678', - headers: { - Authorization: 'Basic as9d920a5e75a18acb4a29abd9ec1e2e', - 'Content-Type': 'application/json', - }, - params: {}, - body: { - JSON: {}, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://api.revenuecat.com/v1/subscribers/rudder1235678/attributes', - headers: { - Authorization: 'Basic as9d920a5e75a18acb4a29abd9ec1e2e', - 'Content-Type': 'application/json', - }, - params: {}, - body: { - JSON: { - attributes: { - app_user_id: { - value: 'rudder1235678', - }, - $email: { - value: 'chandan@companyname.com', - }, - $phoneNumber: { - value: '92374162212', - }, - $ip: { - value: '14.5.67.21', - }, - $iterableCampaignId: { - value: '1234', - }, - $iterableTemplateId: { - value: '1234', - }, - $displayName: { - value: 'Doe', - }, - lastname: { - value: 'Doe', - }, - density: { - value: '420', - }, - height: { - value: '1794', - }, - width: { - value: '1080', - }, - }, - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'revenue_cat', - description: 'Test 1', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - apiKey: 'a5e75dfda29abd920ec1ec8a18acb42e', - xPlatform: 'stripe', - }, - }, - message: { - userId: 'rudder1235678', - channel: 'web', - context: { - ip: '14.5.67.21', - app: { - build: '1', - name: 'RudderAndroidClient', - namespace: 'com.rudderstack.demo.android', - version: '1.0', - }, - device: { - manufacturer: 'Google', - model: 'Android SDK built for x86', - name: 'generic_x86', - type: 'android', - }, - library: { - name: 'com.rudderstack.android.sdk.core', - version: '0.1.4', - }, - locale: 'en-US', - network: { - carrier: 'Android', - bluetooth: false, - cellular: true, - wifi: true, - }, - campaign: { - source: 'google', - medium: 'medium', - term: 'keyword', - content: 'some content', - }, - os: { - name: 'Android', - version: '9', - }, - screen: { - density: 420, - height: 1794, - width: 1080, - }, - timezone: 'Asia/Mumbai', - userAgent: - 'Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)', - }, - type: 'identify', - traits: { - email: 'chandan@companyname.com', - phone: '92374162212', - firstname: 'James', - density: 420, - height: 1794, - width: 1080, - iterableCampaignId: '1234', - iterableTemplateId: '1234', - }, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'GET', - endpoint: 'https://api.revenuecat.com/v1/subscribers/rudder1235678', - headers: { - Authorization: 'Basic a5e75dfda29abd920ec1ec8a18acb42e', - 'Content-Type': 'application/json', - }, - params: {}, - body: { - JSON: {}, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://api.revenuecat.com/v1/subscribers/rudder1235678/attributes', - headers: { - Authorization: 'Basic a5e75dfda29abd920ec1ec8a18acb42e', - 'Content-Type': 'application/json', - }, - params: {}, - body: { - JSON: { - attributes: { - app_user_id: { - value: 'rudder1235678', - }, - $email: { - value: 'chandan@companyname.com', - }, - $phoneNumber: { - value: '92374162212', - }, - $ip: { - value: '14.5.67.21', - }, - $iterableCampaignId: { - value: '1234', - }, - $iterableTemplateId: { - value: '1234', - }, - $displayName: { - value: 'James', - }, - firstname: { - value: 'James', - }, - density: { - value: '420', - }, - height: { - value: '1794', - }, - width: { - value: '1080', - }, - }, - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'revenue_cat', - description: 'Test 2', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - xPlatform: 'stripe', - }, - }, - message: { - userId: 'rudder1235678', - channel: 'web', - context: { - ip: '14.5.67.21', - app: { - build: '1', - name: 'RudderAndroidClient', - namespace: 'com.rudderstack.demo.android', - version: '1.0', - }, - device: { - manufacturer: 'Google', - model: 'Android SDK built for x86', - name: 'generic_x86', - type: 'android', - }, - library: { - name: 'com.rudderstack.android.sdk.core', - version: '0.1.4', - }, - locale: 'en-US', - network: { - carrier: 'Android', - bluetooth: false, - cellular: true, - wifi: true, - }, - campaign: { - source: 'google', - medium: 'medium', - term: 'keyword', - content: 'some content', - }, - os: { - name: 'Android', - version: '9', - }, - screen: { - density: 420, - height: 1794, - width: 1080, - }, - timezone: 'Asia/Mumbai', - userAgent: - 'Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)', - }, - type: 'identify', - traits: { - email: 'chandan@companyname.com', - phone: '92374162212', - name: 'John Doe', - }, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - statusCode: 400, - error: 'Public API Key required for Authentication', - statTags: { - errorCategory: 'dataValidation', - errorType: 'configuration', - destType: 'REVENUE_CAT', - module: 'destination', - implementation: 'native', - feature: 'processor', - }, - }, - ], - }, - }, - }, - { - name: 'revenue_cat', - description: 'Test 3', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - apiKey: 'a5e75d99c8a18acb4a29abd920ec1e2e', - }, - }, - message: { - userId: 'rudder1235678', - channel: 'web', - context: { - ip: '14.5.67.21', - app: { - build: '1', - name: 'RudderAndroidClient', - namespace: 'com.rudderstack.demo.android', - version: '1.0', - }, - device: { - manufacturer: 'Google', - model: 'Android SDK built for x86', - name: 'generic_x86', - type: 'android', - }, - library: { - name: 'com.rudderstack.android.sdk.core', - version: '0.1.4', - }, - locale: 'en-US', - network: { - carrier: 'Android', - bluetooth: false, - cellular: true, - wifi: true, - }, - campaign: { - source: 'google', - medium: 'medium', - term: 'keyword', - content: 'some content', - }, - os: { - name: 'Android', - version: '9', - }, - screen: { - density: 420, - height: 1794, - width: 1080, - }, - timezone: 'Asia/Mumbai', - userAgent: - 'Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)', - }, - type: 'identify', - traits: { - email: 'chandan@companyname.com', - phone: '92374162212', - name: 'John Doe', - }, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'GET', - endpoint: 'https://api.revenuecat.com/v1/subscribers/rudder1235678', - headers: { - Authorization: 'Basic a5e75d99c8a18acb4a29abd920ec1e2e', - 'Content-Type': 'application/json', - }, - params: {}, - body: { - JSON: {}, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://api.revenuecat.com/v1/subscribers/rudder1235678/attributes', - headers: { - Authorization: 'Basic a5e75d99c8a18acb4a29abd920ec1e2e', - 'Content-Type': 'application/json', - }, - params: {}, - body: { - JSON: { - attributes: { - app_user_id: { - value: 'rudder1235678', - }, - $displayName: { - value: 'John Doe', - }, - $email: { - value: 'chandan@companyname.com', - }, - $phoneNumber: { - value: '92374162212', - }, - $ip: { - value: '14.5.67.21', - }, - }, - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'revenue_cat', - description: 'Test 4', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - apiKey: 'dummyApiKey', - }, - }, - message: { - type: 'track', - userId: 'rudder123', - properties: { - checkout_id: '12345', - order_id: '1234', - affiliation: 'Apple Store', - total: 20, - revenue: 15, - shipping: 22, - tax: 1, - discount: 1.5, - coupon: 'ImagePro', - currency: 'USD', - fetch_token: 'dummyFetchToken', - product_id: '123', - products: [ - { - sku: 'G-32', - name: 'Monopoly', - price: 14, - quantity: 1, - introductory_price: '350', - is_restore: true, - presented_offering_identifier: '123erd', - }, - { - product_id: '345', - sku: 'F-32', - name: 'UNO', - price: 3.45, - quantity: 2, - category: 'Games', - introductory_price: '250', - is_restore: false, - presented_offering_identifier: '123erd', - }, - ], - }, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - statusCode: 400, - error: 'X-Platform is required field', - statTags: { - errorCategory: 'dataValidation', - errorType: 'configuration', - destType: 'REVENUE_CAT', - module: 'destination', - implementation: 'native', - feature: 'processor', - }, - }, - ], - }, - }, - }, - { - name: 'revenue_cat', - description: 'Test 5', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - apiKey: 'dummyApiKey', - xPlatform: 'stripe', - }, - }, - message: { - type: 'track', - userId: 'rudder123', - properties: { - checkout_id: '12345', - order_id: '1234', - affiliation: 'Apple Store', - total: 20, - revenue: 15, - shipping: 22, - tax: 1, - discount: 1.5, - coupon: 'ImagePro', - currency: 'USD', - fetch_token: 'dummyFetchToken', - product_id: '123', - products: [ - { - sku: 'G-32', - name: 'Monopoly', - price: 14, - quantity: 1, - introductory_price: '350', - is_restore: true, - presented_offering_identifier: '123erd', - }, - { - product_id: '345', - sku: 'F-32', - name: 'UNO', - price: 3.45, - quantity: 2, - category: 'Games', - introductory_price: '250', - is_restore: false, - presented_offering_identifier: '123erd', - }, - ], - }, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://api.revenuecat.com/v1/receipts', - headers: { - Authorization: 'Basic dummyApiKey', - 'Content-Type': 'application/json', - 'X-Platform': 'stripe', - }, - params: {}, - body: { - JSON: { - app_user_id: 'rudder123', - fetch_token: 'dummyFetchToken', - product_id: '123', - currency: 'USD', - price: 14, - introductory_price: '350', - is_restore: true, - presented_offering_identifier: '123erd', - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://api.revenuecat.com/v1/receipts', - headers: { - Authorization: 'Basic dummyApiKey', - 'Content-Type': 'application/json', - 'X-Platform': 'stripe', - }, - params: {}, - body: { - JSON: { - app_user_id: 'rudder123', - fetch_token: 'dummyFetchToken', - product_id: '345', - currency: 'USD', - price: 3.45, - introductory_price: '250', - is_restore: false, - presented_offering_identifier: '123erd', - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'revenue_cat', - description: 'Test 6', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - apiKey: 'dummyApiKey', - xPlatform: 'stripe', - }, - }, - message: { - type: 'track', - userId: 'rudder123', - properties: { - checkout_id: '12345', - order_id: '1234', - affiliation: 'Apple Store', - total: 20, - revenue: 15, - shipping: 22, - tax: 1, - discount: 1.5, - coupon: 'ImagePro', - currency: 'USD', - fetch_token: 'dummyFetchToken', - product_id: '123-sa', - products: [ - { - sku: 'G-32', - name: 'Monopoly', - price: 14, - quantity: 1, - introductory_price: '350', - is_restore: true, - presented_offering_identifier: '123erd', - }, - { - product_id: '345', - sku: 'F-32', - name: 'UNO', - price: 3.45, - quantity: 2, - category: 'Games', - introductory_price: '250', - is_restore: false, - presented_offering_identifier: '123erd', - }, - { - sku: 'G-33', - name: 'SunGlass', - price: 14, - quantity: 1, - introductory_price: '350', - is_restore: true, - presented_offering_identifier: '123erd', - }, - { - sku: 'G-35', - product_id: '1234sb', - name: 'Real-me', - price: 14, - quantity: 1, - introductory_price: '350', - is_restore: true, - presented_offering_identifier: '123erd', - }, - ], - }, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://api.revenuecat.com/v1/receipts', - headers: { - Authorization: 'Basic dummyApiKey', - 'Content-Type': 'application/json', - 'X-Platform': 'stripe', - }, - params: {}, - body: { - JSON: { - app_user_id: 'rudder123', - fetch_token: 'dummyFetchToken', - product_id: '123-sa', - currency: 'USD', - price: 14, - introductory_price: '350', - is_restore: true, - presented_offering_identifier: '123erd', - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://api.revenuecat.com/v1/receipts', - headers: { - Authorization: 'Basic dummyApiKey', - 'Content-Type': 'application/json', - 'X-Platform': 'stripe', - }, - params: {}, - body: { - JSON: { - app_user_id: 'rudder123', - fetch_token: 'dummyFetchToken', - product_id: '345', - currency: 'USD', - price: 3.45, - introductory_price: '250', - is_restore: false, - presented_offering_identifier: '123erd', - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://api.revenuecat.com/v1/receipts', - headers: { - Authorization: 'Basic dummyApiKey', - 'Content-Type': 'application/json', - 'X-Platform': 'stripe', - }, - params: {}, - body: { - JSON: { - app_user_id: 'rudder123', - fetch_token: 'dummyFetchToken', - product_id: '123-sa', - currency: 'USD', - price: 14, - introductory_price: '350', - is_restore: true, - presented_offering_identifier: '123erd', - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://api.revenuecat.com/v1/receipts', - headers: { - Authorization: 'Basic dummyApiKey', - 'Content-Type': 'application/json', - 'X-Platform': 'stripe', - }, - params: {}, - body: { - JSON: { - app_user_id: 'rudder123', - fetch_token: 'dummyFetchToken', - product_id: '1234sb', - currency: 'USD', - price: 14, - introductory_price: '350', - is_restore: true, - presented_offering_identifier: '123erd', - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'revenue_cat', - description: 'Test 7', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - apiKey: 'dummyApiKey', - xPlatform: 'stripe', - }, - }, - message: { - type: 'track', - userId: 'rudder123', - properties: { - checkout_id: '12345', - order_id: '1234', - affiliation: 'Apple Store', - total: 20, - revenue: 15, - shipping: 22, - tax: 1, - discount: 1.5, - coupon: 'ImagePro', - currency: 'USD', - fetch_token: 'dummyFetchToken', - product_id: '123-sa', - sku: 'G-32', - name: 'Monopoly', - price: 14, - quantity: 1, - introductory_price: '350', - is_restore: true, - presented_offering_identifier: '123erd', - }, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://api.revenuecat.com/v1/receipts', - headers: { - Authorization: 'Basic dummyApiKey', - 'Content-Type': 'application/json', - 'X-Platform': 'stripe', - }, - params: {}, - body: { - JSON: { - app_user_id: 'rudder123', - fetch_token: 'dummyFetchToken', - product_id: '123-sa', - price: 14, - currency: 'USD', - introductory_price: '350', - is_restore: true, - presented_offering_identifier: '123erd', - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, -]; + { + "name": "revenue_cat", + "description": "Test 0", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "as9d920a5e75a18acb4a29abd9ec1e2e", + "xPlatform": "stripe" + } + }, + "message": { + "userId": "rudder1235678", + "channel": "web", + "context": { + "ip": "14.5.67.21", + "app": { + "build": "1", + "name": "RudderAndroidClient", + "namespace": "com.rudderstack.demo.android", + "version": "1.0" + }, + "device": { + "manufacturer": "Google", + "model": "Android SDK built for x86", + "name": "generic_x86", + "type": "android" + }, + "library": { + "name": "com.rudderstack.android.sdk.core", + "version": "0.1.4" + }, + "locale": "en-US", + "network": { + "carrier": "Android", + "bluetooth": false, + "cellular": true, + "wifi": true + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content" + }, + "os": { + "name": "Android", + "version": "9" + }, + "screen": { + "density": 420, + "height": 1794, + "width": 1080 + }, + "timezone": "Asia/Mumbai", + "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)" + }, + "type": "identify", + "traits": { + "email": "chandan@companyname.com", + "phone": "92374162212", + "lastname": "Doe", + "density": "420", + "height": "1794", + "width": "1080", + "iterableCampaignId": "1234", + "iterableTemplateId": "1234" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "GET", + "endpoint": "https://api.revenuecat.com/v1/subscribers/rudder1235678", + "headers": { + "Authorization": "Basic as9d920a5e75a18acb4a29abd9ec1e2e", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + }, + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.revenuecat.com/v1/subscribers/rudder1235678/attributes", + "headers": { + "Authorization": "Basic as9d920a5e75a18acb4a29abd9ec1e2e", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "attributes": { + "app_user_id": { + "value": "rudder1235678" + }, + "$email": { + "value": "chandan@companyname.com" + }, + "$phoneNumber": { + "value": "92374162212" + }, + "$ip": { + "value": "14.5.67.21" + }, + "$iterableCampaignId": { + "value": "1234" + }, + "$iterableTemplateId": { + "value": "1234" + }, + "$displayName": { + "value": "Doe" + }, + "lastname": { + "value": "Doe" + }, + "density": { + "value": "420" + }, + "height": { + "value": "1794" + }, + "width": { + "value": "1080" + } + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "revenue_cat", + "description": "Test 1", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "a5e75dfda29abd920ec1ec8a18acb42e", + "xPlatform": "stripe" + } + }, + "message": { + "userId": "rudder1235678", + "channel": "web", + "context": { + "ip": "14.5.67.21", + "app": { + "build": "1", + "name": "RudderAndroidClient", + "namespace": "com.rudderstack.demo.android", + "version": "1.0" + }, + "device": { + "manufacturer": "Google", + "model": "Android SDK built for x86", + "name": "generic_x86", + "type": "android" + }, + "library": { + "name": "com.rudderstack.android.sdk.core", + "version": "0.1.4" + }, + "locale": "en-US", + "network": { + "carrier": "Android", + "bluetooth": false, + "cellular": true, + "wifi": true + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content" + }, + "os": { + "name": "Android", + "version": "9" + }, + "screen": { + "density": 420, + "height": 1794, + "width": 1080 + }, + "timezone": "Asia/Mumbai", + "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)" + }, + "type": "identify", + "traits": { + "email": "chandan@companyname.com", + "phone": "92374162212", + "firstname": "James", + "density": 420, + "height": 1794, + "width": 1080, + "iterableCampaignId": "1234", + "iterableTemplateId": "1234" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "GET", + "endpoint": "https://api.revenuecat.com/v1/subscribers/rudder1235678", + "headers": { + "Authorization": "Basic a5e75dfda29abd920ec1ec8a18acb42e", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + }, + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.revenuecat.com/v1/subscribers/rudder1235678/attributes", + "headers": { + "Authorization": "Basic a5e75dfda29abd920ec1ec8a18acb42e", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "attributes": { + "app_user_id": { + "value": "rudder1235678" + }, + "$email": { + "value": "chandan@companyname.com" + }, + "$phoneNumber": { + "value": "92374162212" + }, + "$ip": { + "value": "14.5.67.21" + }, + "$iterableCampaignId": { + "value": "1234" + }, + "$iterableTemplateId": { + "value": "1234" + }, + "$displayName": { + "value": "James" + }, + "firstname": { + "value": "James" + }, + "density": { + "value": "420" + }, + "height": { + "value": "1794" + }, + "width": { + "value": "1080" + } + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "revenue_cat", + "description": "Test 2", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "xPlatform": "stripe" + } + }, + "message": { + "userId": "rudder1235678", + "channel": "web", + "context": { + "ip": "14.5.67.21", + "app": { + "build": "1", + "name": "RudderAndroidClient", + "namespace": "com.rudderstack.demo.android", + "version": "1.0" + }, + "device": { + "manufacturer": "Google", + "model": "Android SDK built for x86", + "name": "generic_x86", + "type": "android" + }, + "library": { + "name": "com.rudderstack.android.sdk.core", + "version": "0.1.4" + }, + "locale": "en-US", + "network": { + "carrier": "Android", + "bluetooth": false, + "cellular": true, + "wifi": true + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content" + }, + "os": { + "name": "Android", + "version": "9" + }, + "screen": { + "density": 420, + "height": 1794, + "width": 1080 + }, + "timezone": "Asia/Mumbai", + "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)" + }, + "type": "identify", + "traits": { + "email": "chandan@companyname.com", + "phone": "92374162212", + "name": "John Doe" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "statusCode": 400, + "error": "Public API Key required for Authentication", + "statTags": { + "errorCategory": "dataValidation", + "errorType": "configuration", + "destType": "REVENUE_CAT", + "module": "destination", + "implementation": "native", + "feature": "processor" + } + } + ] + } + } + }, + { + "name": "revenue_cat", + "description": "Test 3", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "a5e75d99c8a18acb4a29abd920ec1e2e" + } + }, + "message": { + "userId": "rudder1235678", + "channel": "web", + "context": { + "ip": "14.5.67.21", + "app": { + "build": "1", + "name": "RudderAndroidClient", + "namespace": "com.rudderstack.demo.android", + "version": "1.0" + }, + "device": { + "manufacturer": "Google", + "model": "Android SDK built for x86", + "name": "generic_x86", + "type": "android" + }, + "library": { + "name": "com.rudderstack.android.sdk.core", + "version": "0.1.4" + }, + "locale": "en-US", + "network": { + "carrier": "Android", + "bluetooth": false, + "cellular": true, + "wifi": true + }, + "campaign": { + "source": "google", + "medium": "medium", + "term": "keyword", + "content": "some content" + }, + "os": { + "name": "Android", + "version": "9" + }, + "screen": { + "density": 420, + "height": 1794, + "width": 1080 + }, + "timezone": "Asia/Mumbai", + "userAgent": "Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)" + }, + "type": "identify", + "traits": { + "email": "chandan@companyname.com", + "phone": "92374162212", + "name": "John Doe" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "GET", + "endpoint": "https://api.revenuecat.com/v1/subscribers/rudder1235678", + "headers": { + "Authorization": "Basic a5e75d99c8a18acb4a29abd920ec1e2e", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": {}, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + }, + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.revenuecat.com/v1/subscribers/rudder1235678/attributes", + "headers": { + "Authorization": "Basic a5e75d99c8a18acb4a29abd920ec1e2e", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "attributes": { + "app_user_id": { + "value": "rudder1235678" + }, + "$displayName": { + "value": "John Doe" + }, + "$email": { + "value": "chandan@companyname.com" + }, + "$phoneNumber": { + "value": "92374162212" + }, + "$ip": { + "value": "14.5.67.21" + } + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "revenue_cat", + "description": "Test 4", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey" + } + }, + "message": { + "type": "track", + "userId": "rudder123", + "properties": { + "checkout_id": "12345", + "order_id": "1234", + "affiliation": "Apple Store", + "total": 20, + "revenue": 15, + "shipping": 22, + "tax": 1, + "discount": 1.5, + "coupon": "ImagePro", + "currency": "USD", + "fetch_token": "dummyFetchToken", + "product_id": "123", + "products": [ + { + "sku": "G-32", + "name": "Monopoly", + "price": 14, + "quantity": 1, + "introductory_price": "350", + "is_restore": true, + "presented_offering_identifier": "123erd" + }, + { + "product_id": "345", + "sku": "F-32", + "name": "UNO", + "price": 3.45, + "quantity": 2, + "category": "Games", + "introductory_price": "250", + "is_restore": false, + "presented_offering_identifier": "123erd" + } + ] + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "statusCode": 400, + "error": "X-Platform is required field", + "statTags": { + "errorCategory": "dataValidation", + "errorType": "configuration", + "destType": "REVENUE_CAT", + "module": "destination", + "implementation": "native", + "feature": "processor" + } + } + ] + } + } + }, + { + "name": "revenue_cat", + "description": "Test 5", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "xPlatform": "stripe" + } + }, + "message": { + "type": "track", + "userId": "rudder123", + "properties": { + "checkout_id": "12345", + "order_id": "1234", + "affiliation": "Apple Store", + "total": 20, + "revenue": 15, + "shipping": 22, + "tax": 1, + "discount": 1.5, + "coupon": "ImagePro", + "currency": "USD", + "fetch_token": "dummyFetchToken", + "product_id": "123", + "products": [ + { + "sku": "G-32", + "name": "Monopoly", + "price": 14, + "quantity": 1, + "introductory_price": "350", + "is_restore": true, + "presented_offering_identifier": "123erd" + }, + { + "product_id": "345", + "sku": "F-32", + "name": "UNO", + "price": 3.45, + "quantity": 2, + "category": "Games", + "introductory_price": "250", + "is_restore": false, + "presented_offering_identifier": "123erd" + } + ] + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.revenuecat.com/v1/receipts", + "headers": { + "Authorization": "Basic dummyApiKey", + "Content-Type": "application/json", + "X-Platform": "stripe" + }, + "params": {}, + "body": { + "JSON": { + "app_user_id": "rudder123", + "fetch_token": "dummyFetchToken", + "product_id": "123", + "currency": "USD", + "price": 14, + "introductory_price": "350", + "is_restore": true, + "presented_offering_identifier": "123erd" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + }, + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.revenuecat.com/v1/receipts", + "headers": { + "Authorization": "Basic dummyApiKey", + "Content-Type": "application/json", + "X-Platform": "stripe" + }, + "params": {}, + "body": { + "JSON": { + "app_user_id": "rudder123", + "fetch_token": "dummyFetchToken", + "product_id": "345", + "currency": "USD", + "price": 3.45, + "introductory_price": "250", + "is_restore": false, + "presented_offering_identifier": "123erd" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "revenue_cat", + "description": "Test 6", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "xPlatform": "stripe" + } + }, + "message": { + "type": "track", + "userId": "rudder123", + "properties": { + "checkout_id": "12345", + "order_id": "1234", + "affiliation": "Apple Store", + "total": 20, + "revenue": 15, + "shipping": 22, + "tax": 1, + "discount": 1.5, + "coupon": "ImagePro", + "currency": "USD", + "fetch_token": "dummyFetchToken", + "product_id": "123-sa", + "products": [ + { + "sku": "G-32", + "name": "Monopoly", + "price": 14, + "quantity": 1, + "introductory_price": "350", + "is_restore": true, + "presented_offering_identifier": "123erd" + }, + { + "product_id": "345", + "sku": "F-32", + "name": "UNO", + "price": 3.45, + "quantity": 2, + "category": "Games", + "introductory_price": "250", + "is_restore": false, + "presented_offering_identifier": "123erd" + }, + { + "sku": "G-33", + "name": "SunGlass", + "price": 14, + "quantity": 1, + "introductory_price": "350", + "is_restore": true, + "presented_offering_identifier": "123erd" + }, + { + "sku": "G-35", + "product_id": "1234sb", + "name": "Real-me", + "price": 14, + "quantity": 1, + "introductory_price": "350", + "is_restore": true, + "presented_offering_identifier": "123erd" + } + ] + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.revenuecat.com/v1/receipts", + "headers": { + "Authorization": "Basic dummyApiKey", + "Content-Type": "application/json", + "X-Platform": "stripe" + }, + "params": {}, + "body": { + "JSON": { + "app_user_id": "rudder123", + "fetch_token": "dummyFetchToken", + "product_id": "123-sa", + "currency": "USD", + "price": 14, + "introductory_price": "350", + "is_restore": true, + "presented_offering_identifier": "123erd" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + }, + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.revenuecat.com/v1/receipts", + "headers": { + "Authorization": "Basic dummyApiKey", + "Content-Type": "application/json", + "X-Platform": "stripe" + }, + "params": {}, + "body": { + "JSON": { + "app_user_id": "rudder123", + "fetch_token": "dummyFetchToken", + "product_id": "345", + "currency": "USD", + "price": 3.45, + "introductory_price": "250", + "is_restore": false, + "presented_offering_identifier": "123erd" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + }, + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.revenuecat.com/v1/receipts", + "headers": { + "Authorization": "Basic dummyApiKey", + "Content-Type": "application/json", + "X-Platform": "stripe" + }, + "params": {}, + "body": { + "JSON": { + "app_user_id": "rudder123", + "fetch_token": "dummyFetchToken", + "product_id": "123-sa", + "currency": "USD", + "price": 14, + "introductory_price": "350", + "is_restore": true, + "presented_offering_identifier": "123erd" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + }, + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.revenuecat.com/v1/receipts", + "headers": { + "Authorization": "Basic dummyApiKey", + "Content-Type": "application/json", + "X-Platform": "stripe" + }, + "params": {}, + "body": { + "JSON": { + "app_user_id": "rudder123", + "fetch_token": "dummyFetchToken", + "product_id": "1234sb", + "currency": "USD", + "price": 14, + "introductory_price": "350", + "is_restore": true, + "presented_offering_identifier": "123erd" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "revenue_cat", + "description": "Test 7", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "apiKey": "dummyApiKey", + "xPlatform": "stripe" + } + }, + "message": { + "type": "track", + "userId": "rudder123", + "properties": { + "checkout_id": "12345", + "order_id": "1234", + "affiliation": "Apple Store", + "total": 20, + "revenue": 15, + "shipping": 22, + "tax": 1, + "discount": 1.5, + "coupon": "ImagePro", + "currency": "USD", + "fetch_token": "dummyFetchToken", + "product_id": "123-sa", + "sku": "G-32", + "name": "Monopoly", + "price": 14, + "quantity": 1, + "introductory_price": "350", + "is_restore": true, + "presented_offering_identifier": "123erd" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.revenuecat.com/v1/receipts", + "headers": { + "Authorization": "Basic dummyApiKey", + "Content-Type": "application/json", + "X-Platform": "stripe" + }, + "params": {}, + "body": { + "JSON": { + "app_user_id": "rudder123", + "fetch_token": "dummyFetchToken", + "product_id": "123-sa", + "price": 14, + "currency": "USD", + "introductory_price": "350", + "is_restore": true, + "presented_offering_identifier": "123erd" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + } +] \ No newline at end of file diff --git a/test/integrations/destinations/rockerbox/processor/data.ts b/test/integrations/destinations/rockerbox/processor/data.ts index 76dd8ef11b..ff8f6d4620 100644 --- a/test/integrations/destinations/rockerbox/processor/data.ts +++ b/test/integrations/destinations/rockerbox/processor/data.ts @@ -1,746 +1,749 @@ export const data = [ - { - name: 'rockerbox', - description: 'Test 0', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - advertiserId: 'KDH4JNDHCFJHJ57SJOWJE490W01JFNHGDSSFHDKDSDF', - }, - }, - message: { - context: { - traits: { - homwTown: 'kanpur', - age: '24', - }, - }, - type: 'Identify', - userId: 'yash001', - originalTimestamp: '2019-10-14T09:03:17.562Z', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - statusCode: 400, - error: 'Message type identify is not supported', - statTags: { - errorCategory: 'dataValidation', - errorType: 'instrumentation', - destType: 'ROCKERBOX', - module: 'destination', - implementation: 'native', - feature: 'processor', - }, - }, - ], - }, - }, - }, - { - name: 'rockerbox', - description: 'Test 1', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - advertiserId: 'test id', - eventFilteringOption: 'disable', - whitelistedEvents: [ - { - eventName: '', - }, - ], - blacklistedEvents: [ - { - eventName: '', - }, - ], - eventsMap: [ - { - from: 'Product Added To Cart', - to: 'conv.add_to_cart', - }, - ], - useNativeSDK: { - web: false, - }, - clientAuthId: { - web: 'test-client-auth-id', - }, - oneTrustCookieCategories: { - web: [ - { - oneTrustCookieCategory: 'Marketing Sample', - }, - ], - }, - customDomain: { - web: 'https://cookiedomain.com', - }, - enableCookieSync: { - web: true, - }, - }, - }, - message: { - type: 'track', - event: 'Product Added', - sentAt: '2022-08-07T20:02:19.352Z', - userId: 'userSampleX138', - channel: 'web', - context: { - os: { - name: '', - version: '', - }, - locale: 'en-IN', - screen: { - width: 1440, - height: 900, - density: 2, - innerWidth: 584, - innerHeight: 789, - }, - traits: { - email: 'userSampleX120@gmail.com', - phone: '9878764736', - last_name: 'Stack', - first_name: 'Rudder', - subscription: 'youtube', - }, - campaign: {}, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36', - }, - rudderId: '4a47e99b-2afc-45c6-b902-ed69282ca805', - messageId: '1659902539347900-c622426c-a1dd-44c0-ac6d-d4dbee3f4a93', - properties: { - checkout_id: '12345', - product_url: 'http://www.yourdomain.com/products/red-t-shirt', - product_name: 'Red T-shirt', - }, - anonymousId: '5f093403-1457-4a2c-b4e4-c61ec3bacf56', - integrations: { - All: true, - }, - originalTimestamp: '2022-08-07T20:02:19.347Z', - }, - writeKey: '2D0yaayoBD7bp8uFomnBONdedcA', - requestIP: '[::1]', - receivedAt: '2022-08-08T01:32:19.369+05:30', - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - statusCode: 400, - error: 'The event is not associated to a RockerBox event. Aborting!', - statTags: { - errorCategory: 'dataValidation', - errorType: 'configuration', - destType: 'ROCKERBOX', - module: 'destination', - implementation: 'native', - feature: 'processor', - }, - }, - ], - }, - }, - }, - { - name: 'rockerbox', - description: 'Test 2', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - advertiserId: 'test id', - eventFilteringOption: 'disable', - whitelistedEvents: [ - { - eventName: '', - }, - ], - blacklistedEvents: [ - { - eventName: '', - }, - ], - eventsMap: [ - { - from: 'Product Added', - to: 'conv.add_to_cart', - }, - ], - useNativeSDK: { - web: false, - }, - clientAuthId: { - web: 'test-client-auth-id', - }, - oneTrustCookieCategories: { - web: [ - { - oneTrustCookieCategory: 'Marketing Sample', - }, - ], - }, - customDomain: { - web: 'https://cookiedomain.com', - }, - enableCookieSync: { - web: true, - }, - }, - }, - message: { - type: 'track', - event: 'Product Added', - sentAt: '2022-08-07T20:02:19.352Z', - userId: 'userSampleX138', - channel: 'web', - context: { - os: { - name: '', - version: '', - }, - locale: 'en-IN', - traits: { - email: 'userSampleX120@gmail.com', - phone: '9878764736', - last_name: 'Stack', - first_name: 'Rudder', - }, - campaign: {}, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36', - }, - rudderId: '4a47e99b-2afc-45c6-b902-ed69282ca805', - messageId: '1659902539347900-c622426c-a1dd-44c0-ac6d-d4dbee3f4a93', - properties: { - checkout_id: '12345', - product_url: 'http://www.yourdomain.com/products/red-t-shirt', - product_name: 'Red T-shirt', - }, - anonymousId: '5f093403-1457-4a2c-b4e4-c61ec3bacf56', - integrations: { - All: true, - }, - originalTimestamp: '2022-08-07T20:02:19.347Z', - }, - writeKey: '2D0yaayoBD7bp8uFomnBONdedcA', - requestIP: '[::1]', - receivedAt: '2022-08-08T01:32:19.369+05:30', - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://webhooks.getrockerbox.com/rudderstack', - headers: {}, - params: { - advertiser: 'test id', - }, - body: { - JSON: { - customer_id: 'userSampleX138', - anonymous_id: '5f093403-1457-4a2c-b4e4-c61ec3bacf56', - email: 'userSampleX120@gmail.com', - phone: '9878764736', - timestamp: 1659902539, - conversion_source: 'RudderStack', - action: 'conv.add_to_cart', - checkout_id: '12345', - product_url: 'http://www.yourdomain.com/products/red-t-shirt', - product_name: 'Red T-shirt', - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'rockerbox', - description: 'Test 3', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - advertiserId: 'test id', - eventFilteringOption: 'disable', - whitelistedEvents: [ - { - eventName: '', - }, - ], - blacklistedEvents: [ - { - eventName: '', - }, - ], - eventsMap: [ - { - from: 'Product Added', - to: 'conv.add_to_cart', - }, - ], - useNativeSDK: { - web: false, - }, - clientAuthId: { - web: 'test-client-auth-id', - }, - oneTrustCookieCategories: { - web: [ - { - oneTrustCookieCategory: 'Marketing Sample', - }, - ], - }, - customDomain: { - web: 'https://cookiedomain.com', - }, - enableCookieSync: { - web: true, - }, - }, - }, - message: { - type: 'track', - event: 'Product Added', - sentAt: '2022-08-07T20:02:19.352Z', - userId: 'userSampleX138', - channel: 'web', - context: { - os: { - name: '', - version: '', - }, - locale: 'en-IN', - traits: { - email: 'userSampleX120@gmail.com', - phone: '9878764736', - last_name: 'Stack', - first_name: 'Rudder', - }, - externalId: [ - { - type: 'rockerboxExternalId', - id: 'rbUid', - }, - ], - campaign: {}, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36', - }, - rudderId: '4a47e99b-2afc-45c6-b902-ed69282ca805', - messageId: '1659902539347900-c622426c-a1dd-44c0-ac6d-d4dbee3f4a93', - properties: { - checkout_id: '12345', - product_url: 'http://www.yourdomain.com/products/red-t-shirt', - product_name: 'Red T-shirt', - externalId: 'rbUid', - countryCode: 'IN', - listingId: '10101', - }, - anonymousId: '5f093403-1457-4a2c-b4e4-c61ec3bacf56', - integrations: { - All: true, - }, - originalTimestamp: '2022-08-07T20:02:19.347Z', - }, - writeKey: '2D0yaayoBD7bp8uFomnBONdedcA', - requestIP: '[::1]', - receivedAt: '2022-08-08T01:32:19.369+05:30', - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://webhooks.getrockerbox.com/rudderstack', - headers: {}, - params: { - advertiser: 'test id', - }, - body: { - JSON: { - customer_id: 'userSampleX138', - anonymous_id: '5f093403-1457-4a2c-b4e4-c61ec3bacf56', - email: 'userSampleX120@gmail.com', - phone: '9878764736', - timestamp: 1659902539, - country_code: 'IN', - listing_id: '10101', - conversion_source: 'RudderStack', - action: 'conv.add_to_cart', - checkout_id: '12345', - product_url: 'http://www.yourdomain.com/products/red-t-shirt', - product_name: 'Red T-shirt', - externalId: 'rbUid', - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'rockerbox', - description: 'Test 4', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - advertiserId: 'hdowhfiqhfwaiwhrdafshbfacicolsa', - eventFilteringOption: 'disable', - whitelistedEvents: [ - { - eventName: '', - }, - ], - blacklistedEvents: [ - { - eventName: '', - }, - ], - eventsMap: [ - { - from: 'Product Added', - to: 'conv.add_to_cart', - }, - ], - customPropsMapping: [ - { - from: 'unit_id', - to: 'unitID', - }, - { - from: 'merch_id', - to: 'merch_id', - }, - { - from: 'bounce_id', - to: 'bounceID', - }, - ], - useNativeSDK: { - web: false, - }, - useNativeSDKToSend: { - web: false, - }, - clientAuthId: { - web: '', - }, - oneTrustCookieCategories: { - web: [ - { - oneTrustCookieCategory: '', - }, - ], - }, - customDomain: { - web: '', - }, - enableCookieSync: { - web: 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: 'track', - traits: { - userId: '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: '', - }, - }, - properties: { - unit_id: 123, - merch_id: false, - bounceiD: 'fakefake', - counce_id: '', - }, - event: 'Product Added', - integrations: { - All: true, - }, - sentAt: '2019-10-14T09:03:22.563Z', - }, - writeKey: '2D0yaayoBD7bp8uFomnBONdedcA', - requestIP: '[::1]', - receivedAt: '2022-08-08T01:32:19.369+05:30', - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://webhooks.getrockerbox.com/rudderstack', - headers: {}, - params: { - advertiser: 'hdowhfiqhfwaiwhrdafshbfacicolsa', - }, - body: { - JSON: { - customer_id: 'anon_id', - anonymous_id: 'anon_id', - email: 'jamesDoe@gmail.com', - phone: '92374162212', - timestamp: 1571043797, - conversion_source: 'RudderStack', - action: 'conv.add_to_cart', - unit_id: 123, - merch_id: false, - bounceiD: 'fakefake', - counce_id: '', - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'rockerbox', - description: 'Test 5', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - advertiserId: 'KDH4JNDHCFJHJ57SJOWJE490W01JFNHGDSSFHDKDSDF', - }, - }, - message: { - channel: 'web', - context: { - app: { - build: '1.0.0', - name: 'RudderLabs JavaScript SDK', - namespace: 'com.rudderlabs.javascript', - version: '1.0.0', - }, - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.0.0', - }, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, 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', - traits: { - 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: '', - }, - }, - properties: { - unit_id: 123, - merch_id: false, - bounceiD: 'fakefake', - counce_id: '', - }, - event: 'Product Added', - integrations: { - All: true, - }, - sentAt: '2019-10-14T09:03:22.563Z', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - statusCode: 400, - error: 'Anyone of userId or anonymousId is required to make the call', - statTags: { - errorCategory: 'dataValidation', - errorType: 'instrumentation', - destType: 'ROCKERBOX', - module: 'destination', - implementation: 'native', - feature: 'processor', - }, - }, - ], - }, - }, - }, -]; + { + "name": "rockerbox", + "description": "Test 0", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "advertiserId": "KDH4JNDHCFJHJ57SJOWJE490W01JFNHGDSSFHDKDSDF" + } + }, + "message": { + "context": { + "traits": { + "homwTown": "kanpur", + "age": "24" + } + }, + "type": "Identify", + "userId": "yash001", + "originalTimestamp": "2019-10-14T09:03:17.562Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "statusCode": 400, + "error": "Message type identify is not supported", + "statTags": { + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "destType": "ROCKERBOX", + "module": "destination", + "implementation": "native", + "feature": "processor" + } + } + ] + } + } + }, + { + "name": "rockerbox", + "description": "Test 1", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "advertiserId": "test id", + "eventFilteringOption": "disable", + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "eventsMap": [ + { + "from": "Product Added To Cart", + "to": "conv.add_to_cart" + } + ], + "useNativeSDK": { + "web": false + }, + "clientAuthId": { + "web": "test-client-auth-id" + }, + "oneTrustCookieCategories": { + "web": [ + { + "oneTrustCookieCategory": "Marketing Sample" + } + ] + }, + "customDomain": { + "web": "https://cookiedomain.com" + }, + "enableCookieSync": { + "web": true + } + } + }, + "message": { + "type": "track", + "event": "Product Added", + "sentAt": "2022-08-07T20:02:19.352Z", + "userId": "userSampleX138", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "locale": "en-IN", + "screen": { + "width": 1440, + "height": 900, + "density": 2, + "innerWidth": 584, + "innerHeight": 789 + }, + "traits": { + "email": "userSampleX120@gmail.com", + "phone": "9878764736", + "last_name": "Stack", + "first_name": "Rudder", + "subscription": "youtube" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36" + }, + "rudderId": "4a47e99b-2afc-45c6-b902-ed69282ca805", + "messageId": "1659902539347900-c622426c-a1dd-44c0-ac6d-d4dbee3f4a93", + "properties": { + "checkout_id": "12345", + "product_url": "http://www.yourdomain.com/products/red-t-shirt", + "product_name": "Red T-shirt" + }, + "anonymousId": "5f093403-1457-4a2c-b4e4-c61ec3bacf56", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-08-07T20:02:19.347Z" + }, + "writeKey": "2D0yaayoBD7bp8uFomnBONdedcA", + "requestIP": "[::1]", + "receivedAt": "2022-08-08T01:32:19.369+05:30" + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "statusCode": 400, + "error": "The event is not associated to a RockerBox event. Aborting!", + "statTags": { + "errorCategory": "dataValidation", + "errorType": "configuration", + "destType": "ROCKERBOX", + "module": "destination", + "implementation": "native", + "feature": "processor" + } + } + ] + } + } + }, + { + "name": "rockerbox", + "description": "Test 2", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "advertiserId": "test id", + "eventFilteringOption": "disable", + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "eventsMap": [ + { + "from": "Product Added", + "to": "conv.add_to_cart" + } + ], + "useNativeSDK": { + "web": false + }, + "clientAuthId": { + "web": "test-client-auth-id" + }, + "oneTrustCookieCategories": { + "web": [ + { + "oneTrustCookieCategory": "Marketing Sample" + } + ] + }, + "customDomain": { + "web": "https://cookiedomain.com" + }, + "enableCookieSync": { + "web": true + } + } + }, + "message": { + "type": "track", + "event": "Product Added", + "sentAt": "2022-08-07T20:02:19.352Z", + "userId": "userSampleX138", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "locale": "en-IN", + "traits": { + "email": "userSampleX120@gmail.com", + "phone": "9878764736", + "last_name": "Stack", + "first_name": "Rudder" + }, + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36" + }, + "rudderId": "4a47e99b-2afc-45c6-b902-ed69282ca805", + "messageId": "1659902539347900-c622426c-a1dd-44c0-ac6d-d4dbee3f4a93", + "properties": { + "checkout_id": "12345", + "product_url": "http://www.yourdomain.com/products/red-t-shirt", + "product_name": "Red T-shirt" + }, + "anonymousId": "5f093403-1457-4a2c-b4e4-c61ec3bacf56", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-08-07T20:02:19.347Z" + }, + "writeKey": "2D0yaayoBD7bp8uFomnBONdedcA", + "requestIP": "[::1]", + "receivedAt": "2022-08-08T01:32:19.369+05:30" + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://webhooks.getrockerbox.com/rudderstack", + "headers": {}, + "params": { + "advertiser": "test id" + }, + "body": { + "JSON": { + "customer_id": "userSampleX138", + "anonymous_id": "5f093403-1457-4a2c-b4e4-c61ec3bacf56", + "email": "userSampleX120@gmail.com", + "phone": "9878764736", + "timestamp": 1659902539, + "conversion_source": "RudderStack", + "action": "conv.add_to_cart", + "checkout_id": "12345", + "product_url": "http://www.yourdomain.com/products/red-t-shirt", + "product_name": "Red T-shirt" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "rockerbox", + "description": "Test 3", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "advertiserId": "test id", + "eventFilteringOption": "disable", + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "eventsMap": [ + { + "from": "Product Added", + "to": "conv.add_to_cart" + } + ], + "useNativeSDK": { + "web": false + }, + "clientAuthId": { + "web": "test-client-auth-id" + }, + "oneTrustCookieCategories": { + "web": [ + { + "oneTrustCookieCategory": "Marketing Sample" + } + ] + }, + "customDomain": { + "web": "https://cookiedomain.com" + }, + "enableCookieSync": { + "web": true + } + } + }, + "message": { + "type": "track", + "event": "Product Added", + "sentAt": "2022-08-07T20:02:19.352Z", + "userId": "userSampleX138", + "channel": "web", + "context": { + "os": { + "name": "", + "version": "" + }, + "locale": "en-IN", + "traits": { + "email": "userSampleX120@gmail.com", + "phone": "9878764736", + "last_name": "Stack", + "first_name": "Rudder" + }, + "externalId": [ + { + "type": "rockerboxExternalId", + "id": "rbUid" + } + ], + "campaign": {}, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36" + }, + "rudderId": "4a47e99b-2afc-45c6-b902-ed69282ca805", + "messageId": "1659902539347900-c622426c-a1dd-44c0-ac6d-d4dbee3f4a93", + "properties": { + "checkout_id": "12345", + "product_url": "http://www.yourdomain.com/products/red-t-shirt", + "product_name": "Red T-shirt", + "externalId": "rbUid", + "countryCode": "IN", + "listingId": "10101" + }, + "anonymousId": "5f093403-1457-4a2c-b4e4-c61ec3bacf56", + "integrations": { + "All": true + }, + "originalTimestamp": "2022-08-07T20:02:19.347Z" + }, + "writeKey": "2D0yaayoBD7bp8uFomnBONdedcA", + "requestIP": "[::1]", + "receivedAt": "2022-08-08T01:32:19.369+05:30" + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://webhooks.getrockerbox.com/rudderstack", + "headers": {}, + "params": { + "advertiser": "test id" + }, + "body": { + "JSON": { + "customer_id": "userSampleX138", + "anonymous_id": "5f093403-1457-4a2c-b4e4-c61ec3bacf56", + "email": "userSampleX120@gmail.com", + "phone": "9878764736", + "timestamp": 1659902539, + "country_code": "IN", + "listing_id": "10101", + "conversion_source": "RudderStack", + "action": "conv.add_to_cart", + "checkout_id": "12345", + "product_url": "http://www.yourdomain.com/products/red-t-shirt", + "product_name": "Red T-shirt", + "externalId": "rbUid" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "rockerbox", + "description": "Test 4", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "advertiserId": "hdowhfiqhfwaiwhrdafshbfacicolsa", + "eventFilteringOption": "disable", + "whitelistedEvents": [ + { + "eventName": "" + } + ], + "blacklistedEvents": [ + { + "eventName": "" + } + ], + "eventsMap": [ + { + "from": "Product Added", + "to": "conv.add_to_cart" + } + ], + "customPropsMapping": [ + { + "from": "unit_id", + "to": "unitID" + }, + { + "from": "merch_id", + "to": "merch_id" + }, + { + "from": "bounce_id", + "to": "bounceID" + } + ], + "useNativeSDK": { + "web": false + }, + "useNativeSDKToSend": { + "web": false + }, + "clientAuthId": { + "web": "" + }, + "oneTrustCookieCategories": { + "web": [ + { + "oneTrustCookieCategory": "" + } + ] + }, + "customDomain": { + "web": "" + }, + "enableCookieSync": { + "web": 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": "track", + "traits": { + "userId": "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": "" + } + }, + "properties": { + "unit_id": 123, + "merch_id": false, + "bounceiD": "fakefake", + "counce_id": "" + }, + "event": "Product Added", + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + }, + "writeKey": "2D0yaayoBD7bp8uFomnBONdedcA", + "requestIP": "[::1]", + "receivedAt": "2022-08-08T01:32:19.369+05:30" + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://webhooks.getrockerbox.com/rudderstack", + "headers": {}, + "params": { + "advertiser": "hdowhfiqhfwaiwhrdafshbfacicolsa" + }, + "body": { + "JSON": { + "customer_id": "anon_id", + "anonymous_id": "anon_id", + "email": "jamesDoe@gmail.com", + "phone": "92374162212", + "timestamp": 1571043797, + "conversion_source": "RudderStack", + "action": "conv.add_to_cart", + "unit_id": 123, + "merch_id": false, + "bounceiD": "fakefake", + "counce_id": "" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "rockerbox", + "description": "Test 5", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "advertiserId": "KDH4JNDHCFJHJ57SJOWJE490W01JFNHGDSSFHDKDSDF" + } + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.0.0" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.0.0" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, 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", + "traits": { + "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": "" + } + }, + "properties": { + "unit_id": 123, + "merch_id": false, + "bounceiD": "fakefake", + "counce_id": "" + }, + "event": "Product Added", + "integrations": { + "All": true + }, + "sentAt": "2019-10-14T09:03:22.563Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "statusCode": 400, + "error": "Anyone of userId or anonymousId is required to make the call", + "statTags": { + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "destType": "ROCKERBOX", + "module": "destination", + "implementation": "native", + "feature": "processor" + } + } + ] + } + } + } +] \ No newline at end of file diff --git a/test/integrations/destinations/rockerbox/router/data.ts b/test/integrations/destinations/rockerbox/router/data.ts index af943d7e6b..caa8f1ba08 100644 --- a/test/integrations/destinations/rockerbox/router/data.ts +++ b/test/integrations/destinations/rockerbox/router/data.ts @@ -14,19 +14,46 @@ export const data = [ Config: { advertiserId: 'test id', eventFilteringOption: 'disable', - whitelistedEvents: [{ eventName: '' }], - blacklistedEvents: [{ eventName: '' }], - eventsMap: [{ from: 'Product Added', to: 'conv.add_to_cart' }], - useNativeSDK: { web: false }, - clientAuthId: { web: 'test-client-auth-id' }, + whitelistedEvents: [ + { + eventName: '', + }, + ], + blacklistedEvents: [ + { + eventName: '', + }, + ], + eventsMap: [ + { + from: 'Product Added', + to: 'conv.add_to_cart', + }, + ], + useNativeSDK: { + web: false, + }, + clientAuthId: { + web: 'test-client-auth-id', + }, oneTrustCookieCategories: { - web: [{ oneTrustCookieCategory: 'Marketing Sample' }], + web: [ + { + oneTrustCookieCategory: 'Marketing Sample', + }, + ], + }, + customDomain: { + web: 'https://cookiedomain.com', + }, + enableCookieSync: { + web: true, }, - customDomain: { web: 'https://cookiedomain.com' }, - enableCookieSync: { web: true }, }, }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, message: { type: 'track', event: 'Product Added', @@ -34,7 +61,10 @@ export const data = [ userId: 'userSampleX138', channel: 'web', context: { - os: { name: '', version: '' }, + os: { + name: '', + version: '', + }, locale: 'en-IN', traits: { email: 'userSampleX120@gmail.com', @@ -54,7 +84,9 @@ export const data = [ product_name: 'Red T-shirt', }, anonymousId: '5f093403-1457-4a2c-b4e4-c61ec3bacf56', - integrations: { All: true }, + integrations: { + All: true, + }, originalTimestamp: '2022-08-07T20:02:19.347Z', }, writeKey: '2D0yaayoBD7bp8uFomnBONdedcA', @@ -115,7 +147,7 @@ export const data = [ whitelistedEvents: [{ eventName: '' }], }, }, - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [{ jobId: 1 }], statusCode: 200, }, ], @@ -138,19 +170,46 @@ export const data = [ Config: { advertiserId: 'test id', eventFilteringOption: 'disable', - whitelistedEvents: [{ eventName: '' }], - blacklistedEvents: [{ eventName: '' }], - eventsMap: [{ from: 'Product Viewed', to: 'conv.add_to_cart' }], - useNativeSDK: { web: false }, - clientAuthId: { web: 'test-client-auth-id' }, + whitelistedEvents: [ + { + eventName: '', + }, + ], + blacklistedEvents: [ + { + eventName: '', + }, + ], + eventsMap: [ + { + from: 'Product Viewed', + to: 'conv.add_to_cart', + }, + ], + useNativeSDK: { + web: false, + }, + clientAuthId: { + web: 'test-client-auth-id', + }, oneTrustCookieCategories: { - web: [{ oneTrustCookieCategory: 'Marketing Sample' }], + web: [ + { + oneTrustCookieCategory: 'Marketing Sample', + }, + ], + }, + customDomain: { + web: 'https://cookiedomain.com', + }, + enableCookieSync: { + web: true, }, - customDomain: { web: 'https://cookiedomain.com' }, - enableCookieSync: { web: true }, }, }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, message: { type: 'track', event: 'Product Viewed', @@ -158,7 +217,10 @@ export const data = [ userId: 'userSampleX138', channel: 'web', context: { - os: { name: '', version: '' }, + os: { + name: '', + version: '', + }, locale: 'en-IN', traits: { email: 'userSampleX120@gmail.com', @@ -178,7 +240,9 @@ export const data = [ product_name: 'Red T-shirt', }, anonymousId: '5f093403-1457-4a2c-b4e4-c61ec3bacf56', - integrations: { All: true }, + integrations: { + All: true, + }, originalTimestamp: '2022-08-07T20:02:19.347Z', }, writeKey: '2D0yaayoBD7bp8uFomnBONdedcA', @@ -239,7 +303,7 @@ export const data = [ whitelistedEvents: [{ eventName: '' }], }, }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [{ jobId: 2 }], statusCode: 200, }, ], diff --git a/test/integrations/destinations/salesforce/router/data.ts b/test/integrations/destinations/salesforce/router/data.ts index 4a37f7ed40..8c36d3a785 100644 --- a/test/integrations/destinations/salesforce/router/data.ts +++ b/test/integrations/destinations/salesforce/router/data.ts @@ -1,8 +1,10 @@ +import { FEATURES } from '../../../../../src/v0/util/tags'; + export const data = [ { name: 'salesforce', description: 'Test 0', - feature: 'router', + feature: FEATURES.ROUTER, module: 'destination', version: 'v0', input: { @@ -21,10 +23,18 @@ export const data = [ version: '1.0.0', }, ip: '0.0.0.0', - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, locale: 'en-US', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, traits: { anonymousId: '1e7673da-9473-49c6-97f7-da848ecafa76', company: 'Initech', @@ -44,7 +54,9 @@ 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.130 Safari/537.36', }, - integrations: { All: true }, + 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', @@ -54,7 +66,9 @@ export const data = [ type: 'identify', userId: '1e7673da-9473-49c6-97f7-da848ecafa76', }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, destination: { Config: { initialAccessToken: 'dummyInitialAccessToken', @@ -119,7 +133,12 @@ export const data = [ }, ], metadata: [ - { destInfo: { authKey: '1WqFFH5esuVPnUgHkvEoYxDcX3y' }, jobId: 1, userId: 'u1' }, + { + destInfo: { + authKey: '1WqFFH5esuVPnUgHkvEoYxDcX3y', + }, + jobId: 1, + }, ], batched: false, statusCode: 200, @@ -148,7 +167,7 @@ export const data = [ { name: 'salesforce', description: 'Test 1', - feature: 'router', + feature: FEATURES.ROUTER, module: 'destination', version: 'v0', input: { @@ -167,10 +186,18 @@ export const data = [ version: '1.0.0', }, ip: '0.0.0.0', - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, locale: 'en-US', - os: { name: '', version: '' }, - screen: { density: 2 }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, traits: { anonymousId: '1e7673da-9473-49c6-97f7-da848ecafa76', company: 'Initech', @@ -190,7 +217,9 @@ 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.130 Safari/537.36', }, - integrations: { All: true }, + 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', @@ -200,7 +229,9 @@ export const data = [ type: 'identify', userId: '1e7673da-9473-49c6-97f7-da848ecafa76', }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, destination: { Config: { initialAccessToken: 'dummyInitialAccessToken', @@ -266,7 +297,12 @@ export const data = [ }, ], metadata: [ - { destInfo: { authKey: '1WqFFH5esuVPnUgHkvEoYxDcX3y' }, jobId: 2, userId: 'u1' }, + { + destInfo: { + authKey: '1WqFFH5esuVPnUgHkvEoYxDcX3y', + }, + jobId: 2, + }, ], batched: false, statusCode: 200, @@ -295,7 +331,7 @@ export const data = [ { name: 'salesforce', description: 'Test 2', - feature: 'router', + feature: FEATURES.ROUTER, module: 'destination', version: 'v0', input: { @@ -314,14 +350,24 @@ export const data = [ version: '1.0.0', }, ip: '0.0.0.0', - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, locale: 'en-US', - os: { name: '', version: '' }, - screen: { density: 2 }, + 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.130 Safari/537.36', }, - integrations: { All: true }, + integrations: { + All: true, + }, traits: { anonymousId: '1e7673da-9473-49c6-97f7-da848ecafa76', company: 'Initech', @@ -347,7 +393,9 @@ export const data = [ type: 'identify', userId: '1e7673da-9473-49c6-97f7-da848ecafa76', }, - metadata: { jobId: 3, userId: 'u1' }, + metadata: { + jobId: 3, + }, destination: { Config: { initialAccessToken: 'dummyInitialAccessToken', @@ -412,7 +460,12 @@ export const data = [ }, ], metadata: [ - { destInfo: { authKey: '1WqFFH5esuVPnUgHkvEoYxDcX3y' }, jobId: 3, userId: 'u1' }, + { + destInfo: { + authKey: '1WqFFH5esuVPnUgHkvEoYxDcX3y', + }, + jobId: 3, + }, ], batched: false, statusCode: 200, @@ -441,7 +494,7 @@ export const data = [ { name: 'salesforce', description: 'Test 3', - feature: 'router', + feature: FEATURES.ROUTER, module: 'destination', version: 'v0', input: { @@ -482,7 +535,9 @@ export const data = [ files: {}, statusCode: 200, }, - metadata: { jobId: 4, userId: 'u1' }, + metadata: { + jobId: 4, + }, destination: { Config: { initialAccessToken: 'dummyInitialAccessToken', @@ -546,7 +601,12 @@ export const data = [ statusCode: 200, }, metadata: [ - { destInfo: { authKey: '1WqFFH5esuVPnUgHkvEoYxDcX3y' }, jobId: 4, userId: 'u1' }, + { + destInfo: { + authKey: '1WqFFH5esuVPnUgHkvEoYxDcX3y', + }, + jobId: 4, + }, ], batched: false, statusCode: 200, diff --git a/test/integrations/destinations/segment/processor/data.ts b/test/integrations/destinations/segment/processor/data.ts index 9ba9601d6e..0a140e2b99 100644 --- a/test/integrations/destinations/segment/processor/data.ts +++ b/test/integrations/destinations/segment/processor/data.ts @@ -1,675 +1,670 @@ export const data = [ - { - name: 'segment', - description: 'Test 0', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - ID: '1afmecIpsJm7D72aRTksxyODrwR', - Name: 'Segment', - DestinationDefinition: { - ID: '1afjjahf0X5lSyNze7Xh7aqJs11', - Name: 'SEGMENT', - DisplayName: 'Segment', - Config: { - excludeKeys: [], - includeKeys: [], - }, - }, - Config: { - writeKey: 'abcdefghijklmnopqrstuvwxyz', - }, - Enabled: true, - Transformations: [], - IsProcessorEnabled: true, - }, - message: { - anonymousId: 'ac7722c2-ccb6-4ae2-baf6-1effe861f4cd', - channel: 'web', - context: { - app: { - build: '1.0.0', - name: 'RudderLabs JavaScript SDK', - namespace: 'com.rudderlabs.javascript', - version: '1.1.1-rc.2', - }, - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.1.1-rc.2', - }, - locale: 'en-GB', - os: { - name: '', - version: '', - }, - page: { - path: '/tests/html/index4.html', - referrer: '', - search: '', - title: '', - url: 'http://localhost/tests/html/index4.html', - }, - screen: { - density: 2, - }, - traits: { - age: 23, - email: 'testmp@rudderstack.com', - firstname: 'Test Kafka', - }, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36', - }, - integrations: { - All: true, - }, - messageId: '258b77c6-442d-4bdc-8729-f0e4cef41353', - name: 'home', - originalTimestamp: '2020-04-17T14:55:31.367Z', - properties: { - path: '/tests/html/index4.html', - referrer: '', - search: '', - title: '', - url: 'http://localhost/tests/html/index4.html', - }, - receivedAt: '2020-04-17T20:25:31.381+05:30', - request_ip: '[::1]:57363', - sentAt: '2020-04-17T14:55:31.367Z', - timestamp: '2020-04-17T20:25:31.381+05:30', - type: 'page', - userId: 'user12345', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - userId: 'user12345', - endpoint: 'https://api.segment.io/v1/batch', - headers: { - 'Content-Type': 'application/json', - Authorization: 'Basic YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXo6', - }, - params: {}, - body: { - JSON: { - batch: [ - { - anonymousId: 'ac7722c2-ccb6-4ae2-baf6-1effe861f4cd', - type: 'page', - userId: 'user12345', - traits: { - age: 23, - email: 'testmp@rudderstack.com', - firstname: 'Test Kafka', - }, - properties: { - path: '/tests/html/index4.html', - referrer: '', - search: '', - title: '', - url: 'http://localhost/tests/html/index4.html', - }, - timeStamp: '2020-04-17T20:25:31.381+05:30', - }, - ], - }, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - statusCode: 200, - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'segment', - description: 'Test 1', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - ID: '1afmecIpsJm7D72aRTksxyODrwR', - Name: 'Segment', - DestinationDefinition: { - ID: '1afjjahf0X5lSyNze7Xh7aqJs11', - Name: 'SEGMENT', - DisplayName: 'Segment', - Config: { - excludeKeys: [], - includeKeys: [], - }, - }, - Config: { - writeKey: 'abcdefghijklmnopqrstuvwxyz', - }, - Enabled: true, - Transformations: [], - IsProcessorEnabled: true, - }, - message: { - anonymousId: 'ac7722c2-ccb6-4ae2-baf6-1effe861f4cd', - channel: 'web', - context: { - app: { - build: '1.0.0', - name: 'RudderLabs JavaScript SDK', - namespace: 'com.rudderlabs.javascript', - version: '1.1.1-rc.2', - }, - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.1.1-rc.2', - }, - locale: 'en-GB', - os: { - name: '', - version: '', - }, - page: { - path: '/tests/html/index4.html', - referrer: '', - search: '', - title: '', - url: 'http://localhost/tests/html/index4.html', - }, - screen: { - density: 2, - }, - traits: { - age: 23, - email: 'testmp@email.com', - firstname: 'Test Transformer', - }, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36', - }, - integrations: { - All: true, - }, - messageId: '023a3a48-190a-4968-9394-a8e99b81a3c0', - originalTimestamp: '2020-04-17T14:55:31.37Z', - receivedAt: '2020-04-17T20:25:31.401+05:30', - request_ip: '[::1]:57364', - sentAt: '2020-04-17T14:55:31.37Z', - timestamp: '2020-04-17T20:25:31.401+05:30', - type: 'identify', - userId: 'user12345', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - userId: 'user12345', - method: 'POST', - endpoint: 'https://api.segment.io/v1/batch', - headers: { - 'Content-Type': 'application/json', - Authorization: 'Basic YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXo6', - }, - params: {}, - body: { - JSON: { - batch: [ - { - anonymousId: 'ac7722c2-ccb6-4ae2-baf6-1effe861f4cd', - type: 'identify', - userId: 'user12345', - traits: { - age: 23, - email: 'testmp@email.com', - firstname: 'Test Transformer', - }, - timeStamp: '2020-04-17T20:25:31.401+05:30', - }, - ], - }, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - statusCode: 200, - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'segment', - description: 'Test 2', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - ID: '1afmecIpsJm7D72aRTksxyODrwR', - Name: 'Segment', - DestinationDefinition: { - ID: '1afjjahf0X5lSyNze7Xh7aqJs11', - Name: 'SEGMENT', - DisplayName: 'Segment', - Config: { - excludeKeys: [], - includeKeys: [], - }, - }, - Config: { - writeKey: 'abcdefghijklmnopqrstuvwxyz', - }, - Enabled: true, - Transformations: [], - IsProcessorEnabled: true, - }, - message: { - anonymousId: 'ac7722c2-ccb6-4ae2-baf6-1effe861f4cd', - channel: 'web', - context: { - app: { - build: '1.0.0', - name: 'RudderLabs JavaScript SDK', - namespace: 'com.rudderlabs.javascript', - version: '1.1.1-rc.2', - }, - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.1.1-rc.2', - }, - locale: 'en-GB', - os: { - name: '', - version: '', - }, - page: { - path: '/tests/html/index4.html', - referrer: '', - search: '', - title: '', - url: 'http://localhost/tests/html/index4.html', - }, - screen: { - density: 2, - }, - traits: { - age: 23, - email: 'testmp@email.com', - firstname: 'Test Transformer', - }, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36', - }, - event: 'test track with property', - integrations: { - All: true, - }, - messageId: '584fde02-901a-4964-a4a0-4078b999d5b2', - originalTimestamp: '2020-04-17T14:55:31.372Z', - properties: { - test_prop_1: 'test prop', - test_prop_2: 1232, - }, - receivedAt: '2020-04-17T20:25:31.401+05:30', - request_ip: '[::1]:57365', - sentAt: '2020-04-17T14:55:31.372Z', - timestamp: '2020-04-17T20:25:31.401+05:30', - type: 'track', - userId: 'user12345', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - userId: 'user12345', - method: 'POST', - endpoint: 'https://api.segment.io/v1/batch', - headers: { - 'Content-Type': 'application/json', - Authorization: 'Basic YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXo6', - }, - params: {}, - body: { - JSON: { - batch: [ - { - anonymousId: 'ac7722c2-ccb6-4ae2-baf6-1effe861f4cd', - type: 'track', - userId: 'user12345', - event: 'test track with property', - traits: { - age: 23, - email: 'testmp@email.com', - firstname: 'Test Transformer', - }, - properties: { - test_prop_1: 'test prop', - test_prop_2: 1232, - }, - timeStamp: '2020-04-17T20:25:31.401+05:30', - }, - ], - }, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - statusCode: 200, - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'segment', - description: 'Test 3', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - ID: '1afmecIpsJm7D72aRTksxyODrwR', - Name: 'Segment', - DestinationDefinition: { - ID: '1afjjahf0X5lSyNze7Xh7aqJs11', - Name: 'SEGMENT', - DisplayName: 'Segment', - Config: { - excludeKeys: [], - includeKeys: [], - }, - }, - Config: { - writeKey: 'abcdefghijklmnopqrstuvwxyz', - }, - Enabled: true, - Transformations: [], - IsProcessorEnabled: true, - }, - message: { - channel: 'web', - context: { - app: { - build: '1.0.0', - name: 'RudderLabs JavaScript SDK', - namespace: 'com.rudderlabs.javascript', - version: '1.1.1-rc.2', - }, - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.1.1-rc.2', - }, - locale: 'en-GB', - os: { - name: '', - version: '', - }, - page: { - path: '/tests/html/index4.html', - referrer: '', - search: '', - title: '', - url: 'http://localhost/tests/html/index4.html', - }, - screen: { - density: 2, - }, - traits: { - age: 23, - email: 'testmp@rudderstack.com', - firstname: 'Test Kafka', - }, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36', - }, - integrations: { - All: true, - }, - messageId: '258b77c6-442d-4bdc-8729-f0e4cef41353', - name: 'home', - originalTimestamp: '2020-04-17T14:55:31.367Z', - properties: { - path: '/tests/html/index4.html', - referrer: '', - search: '', - title: '', - url: 'http://localhost/tests/html/index4.html', - }, - receivedAt: '2020-04-17T20:25:31.381+05:30', - request_ip: '[::1]:57363', - sentAt: '2020-04-17T14:55:31.367Z', - timestamp: '2020-04-17T20:25:31.381+05:30', - type: 'page', - userId: 'user12345', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://api.segment.io/v1/batch', - headers: { - 'Content-Type': 'application/json', - Authorization: 'Basic YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXo6', - }, - params: {}, - body: { - JSON: { - batch: [ - { - type: 'page', - userId: 'user12345', - traits: { - age: 23, - email: 'testmp@rudderstack.com', - firstname: 'Test Kafka', - }, - properties: { - path: '/tests/html/index4.html', - referrer: '', - search: '', - title: '', - url: 'http://localhost/tests/html/index4.html', - }, - timeStamp: '2020-04-17T20:25:31.381+05:30', - }, - ], - }, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: 'user12345', - statusCode: 200, - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'segment', - description: 'Test 4', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - ID: '1afmecIpsJm7D72aRTksxyODrwR', - Name: 'Segment', - DestinationDefinition: { - ID: '1afjjahf0X5lSyNze7Xh7aqJs11', - Name: 'SEGMENT', - DisplayName: 'Segment', - Config: { - excludeKeys: [], - includeKeys: [], - }, - }, - Config: { - writeKey: 'abcdefghijklmnopqrstuvwxyz', - }, - Enabled: true, - Transformations: [], - IsProcessorEnabled: true, - }, - message: { - anonymousId: 'ac7722c2-ccb6-4ae2-baf6-1effe861f4cd', - channel: 'web', - context: { - app: { - build: '1.0.0', - name: 'RudderLabs JavaScript SDK', - namespace: 'com.rudderlabs.javascript', - version: '1.1.1-rc.2', - }, - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.1.1-rc.2', - }, - locale: 'en-GB', - os: { - name: '', - version: '', - }, - page: { - path: '/tests/html/index4.html', - referrer: '', - search: '', - title: '', - url: 'http://localhost/tests/html/index4.html', - }, - screen: { - density: 2, - }, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36', - }, - event: 'test track with property', - integrations: { - All: true, - }, - messageId: '584fde02-901a-4964-a4a0-4078b999d5b2', - originalTimestamp: '2020-04-17T14:55:31.372Z', - properties: { - test_prop_1: 'test prop', - test_prop_2: 1232, - }, - receivedAt: '2020-04-17T20:25:31.401+05:30', - request_ip: '[::1]:57365', - sentAt: '2020-04-17T14:55:31.372Z', - timestamp: '2020-04-17T20:25:31.401+05:30', - type: 'track', - userId: 'user12345', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://api.segment.io/v1/batch', - headers: { - 'Content-Type': 'application/json', - Authorization: 'Basic YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXo6', - }, - params: {}, - body: { - JSON: { - batch: [ - { - anonymousId: 'ac7722c2-ccb6-4ae2-baf6-1effe861f4cd', - type: 'track', - userId: 'user12345', - event: 'test track with property', - properties: { - test_prop_1: 'test prop', - test_prop_2: 1232, - }, - timeStamp: '2020-04-17T20:25:31.401+05:30', - }, - ], - }, - XML: {}, - JSON_ARRAY: {}, - FORM: {}, - }, - files: {}, - userId: 'user12345', - statusCode: 200, - }, - statusCode: 200, - }, - ], - }, - }, - }, -]; + { + "name": "segment", + "description": "Test 0", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "ID": "1afmecIpsJm7D72aRTksxyODrwR", + "Name": "Segment", + "DestinationDefinition": { + "ID": "1afjjahf0X5lSyNze7Xh7aqJs11", + "Name": "SEGMENT", + "DisplayName": "Segment", + "Config": { + "excludeKeys": [], + "includeKeys": [] + } + }, + "Config": { + "writeKey": "abcdefghijklmnopqrstuvwxyz" + }, + "Enabled": true, + "Transformations": [], + "IsProcessorEnabled": true + }, + "message": { + "anonymousId": "ac7722c2-ccb6-4ae2-baf6-1effe861f4cd", + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.1-rc.2" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.1-rc.2" + }, + "locale": "en-GB", + "os": { + "name": "", + "version": "" + }, + "page": { + "path": "/tests/html/index4.html", + "referrer": "", + "search": "", + "title": "", + "url": "http://localhost/tests/html/index4.html" + }, + "screen": { + "density": 2 + }, + "traits": { + "age": 23, + "email": "testmp@rudderstack.com", + "firstname": "Test Kafka" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36" + }, + "integrations": { + "All": true + }, + "messageId": "258b77c6-442d-4bdc-8729-f0e4cef41353", + "name": "home", + "originalTimestamp": "2020-04-17T14:55:31.367Z", + "properties": { + "path": "/tests/html/index4.html", + "referrer": "", + "search": "", + "title": "", + "url": "http://localhost/tests/html/index4.html" + }, + "receivedAt": "2020-04-17T20:25:31.381+05:30", + "request_ip": "[::1]:57363", + "sentAt": "2020-04-17T14:55:31.367Z", + "timestamp": "2020-04-17T20:25:31.381+05:30", + "type": "page", + "userId": "user12345" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "userId": "user12345", + "endpoint": "https://api.segment.io/v1/batch", + "headers": { + "Content-Type": "application/json", + "Authorization": "Basic YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXo6" + }, + "params": {}, + "body": { + "JSON": { + "batch": [ + { + "anonymousId": "ac7722c2-ccb6-4ae2-baf6-1effe861f4cd", + "type": "page", + "userId": "user12345", + "traits": { + "age": 23, + "email": "testmp@rudderstack.com", + "firstname": "Test Kafka" + }, + "properties": { + "path": "/tests/html/index4.html", + "referrer": "", + "search": "", + "title": "", + "url": "http://localhost/tests/html/index4.html" + }, + "timeStamp": "2020-04-17T20:25:31.381+05:30" + } + ] + }, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "statusCode": 200 + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "segment", + "description": "Test 1", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "ID": "1afmecIpsJm7D72aRTksxyODrwR", + "Name": "Segment", + "DestinationDefinition": { + "ID": "1afjjahf0X5lSyNze7Xh7aqJs11", + "Name": "SEGMENT", + "DisplayName": "Segment", + "Config": { + "excludeKeys": [], + "includeKeys": [] + } + }, + "Config": { + "writeKey": "abcdefghijklmnopqrstuvwxyz" + }, + "Enabled": true, + "Transformations": [], + "IsProcessorEnabled": true + }, + "message": { + "anonymousId": "ac7722c2-ccb6-4ae2-baf6-1effe861f4cd", + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.1-rc.2" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.1-rc.2" + }, + "locale": "en-GB", + "os": { + "name": "", + "version": "" + }, + "page": { + "path": "/tests/html/index4.html", + "referrer": "", + "search": "", + "title": "", + "url": "http://localhost/tests/html/index4.html" + }, + "screen": { + "density": 2 + }, + "traits": { + "age": 23, + "email": "testmp@email.com", + "firstname": "Test Transformer" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36" + }, + "integrations": { + "All": true + }, + "messageId": "023a3a48-190a-4968-9394-a8e99b81a3c0", + "originalTimestamp": "2020-04-17T14:55:31.37Z", + "receivedAt": "2020-04-17T20:25:31.401+05:30", + "request_ip": "[::1]:57364", + "sentAt": "2020-04-17T14:55:31.37Z", + "timestamp": "2020-04-17T20:25:31.401+05:30", + "type": "identify", + "userId": "user12345" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "userId": "user12345", + "method": "POST", + "endpoint": "https://api.segment.io/v1/batch", + "headers": { + "Content-Type": "application/json", + "Authorization": "Basic YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXo6" + }, + "params": {}, + "body": { + "JSON": { + "batch": [ + { + "anonymousId": "ac7722c2-ccb6-4ae2-baf6-1effe861f4cd", + "type": "identify", + "userId": "user12345", + "traits": { + "age": 23, + "email": "testmp@email.com", + "firstname": "Test Transformer" + }, + "timeStamp": "2020-04-17T20:25:31.401+05:30" + } + ] + }, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "statusCode": 200 + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "segment", + "description": "Test 2", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "ID": "1afmecIpsJm7D72aRTksxyODrwR", + "Name": "Segment", + "DestinationDefinition": { + "ID": "1afjjahf0X5lSyNze7Xh7aqJs11", + "Name": "SEGMENT", + "DisplayName": "Segment", + "Config": { + "excludeKeys": [], + "includeKeys": [] + } + }, + "Config": { + "writeKey": "abcdefghijklmnopqrstuvwxyz" + }, + "Enabled": true, + "Transformations": [], + "IsProcessorEnabled": true + }, + "message": { + "anonymousId": "ac7722c2-ccb6-4ae2-baf6-1effe861f4cd", + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.1-rc.2" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.1-rc.2" + }, + "locale": "en-GB", + "os": { + "name": "", + "version": "" + }, + "page": { + "path": "/tests/html/index4.html", + "referrer": "", + "search": "", + "title": "", + "url": "http://localhost/tests/html/index4.html" + }, + "screen": { + "density": 2 + }, + "traits": { + "age": 23, + "email": "testmp@email.com", + "firstname": "Test Transformer" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36" + }, + "event": "test track with property", + "integrations": { + "All": true + }, + "messageId": "584fde02-901a-4964-a4a0-4078b999d5b2", + "originalTimestamp": "2020-04-17T14:55:31.372Z", + "properties": { + "test_prop_1": "test prop", + "test_prop_2": 1232 + }, + "receivedAt": "2020-04-17T20:25:31.401+05:30", + "request_ip": "[::1]:57365", + "sentAt": "2020-04-17T14:55:31.372Z", + "timestamp": "2020-04-17T20:25:31.401+05:30", + "type": "track", + "userId": "user12345" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "userId": "user12345", + "method": "POST", + "endpoint": "https://api.segment.io/v1/batch", + "headers": { + "Content-Type": "application/json", + "Authorization": "Basic YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXo6" + }, + "params": {}, + "body": { + "JSON": { + "batch": [ + { + "anonymousId": "ac7722c2-ccb6-4ae2-baf6-1effe861f4cd", + "type": "track", + "userId": "user12345", + "event": "test track with property", + "traits": { + "age": 23, + "email": "testmp@email.com", + "firstname": "Test Transformer" + }, + "properties": { + "test_prop_1": "test prop", + "test_prop_2": 1232 + }, + "timeStamp": "2020-04-17T20:25:31.401+05:30" + } + ] + }, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "statusCode": 200 + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "segment", + "description": "Test 3", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "ID": "1afmecIpsJm7D72aRTksxyODrwR", + "Name": "Segment", + "DestinationDefinition": { + "ID": "1afjjahf0X5lSyNze7Xh7aqJs11", + "Name": "SEGMENT", + "DisplayName": "Segment", + "Config": { + "excludeKeys": [], + "includeKeys": [] + } + }, + "Config": { + "writeKey": "abcdefghijklmnopqrstuvwxyz" + }, + "Enabled": true, + "Transformations": [], + "IsProcessorEnabled": true + }, + "message": { + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.1-rc.2" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.1-rc.2" + }, + "locale": "en-GB", + "os": { + "name": "", + "version": "" + }, + "page": { + "path": "/tests/html/index4.html", + "referrer": "", + "search": "", + "title": "", + "url": "http://localhost/tests/html/index4.html" + }, + "screen": { + "density": 2 + }, + "traits": { + "age": 23, + "email": "testmp@rudderstack.com", + "firstname": "Test Kafka" + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36" + }, + "integrations": { + "All": true + }, + "messageId": "258b77c6-442d-4bdc-8729-f0e4cef41353", + "name": "home", + "originalTimestamp": "2020-04-17T14:55:31.367Z", + "properties": { + "path": "/tests/html/index4.html", + "referrer": "", + "search": "", + "title": "", + "url": "http://localhost/tests/html/index4.html" + }, + "receivedAt": "2020-04-17T20:25:31.381+05:30", + "request_ip": "[::1]:57363", + "sentAt": "2020-04-17T14:55:31.367Z", + "timestamp": "2020-04-17T20:25:31.381+05:30", + "type": "page", + "userId": "user12345" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.segment.io/v1/batch", + "headers": { + "Content-Type": "application/json", + "Authorization": "Basic YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXo6" + }, + "params": {}, + "body": { + "JSON": { + "batch": [ + { + "type": "page", + "userId": "user12345", + "traits": { + "age": 23, + "email": "testmp@rudderstack.com", + "firstname": "Test Kafka" + }, + "properties": { + "path": "/tests/html/index4.html", + "referrer": "", + "search": "", + "title": "", + "url": "http://localhost/tests/html/index4.html" + }, + "timeStamp": "2020-04-17T20:25:31.381+05:30" + } + ] + }, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "user12345", + "statusCode": 200 + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "segment", + "description": "Test 4", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "ID": "1afmecIpsJm7D72aRTksxyODrwR", + "Name": "Segment", + "DestinationDefinition": { + "ID": "1afjjahf0X5lSyNze7Xh7aqJs11", + "Name": "SEGMENT", + "DisplayName": "Segment", + "Config": { + "excludeKeys": [], + "includeKeys": [] + } + }, + "Config": { + "writeKey": "abcdefghijklmnopqrstuvwxyz" + }, + "Enabled": true, + "Transformations": [], + "IsProcessorEnabled": true + }, + "message": { + "anonymousId": "ac7722c2-ccb6-4ae2-baf6-1effe861f4cd", + "channel": "web", + "context": { + "app": { + "build": "1.0.0", + "name": "RudderLabs JavaScript SDK", + "namespace": "com.rudderlabs.javascript", + "version": "1.1.1-rc.2" + }, + "library": { + "name": "RudderLabs JavaScript SDK", + "version": "1.1.1-rc.2" + }, + "locale": "en-GB", + "os": { + "name": "", + "version": "" + }, + "page": { + "path": "/tests/html/index4.html", + "referrer": "", + "search": "", + "title": "", + "url": "http://localhost/tests/html/index4.html" + }, + "screen": { + "density": 2 + }, + "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36" + }, + "event": "test track with property", + "integrations": { + "All": true + }, + "messageId": "584fde02-901a-4964-a4a0-4078b999d5b2", + "originalTimestamp": "2020-04-17T14:55:31.372Z", + "properties": { + "test_prop_1": "test prop", + "test_prop_2": 1232 + }, + "receivedAt": "2020-04-17T20:25:31.401+05:30", + "request_ip": "[::1]:57365", + "sentAt": "2020-04-17T14:55:31.372Z", + "timestamp": "2020-04-17T20:25:31.401+05:30", + "type": "track", + "userId": "user12345" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.segment.io/v1/batch", + "headers": { + "Content-Type": "application/json", + "Authorization": "Basic YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXo6" + }, + "params": {}, + "body": { + "JSON": { + "batch": [ + { + "anonymousId": "ac7722c2-ccb6-4ae2-baf6-1effe861f4cd", + "type": "track", + "userId": "user12345", + "event": "test track with property", + "properties": { + "test_prop_1": "test prop", + "test_prop_2": 1232 + }, + "timeStamp": "2020-04-17T20:25:31.401+05:30" + } + ] + }, + "XML": {}, + "JSON_ARRAY": {}, + "FORM": {} + }, + "files": {}, + "userId": "user12345", + "statusCode": 200 + }, + "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 index c6a303d1ff..6d79e556eb 100644 --- a/test/integrations/destinations/sendgrid/router/data.ts +++ b/test/integrations/destinations/sendgrid/router/data.ts @@ -1,8 +1,10 @@ +import { FEATURES } from '../../../../../src/v0/util/tags'; + export const data = [ { name: 'sendgrid', description: 'Router Test Case', - feature: 'router', + feature: FEATURES.ROUTER, module: 'destination', version: 'v0', input: { @@ -33,7 +35,9 @@ export const data = [ clickTrackingEnableText: false, }, }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, message: { channel: 'web', context: { @@ -43,7 +47,10 @@ 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 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', locale: 'en-US', @@ -58,9 +65,21 @@ export const data = [ event: 'testing', properties: { personalizations: [ - { to: [{ email: 'a@g.com' }, { name: 'hello' }], subject: 'hey there' }, + { + to: [ + { + email: 'a@g.com', + }, + { + name: 'hello', + }, + ], + subject: 'hey there', + }, ], - from: { email: 'ankit@rudderstack.com' }, + from: { + email: 'ankit@rudderstack.com', + }, }, integrations: { All: true }, sentAt: '2019-10-14T09:03:22.563Z', @@ -84,8 +103,19 @@ export const data = [ FORM: {}, JSON_ARRAY: {}, JSON: { - personalizations: [{ to: [{ email: 'a@g.com' }], subject: 'hey there' }], - from: { email: 'ankit@rudderstack.com' }, + 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: [ @@ -101,11 +131,18 @@ export const data = [ files: {}, method: 'POST', params: {}, - headers: { Authorization: 'Bearer apikey', 'Content-Type': 'application/json' }, + headers: { + Authorization: 'Bearer apikey', + 'Content-Type': 'application/json', + }, version: '1', endpoint: 'https://api.sendgrid.com/v3/mail/send', }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { diff --git a/test/integrations/destinations/sendinblue/router/data.ts b/test/integrations/destinations/sendinblue/router/data.ts index ef96b3f55f..31781e4c4f 100644 --- a/test/integrations/destinations/sendinblue/router/data.ts +++ b/test/integrations/destinations/sendinblue/router/data.ts @@ -18,8 +18,18 @@ export const data = [ 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 }, + { + product_id: 1234, + product_name: 'Track Pants', + amount: 1, + price: 220, + }, + { + product_id: 5768, + product_name: 'T-Shirt', + amount: 5, + price: 1058, + }, ], }, context: { @@ -38,13 +48,20 @@ export const data = [ anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', originalTimestamp: '2021-01-03T17:02:53.193Z', }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, destination: { Config: { apiKey: 'apiKey123', clientKey: 'clientKey123', doi: false, - contactAttributeMapping: [{ from: 'location', to: 'LOCATION' }], + contactAttributeMapping: [ + { + from: 'location', + to: 'LOCATION', + }, + ], sendTraitsInTrack: true, }, }, @@ -55,9 +72,14 @@ export const data = [ sentAt: '2021-01-03T17:02:53.195Z', channel: 'web', name: 'New Page', - properties: { url: 'https://www.google.com/', title: 'Google home' }, + properties: { + url: 'https://www.google.com/', + title: 'Google home', + }, context: { - traits: { email: 'john_doe@example.com' }, + traits: { + email: 'john_doe@example.com', + }, page: { url: 'http://127.0.0.1:7307/Testing/test/ourSdk.html', path: '/Testing/test/ourSdk.html', @@ -75,7 +97,9 @@ export const data = [ anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', originalTimestamp: '2021-01-03T17:02:53.193Z', }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, destination: { Config: { apiKey: 'apiKey123', @@ -101,20 +125,39 @@ export const data = [ newEmail: 'alex_root@example.com', role: 'SDE', }, - context: { externalId: [{ type: 'sendinblueIncludeListIds', id: [1, 2] }] }, - integrations: { All: true, sendinblue: { emailBlacklisted: true } }, + 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, userId: 'u1' }, + metadata: { + jobId: 3, + }, destination: { Config: { apiKey: 'apiKey123', clientKey: 'clientKey123', doi: false, - contactAttributeMapping: [{ from: 'location', to: 'LOCATION' }], + contactAttributeMapping: [ + { + from: 'location', + to: 'LOCATION', + }, + ], }, }, }, @@ -138,7 +181,9 @@ export const data = [ anonymousId: '97c46c81-3140-456d-b2a9-690d70aaca35', originalTimestamp: '2021-01-03T17:02:53.193Z', }, - metadata: { jobId: 4, userId: 'u1' }, + metadata: { + jobId: 4, + }, destination: { Config: { apiKey: 'apiKey123', @@ -171,8 +216,18 @@ export const data = [ 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' }, + { + 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', @@ -191,7 +246,10 @@ export const data = [ }, endpoint: 'https://in-automate.sendinblue.com/api/v2/trackEvent', files: {}, - headers: { 'Content-Type': 'application/json', 'ma-key': 'clientKey123' }, + headers: { + 'Content-Type': 'application/json', + 'ma-key': 'clientKey123', + }, method: 'POST', params: {}, type: 'REST', @@ -201,12 +259,21 @@ export const data = [ Config: { apiKey: 'apiKey123', clientKey: 'clientKey123', - contactAttributeMapping: [{ from: 'location', to: 'LOCATION' }], + contactAttributeMapping: [ + { + from: 'location', + to: 'LOCATION', + }, + ], doi: false, sendTraitsInTrack: true, }, }, - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [ + { + jobId: 1, + }, + ], statusCode: 200, }, { @@ -229,7 +296,10 @@ export const data = [ }, endpoint: 'https://in-automate.sendinblue.com/api/v2/trackPage', files: {}, - headers: { 'Content-Type': 'application/json', 'ma-key': 'clientKey123' }, + headers: { + 'Content-Type': 'application/json', + 'ma-key': 'clientKey123', + }, method: 'POST', params: {}, type: 'REST', @@ -244,7 +314,11 @@ export const data = [ templateId: 3, }, }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], statusCode: 200, }, { @@ -272,7 +346,10 @@ export const data = [ }, endpoint: 'https://api.sendinblue.com/v3/contacts', files: {}, - headers: { 'Content-Type': 'application/json', 'api-key': 'apiKey123' }, + headers: { + 'Content-Type': 'application/json', + 'api-key': 'apiKey123', + }, method: 'POST', params: {}, type: 'REST', @@ -282,17 +359,30 @@ export const data = [ Config: { apiKey: 'apiKey123', clientKey: 'clientKey123', - contactAttributeMapping: [{ from: 'location', to: 'LOCATION' }], + contactAttributeMapping: [ + { + from: 'location', + to: 'LOCATION', + }, + ], doi: false, }, }, - metadata: [{ jobId: 3, userId: 'u1' }], + metadata: [ + { + jobId: 3, + }, + ], statusCode: 200, }, { batched: false, error: 'sendinblueIncludeListIds is required to create a contact using DOI', - metadata: [{ jobId: 4, userId: 'u1' }], + metadata: [ + { + jobId: 4, + }, + ], statTags: { destType: 'SENDINBLUE', errorCategory: 'dataValidation', diff --git a/test/integrations/destinations/serenytics/router/data.ts b/test/integrations/destinations/serenytics/router/data.ts index 1e0226eab0..2edbe58257 100644 --- a/test/integrations/destinations/serenytics/router/data.ts +++ b/test/integrations/destinations/serenytics/router/data.ts @@ -26,15 +26,24 @@ export const data = [ 'https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760', }, }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, message: { event: 'New Alert', type: 'track', sentAt: '2021-01-03T17:02:53.195Z', channel: 'web', - properties: { message: 'Please check the alert', brand: 'Zara', price: '12000' }, + properties: { + message: 'Please check the alert', + brand: 'Zara', + price: '12000', + }, context: { - os: { name: '', version: '' }, + os: { + name: '', + version: '', + }, app: { name: 'RudderLabs JavaScript SDK', build: '1.0.0', @@ -42,8 +51,13 @@ export const data = [ namespace: 'com.rudderlabs.javascript', }, locale: 'en-US', - screen: { density: 2 }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.1.11' }, + 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', @@ -94,7 +108,11 @@ export const data = [ files: {}, }, ], - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [ + { + jobId: 1, + }, + ], batched: false, statusCode: 200, destination: { @@ -160,15 +178,24 @@ export const data = [ ], }, }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, message: { event: 'Order Completed', type: 'track', sentAt: '2021-01-03T17:02:53.195Z', channel: 'web', - properties: { message: 'Please check the alert', brand: 'Zara', price: '12000' }, + properties: { + message: 'Please check the alert', + brand: 'Zara', + price: '12000', + }, context: { - os: { name: '', version: '' }, + os: { + name: '', + version: '', + }, app: { name: 'RudderLabs JavaScript SDK', build: '1.0.0', @@ -176,8 +203,13 @@ export const data = [ namespace: 'com.rudderlabs.javascript', }, locale: 'en-US', - screen: { density: 2 }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.1.11' }, + 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', @@ -280,7 +312,11 @@ export const data = [ files: {}, }, ], - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { @@ -360,7 +396,9 @@ export const data = [ ], }, }, - metadata: { jobId: 3, userId: 'u1' }, + metadata: { + jobId: 3, + }, message: { messageId: 'ec5481b6-a926-4d2e-b293-0b3a77c4d3be', originalTimestamp: '2022-06-22T10:57:58Z', @@ -381,10 +419,18 @@ export const data = [ type: 'ios', attTrackingStatus: 3, }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, locale: 'en-US', - os: { name: 'iOS', version: '14.4.1' }, - screen: { density: 2 }, + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, }, traits: { email: 'testuser@google.com', @@ -439,7 +485,11 @@ export const data = [ endpoint: 'https://api.serenytics.com/api/data_source/5dc8508e-0946-47fc-8ed8-f67307c407f1/push/997877c6358621beb1f86dc320ac822b9f069760', }, - metadata: [{ jobId: 3, userId: 'u1' }], + metadata: [ + { + jobId: 3, + }, + ], batched: false, statusCode: 200, destination: { diff --git a/test/integrations/destinations/signl4/router/data.ts b/test/integrations/destinations/signl4/router/data.ts index 0fcf55d046..582c02e26d 100644 --- a/test/integrations/destinations/signl4/router/data.ts +++ b/test/integrations/destinations/signl4/router/data.ts @@ -27,15 +27,24 @@ export const data = [ eventToTitleMapping: [], }, }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, message: { event: 'New Alert', type: 'track', sentAt: '2021-01-03T17:02:53.195Z', channel: 'web', - properties: { message: 'Please check the alert', brand: 'Zara', price: '12000' }, + properties: { + message: 'Please check the alert', + brand: 'Zara', + price: '12000', + }, context: { - os: { name: '', version: '' }, + os: { + name: '', + version: '', + }, app: { name: 'RudderLabs JavaScript SDK', build: '1.0.0', @@ -43,8 +52,13 @@ export const data = [ namespace: 'com.rudderlabs.javascript', }, locale: 'en-US', - screen: { density: 2 }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.1.11' }, + 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', @@ -72,7 +86,9 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://connect.signl4.com/webhook/dummyApiKey', - headers: { 'Content-Type': 'application/json' }, + headers: { + 'Content-Type': 'application/json', + }, params: {}, body: { JSON: { @@ -92,7 +108,11 @@ export const data = [ }, files: {}, }, - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [ + { + jobId: 1, + }, + ], batched: false, statusCode: 200, destination: { @@ -143,18 +163,32 @@ export const data = [ s4StatusValue: 'new', s4StatusProperty: '', s4Filter: false, - eventToTitleMapping: [{ from: 'New Alert', to: 'Alert Created' }], + eventToTitleMapping: [ + { + from: 'New Alert', + to: 'Alert Created', + }, + ], }, }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, message: { event: 'New Alert', type: 'identify', sentAt: '2021-01-03T17:02:53.195Z', channel: 'web', - properties: { message: 'Please check the alert', brand: 'Zara', price: '12000' }, + properties: { + message: 'Please check the alert', + brand: 'Zara', + price: '12000', + }, context: { - os: { name: '', version: '' }, + os: { + name: '', + version: '', + }, app: { name: 'RudderLabs JavaScript SDK', build: '1.0.0', @@ -162,8 +196,13 @@ export const data = [ namespace: 'com.rudderlabs.javascript', }, locale: 'en-US', - screen: { density: 2 }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.1.11' }, + 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', @@ -200,10 +239,19 @@ export const data = [ s4StatusValue: 'new', s4StatusProperty: '', s4Filter: false, - eventToTitleMapping: [{ from: 'New Alert', to: 'Alert Created' }], + eventToTitleMapping: [ + { + from: 'New Alert', + to: 'Alert Created', + }, + ], }, }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], statTags: { errorCategory: 'dataValidation', destType: 'SIGNL4', diff --git a/test/integrations/destinations/singular/router/data.ts b/test/integrations/destinations/singular/router/data.ts index 9074ef2fdc..d9c9f7a8cb 100644 --- a/test/integrations/destinations/singular/router/data.ts +++ b/test/integrations/destinations/singular/router/data.ts @@ -14,13 +14,21 @@ export const data = [ Config: { apiKey: 'dummyApiKey', sessionEventList: [ - { sessionEventName: 'mysessionevent' }, - { sessionEventName: 'randomuser' }, - { sessionEventName: 'titanium' }, + { + sessionEventName: 'mysessionevent', + }, + { + sessionEventName: 'randomuser', + }, + { + sessionEventName: 'titanium', + }, ], }, }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, message: { type: 'track', event: 'mysessionevent', @@ -44,17 +52,32 @@ export const data = [ adTrackingEnabled: 'true', token: 'testDeviceToken', }, - library: { name: 'com.rudderstack.android.sdk.core', version: '0.1.4' }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '0.1.4', + }, locale: 'en-US', - network: { carrier: 'Android', bluetooth: false, cellular: true, wifi: true }, + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, campaign: { source: 'google', medium: 'medium', term: 'keyword', content: 'some content', }, - os: { name: 'Android', version: '9' }, - screen: { density: 420, height: 1794, width: 1080 }, + os: { + name: 'Android', + version: '9', + }, + screen: { + density: 420, + height: 1794, + width: 1080, + }, timezone: 'Asia/Mumbai', userAgent: 'Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)', @@ -70,7 +93,7 @@ export const data = [ receipt_signature: '1234dfghnh', referring_application: '2134dfg', total: 20, - revenue: 15, + revenue: 15.0, shipping: 22, tax: 1, discount: 1.5, @@ -89,7 +112,13 @@ export const data = [ url: 'https://www.website.com/product/path', image_url: 'https://www.website.com/product/path.jpg', }, - { sku: 'F-32', name: 'UNO', price: 3.45, quantity: 2, category: 'Games' }, + { + sku: 'F-32', + name: 'UNO', + price: 3.45, + quantity: 2, + category: 'Games', + }, ], }, timestamp: '2021-09-01T15:46:51.000Z', @@ -142,19 +171,34 @@ export const data = [ c: 'wifi', a: 'dummyApiKey', }, - body: { JSON: {}, JSON_ARRAY: {}, XML: {}, FORM: {} }, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, files: {}, }, - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [ + { + jobId: 1, + }, + ], batched: false, statusCode: 200, destination: { Config: { apiKey: 'dummyApiKey', sessionEventList: [ - { sessionEventName: 'mysessionevent' }, - { sessionEventName: 'randomuser' }, - { sessionEventName: 'titanium' }, + { + sessionEventName: 'mysessionevent', + }, + { + sessionEventName: 'randomuser', + }, + { + sessionEventName: 'titanium', + }, ], }, }, @@ -179,13 +223,21 @@ export const data = [ Config: { apiKey: 'dummyApiKey', sessionEventList: [ - { sessionEventName: 'mysessionevent' }, - { sessionEventName: 'randomuser' }, - { sessionEventName: 'titanium' }, + { + sessionEventName: 'mysessionevent', + }, + { + sessionEventName: 'randomuser', + }, + { + sessionEventName: 'titanium', + }, ], }, }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, message: { type: 'track', event: 'mysessionevent', @@ -209,17 +261,32 @@ export const data = [ adTrackingEnabled: 'true', token: 'testDeviceToken', }, - library: { name: 'com.rudderstack.android.sdk.core', version: '0.1.4' }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '0.1.4', + }, locale: 'en-US', - network: { carrier: 'Android', bluetooth: false, cellular: true, wifi: true }, + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, campaign: { source: 'google', medium: 'medium', term: 'keyword', content: 'some content', }, - os: { name: 'Android', version: '9' }, - screen: { density: 420, height: 1794, width: 1080 }, + os: { + name: 'Android', + version: '9', + }, + screen: { + density: 420, + height: 1794, + width: 1080, + }, timezone: 'Asia/Mumbai', userAgent: 'Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)', @@ -235,7 +302,7 @@ export const data = [ receipt_signature: '1234dfghnh', referring_application: '2134dfg', total: 20, - revenue: 15, + revenue: 15.0, shipping: 22, tax: 1, discount: 1.5, @@ -254,7 +321,13 @@ export const data = [ url: 'https://www.website.com/product/path', image_url: 'https://www.website.com/product/path.jpg', }, - { sku: 'F-32', name: 'UNO', price: 3.45, quantity: 2, category: 'Games' }, + { + sku: 'F-32', + name: 'UNO', + price: 3.45, + quantity: 2, + category: 'Games', + }, ], }, timestamp: '2021-09-01T15:46:51.000Z', @@ -307,19 +380,34 @@ export const data = [ c: 'wifi', a: 'dummyApiKey', }, - body: { JSON: {}, JSON_ARRAY: {}, XML: {}, FORM: {} }, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, files: {}, }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { Config: { apiKey: 'dummyApiKey', sessionEventList: [ - { sessionEventName: 'mysessionevent' }, - { sessionEventName: 'randomuser' }, - { sessionEventName: 'titanium' }, + { + sessionEventName: 'mysessionevent', + }, + { + sessionEventName: 'randomuser', + }, + { + sessionEventName: 'titanium', + }, ], }, }, @@ -344,13 +432,21 @@ export const data = [ Config: { apiKey: 'dummyApiKey', sessionEventList: [ - { sessionEventName: 'mysessionevent' }, - { sessionEventName: 'randomuser' }, - { sessionEventName: 'titanium' }, + { + sessionEventName: 'mysessionevent', + }, + { + sessionEventName: 'randomuser', + }, + { + sessionEventName: 'titanium', + }, ], }, }, - metadata: { jobId: 3, userId: 'u1' }, + metadata: { + jobId: 3, + }, message: { type: 'track', event: 'mysessionevent', @@ -374,17 +470,32 @@ export const data = [ adTrackingEnabled: 'true', token: 'testDeviceToken', }, - library: { name: 'com.rudderstack.android.sdk.core', version: '0.1.4' }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '0.1.4', + }, locale: 'en-US', - network: { carrier: 'Android', bluetooth: false, cellular: true, wifi: true }, + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, campaign: { source: 'google', medium: 'medium', term: 'keyword', content: 'some content', }, - os: { name: 'Android', version: '9' }, - screen: { density: 420, height: 1794, width: 1080 }, + os: { + name: 'Android', + version: '9', + }, + screen: { + density: 420, + height: 1794, + width: 1080, + }, timezone: 'Asia/Mumbai', userAgent: 'Dalvik/2.1.0 (Linux; U; Android 9; Android SDK built for x86 Build/PSR1.180720.075)', @@ -400,7 +511,7 @@ export const data = [ receipt_signature: '1234dfghnh', referring_application: '2134dfg', total: 20, - revenue: 15, + revenue: 15.0, shipping: 22, tax: 1, discount: 1.5, @@ -419,7 +530,13 @@ export const data = [ url: 'https://www.website.com/product/path', image_url: 'https://www.website.com/product/path.jpg', }, - { sku: 'F-32', name: 'UNO', price: 3.45, quantity: 2, category: 'Games' }, + { + sku: 'F-32', + name: 'UNO', + price: 3.45, + quantity: 2, + category: 'Games', + }, ], }, timestamp: '2021-09-01T15:46:51.000Z', @@ -472,19 +589,34 @@ export const data = [ c: 'wifi', a: 'dummyApiKey', }, - body: { JSON: {}, JSON_ARRAY: {}, XML: {}, FORM: {} }, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, files: {}, }, - metadata: [{ jobId: 3, userId: 'u1' }], + metadata: [ + { + jobId: 3, + }, + ], batched: false, statusCode: 200, destination: { Config: { apiKey: 'dummyApiKey', sessionEventList: [ - { sessionEventName: 'mysessionevent' }, - { sessionEventName: 'randomuser' }, - { sessionEventName: 'titanium' }, + { + sessionEventName: 'mysessionevent', + }, + { + sessionEventName: 'randomuser', + }, + { + sessionEventName: 'titanium', + }, ], }, }, @@ -512,8 +644,15 @@ export const data = [ userId: '68e214f1-ac84-4241-b27d-78a18f59f21e', channel: 'mobile', context: { - os: { name: 'iOS', version: '16.2' }, - app: { build: '5013', version: '0.5.13', namespace: 'com.yabimoney' }, + os: { + name: 'iOS', + version: '16.2', + }, + app: { + build: '5013', + version: '0.5.13', + namespace: 'com.yabimoney', + }, device: { id: 'cc06ff5e-838b-4e33-9d90-4ab5a6068bec', name: 'iPhone', @@ -525,7 +664,11 @@ export const data = [ attTrackingStatus: 0, }, locale: 'en-AE', - screen: { width: 844, height: 390, density: 3 }, + screen: { + width: 844, + height: 390, + density: 3, + }, traits: { phone: '', userId: '68e214f1-ac84-4241-b27d-78a18f59f21e', @@ -534,8 +677,15 @@ export const data = [ yabi_user_id: 'uCh5IS8p', subscription_type: '', }, - library: { name: 'rudder-ios-library', version: '1.8.0' }, - network: { wifi: true, carrier: 'etisalat', cellular: false }, + library: { + name: 'rudder-ios-library', + version: '1.8.0', + }, + network: { + wifi: true, + carrier: 'etisalat', + cellular: false, + }, timezone: 'Asia/Dubai', sessionId: 1674138119, }, @@ -545,7 +695,9 @@ export const data = [ receivedAt: '2023-01-19T14:25:25.465Z', request_ip: '87.201.98.151', anonymousId: 'cc06ff5e-838b-4e33-9d90-4ab5a6068bec', - integrations: { All: true }, + integrations: { + All: true, + }, originalTimestamp: '2023-01-19T14:25:06.301Z', }, destination: { @@ -553,14 +705,29 @@ export const data = [ Config: { apiKey: 'apiKey', apiSecret: 'dummyApiSecret', - sessionEventList: [{ sessionEventName: 'test_event' }], - blacklistedEvents: [{ eventName: '' }], - whitelistedEvents: [{ eventName: '' }], + sessionEventList: [ + { + sessionEventName: 'test_event', + }, + ], + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], eventFilteringOption: 'whitelistedEvents', eventDelivery: false, eventDeliveryTS: 1663919255086, }, - liveEventsConfig: { eventDelivery: false, eventDeliveryTS: 1663919255086 }, + liveEventsConfig: { + eventDelivery: false, + eventDeliveryTS: 1663919255086, + }, ID: '2EhlBrBduwN2NX4pJ7nrVDHAz6C', workspaceId: '1sUXvPs0hYgjBxSfjG4gqnRFNoP', DestinationDefinition: { @@ -654,7 +821,6 @@ export const data = [ eventType: 'track', sourceDefinitionId: '1TW48i2bIzEl1HPf825cEznfIM8', destinationDefinitionId: '', - userId: 'u1', }, }, ], @@ -690,7 +856,12 @@ export const data = [ a: 'apiKey', e: {}, }, - body: { JSON: {}, JSON_ARRAY: {}, XML: {}, FORM: {} }, + body: { + JSON: {}, + JSON_ARRAY: {}, + XML: {}, + FORM: {}, + }, files: {}, }, metadata: [ @@ -724,7 +895,6 @@ export const data = [ eventType: 'track', sourceDefinitionId: '1TW48i2bIzEl1HPf825cEznfIM8', destinationDefinitionId: '', - userId: 'u1', }, ], batched: false, @@ -734,14 +904,29 @@ export const data = [ Config: { apiKey: 'apiKey', apiSecret: 'dummyApiSecret', - sessionEventList: [{ sessionEventName: 'test_event' }], - blacklistedEvents: [{ eventName: '' }], - whitelistedEvents: [{ eventName: '' }], + sessionEventList: [ + { + sessionEventName: 'test_event', + }, + ], + blacklistedEvents: [ + { + eventName: '', + }, + ], + whitelistedEvents: [ + { + eventName: '', + }, + ], eventFilteringOption: 'whitelistedEvents', eventDelivery: false, eventDeliveryTS: 1663919255086, }, - liveEventsConfig: { eventDelivery: false, eventDeliveryTS: 1663919255086 }, + liveEventsConfig: { + eventDelivery: false, + eventDeliveryTS: 1663919255086, + }, ID: '2EhlBrBduwN2NX4pJ7nrVDHAz6C', workspaceId: '1sUXvPs0hYgjBxSfjG4gqnRFNoP', DestinationDefinition: { diff --git a/test/integrations/destinations/slack/processor/data.ts b/test/integrations/destinations/slack/processor/data.ts index 07ec1a0b58..be05a13ab5 100644 --- a/test/integrations/destinations/slack/processor/data.ts +++ b/test/integrations/destinations/slack/processor/data.ts @@ -1,2013 +1,1982 @@ 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, - }, - ], - }, - }, - }, -]; + { + "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 diff --git a/test/integrations/destinations/slack/router/data.ts b/test/integrations/destinations/slack/router/data.ts index 349b1a486f..87b1fe3b22 100644 --- a/test/integrations/destinations/slack/router/data.ts +++ b/test/integrations/destinations/slack/router/data.ts @@ -17,13 +17,28 @@ export const data = [ ID: '1ZQUiJVMlmF7lfsdfXg7KXQnlLV', Name: 'SLACK', DisplayName: 'Slack', - Config: { excludeKeys: [], includeKeys: [] }, + Config: { + excludeKeys: [], + includeKeys: [], + }, }, Config: { eventChannelSettings: [ - { eventChannel: '#slack_integration', eventName: 'is', eventRegex: true }, - { eventChannel: '', eventName: '', eventRegex: false }, - { eventChannel: '', eventName: '', eventRegex: false }, + { + eventChannel: '#slack_integration', + eventName: 'is', + eventRegex: true, + }, + { + eventChannel: '', + eventName: '', + eventRegex: false, + }, + { + eventChannel: '', + eventName: '', + eventRegex: false, + }, ], eventTemplateSettings: [ { @@ -32,11 +47,22 @@ export const data = [ eventTemplate: '{{name}} performed {{event}} with {{properties.key1}} {{properties.key2}}', }, - { eventName: '', eventRegex: false, eventTemplate: '' }, + { + eventName: '', + eventRegex: false, + eventTemplate: '', + }, ], identifyTemplate: 'identified {{name}} with {{traits}}', webhookUrl: 'https://hooks.slack.com/services/THZM86VSS/BV9HZ2UN6/demo', - whitelistedTraitsSettings: [{ trait: 'hiji' }, { trait: '' }], + whitelistedTraitsSettings: [ + { + trait: 'hiji', + }, + { + trait: '', + }, + ], }, Enabled: true, Transformations: [], @@ -52,9 +78,15 @@ export const data = [ namespace: 'com.rudderlabs.javascript', version: '1.1.1-rc.1', }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.1.1-rc.1' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.1-rc.1', + }, locale: 'en-US', - os: { name: '', version: '' }, + os: { + name: '', + version: '', + }, page: { path: '/tests/html/script-test.html', referrer: 'http://localhost:1111/tests/html/', @@ -62,7 +94,9 @@ export const data = [ title: '', url: 'http://localhost:1111/tests/html/script-test.html', }, - screen: { density: 1.7999999523162842 }, + screen: { + density: 1.7999999523162842, + }, traits: { country: 'India', email: 'name@domain.com', @@ -72,7 +106,9 @@ export const data = [ 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 }, + integrations: { + All: true, + }, messageId: '9ecc0183-89ed-48bd-87eb-b2d8e1ca6780', originalTimestamp: '2020-03-23T03:46:30.916Z', properties: { @@ -96,7 +132,6 @@ export const data = [ jobId: 126, messageId: '9ecc0183-89ed-48bd-87eb-b2d8e1ca6780', sourceId: '1YhwKyDcKstudlGxkeN5p2wgsrp', - userId: 'u1', }, }, ], @@ -152,7 +187,6 @@ export const data = [ jobId: 126, messageId: '9ecc0183-89ed-48bd-87eb-b2d8e1ca6780', sourceId: '1YhwKyDcKstudlGxkeN5p2wgsrp', - userId: 'u1', }, ], statTags: { @@ -189,13 +223,28 @@ export const data = [ ID: '1ZQUiJVMlmF7lfsdfXg7KXQnlLV', Name: 'SLACK', DisplayName: 'Slack', - Config: { excludeKeys: [], includeKeys: [] }, + Config: { + excludeKeys: [], + includeKeys: [], + }, }, Config: { eventChannelSettings: [ - { eventChannel: '#slack_integration', eventName: 'is', eventRegex: true }, - { eventChannel: '', eventName: '', eventRegex: false }, - { eventChannel: '', eventName: '', eventRegex: false }, + { + eventChannel: '#slack_integration', + eventName: 'is', + eventRegex: true, + }, + { + eventChannel: '', + eventName: '', + eventRegex: false, + }, + { + eventChannel: '', + eventName: '', + eventRegex: false, + }, ], eventTemplateSettings: [ { @@ -204,11 +253,22 @@ export const data = [ eventTemplate: '{{name}} performed {{event}} with {{properties.key1}} {{properties.key2}}', }, - { eventName: '', eventRegex: false, eventTemplate: '' }, + { + eventName: '', + eventRegex: false, + eventTemplate: '', + }, ], identifyTemplate: 'identified {{name}} with {{traits}}', webhookUrl: 'https://hooks.slack.com/services/THZM86VSS/BV9HZ2UN6/demo', - whitelistedTraitsSettings: [{ trait: 'hiji' }, { trait: '' }], + whitelistedTraitsSettings: [ + { + trait: 'hiji', + }, + { + trait: '', + }, + ], }, Enabled: true, Transformations: [], @@ -224,11 +284,25 @@ export const data = [ namespace: 'com.rudderlabs.javascript', version: '1.1.1-rc.1', }, - library: { name: 'RudderLabs JavaScript SDK', 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 }, + os: { + name: '', + version: '', + }, + page: { + path: '', + referrer: '', + search: '', + title: '', + url: '', + }, + screen: { + density: 1.7999999523162842, + }, traits: { country: 'India', email: 'name@domain.com', @@ -244,7 +318,9 @@ export const data = [ hiji: 'hulala-1', name: 'my-name-1', }, - integrations: { All: true }, + 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', @@ -261,7 +337,6 @@ export const data = [ jobId: 123, messageId: '4aaecff2-a513-4bbf-9824-c471f4ac9777', sourceId: '1YhwKyDcKstudlGxkeN5p2wgsrp', - userId: 'u1', }, }, ], @@ -338,7 +413,6 @@ export const data = [ jobId: 123, messageId: '4aaecff2-a513-4bbf-9824-c471f4ac9777', sourceId: '1YhwKyDcKstudlGxkeN5p2wgsrp', - userId: 'u1', }, ], statusCode: 200, diff --git a/test/integrations/destinations/snapchat_conversion/router/data.ts b/test/integrations/destinations/snapchat_conversion/router/data.ts index 00aede7191..bfa9acd4d2 100644 --- a/test/integrations/destinations/snapchat_conversion/router/data.ts +++ b/test/integrations/destinations/snapchat_conversion/router/data.ts @@ -1,9 +1,11 @@ +import { FEATURES, IMPLEMENTATIONS, MODULES } from '../../../../../src/v0/util/tags'; + export const data = [ { name: 'snapchat_conversion', description: 'Test 0', - feature: 'router', - module: 'destination', + feature: FEATURES.ROUTER, + module: MODULES.DESTINATION, version: 'v0', input: { request: { @@ -15,7 +17,10 @@ export const data = [ originalTimestamp: '2022-04-22T10:57:58Z', anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', context: { - traits: { email: 'test@email.com', phone: '+91 2111111 ' }, + traits: { + email: 'test@email.com', + phone: '+91 2111111 ', + }, app: { build: '1.0.0', name: 'RudderLabs JavaScript SDK', @@ -30,24 +35,47 @@ export const data = [ type: 'ios', attTrackingStatus: 3, }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, locale: 'en-US', - os: { name: 'iOS', version: '14.4.1' }, - screen: { density: 2 }, + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, externalId: [ - { type: 'ga4AppInstanceId', id: 'f0dd99v4f979fb997ce453373900f891' }, + { + 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', event_conversion_type: 'web' }, - integrations: { All: true }, + properties: { + query: 't-shirts', + event_conversion_type: 'web', + }, + integrations: { + All: true, + }, sentAt: '2022-04-22T10:57:58Z', }, - metadata: { jobId: 1, userId: 'u1' }, - destination: { Config: { pixelId: 'dummyPixelId', apiKey: 'dummyApiKey' } }, + metadata: { + jobId: 1, + }, + destination: { + Config: { + pixelId: 'dummyPixelId', + apiKey: 'dummyApiKey', + }, + }, }, { message: { @@ -55,7 +83,10 @@ export const data = [ originalTimestamp: '2022-04-22T10:57:58Z', anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', context: { - traits: { email: 'test@email.com', phone: '+91 2111111 ' }, + traits: { + email: 'test@email.com', + phone: '+91 2111111 ', + }, app: { build: '1.0.0', name: 'RudderLabs JavaScript SDK', @@ -70,24 +101,47 @@ export const data = [ type: 'ios', attTrackingStatus: 3, }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, locale: 'en-US', - os: { name: 'iOS', version: '14.4.1' }, - screen: { density: 2 }, + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, externalId: [ - { type: 'ga4AppInstanceId', id: 'f0dd99v4f979fb997ce453373900f891' }, + { + 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', event_conversion_type: 'web' }, - integrations: { All: true }, + properties: { + query: 't-shirts', + event_conversion_type: 'web', + }, + integrations: { + All: true, + }, sentAt: '2022-04-22T10:57:58Z', }, - metadata: { jobId: 2, userId: 'u1' }, - destination: { Config: { pixelId: 'dummyPixelId', apiKey: 'dummyApiKey' } }, + metadata: { + jobId: 2, + }, + destination: { + Config: { + pixelId: 'dummyPixelId', + apiKey: 'dummyApiKey', + }, + }, }, { message: { @@ -95,7 +149,10 @@ export const data = [ originalTimestamp: '2022-04-22T10:57:58Z', anonymousId: 'ea5cfab2-3961-4d8a-8187-3d1858c99090', context: { - traits: { email: 'test@email.com', phone: '+91 2111111 ' }, + traits: { + email: 'test@email.com', + phone: '+91 2111111 ', + }, app: { build: '1.0.0', name: 'RudderLabs JavaScript SDK', @@ -110,24 +167,47 @@ export const data = [ type: 'ios', attTrackingStatus: 3, }, - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, locale: 'en-US', - os: { name: 'iOS', version: '14.4.1' }, - screen: { density: 2 }, + os: { + name: 'iOS', + version: '14.4.1', + }, + screen: { + density: 2, + }, externalId: [ - { type: 'ga4AppInstanceId', id: 'f0dd99v4f979fb997ce453373900f891' }, + { + 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', event_conversion_type: 'web' }, - integrations: { All: true }, + properties: { + query: 't-shirts', + event_conversion_type: 'web', + }, + integrations: { + All: true, + }, sentAt: '2022-04-22T10:57:58Z', }, - metadata: { jobId: 3, userId: 'u1' }, - destination: { Config: { pixelId: 'dummyPixelId', apiKey: 'dummyApiKey' } }, + metadata: { + jobId: 3, + }, + destination: { + Config: { + pixelId: 'dummyPixelId', + apiKey: 'dummyApiKey', + }, + }, }, ], destType: 'snapchat_conversion', @@ -162,24 +242,39 @@ export const data = [ files: {}, }, metadata: [ - { jobId: 1, userId: 'u1' }, - { jobId: 2, userId: 'u1' }, - { jobId: 3, userId: 'u1' }, + { + jobId: 1, + }, + { + jobId: 2, + }, + { + jobId: 3, + }, ], batched: true, statusCode: 200, - destination: { Config: { pixelId: 'dummyPixelId', apiKey: 'dummyApiKey' } }, + destination: { + Config: { + pixelId: 'dummyPixelId', + apiKey: 'dummyApiKey', + }, + }, }, ], }, }, }, + mockFns: (_) => { + // @ts-ignore + Date.now = jest.fn(() => new Date('2022-04-22T10:57:58Z')); + }, }, { name: 'snapchat_conversion', description: 'Test 1', - feature: 'router', - module: 'destination', + feature: FEATURES.ROUTER, + module: MODULES.DESTINATION, version: 'v0', input: { request: { @@ -193,7 +288,10 @@ export const data = [ userId: 'd131b5f1fc@nana.sa', channel: 'mobile', context: { - os: { name: 'iOS', version: '15.5' }, + os: { + name: 'iOS', + version: '15.5', + }, app: { name: 'CFBundleDisplayName', build: '12.43.0.16', @@ -208,12 +306,19 @@ export const data = [ manufacturer: 'Apple', }, locale: 'ar-SA', - screen: { width: 896, height: 414, density: 2 }, + screen: { + width: 896, + height: 414, + density: 2, + }, traits: { email: 'm@gmail.com', phone: '00966556747779', userId: 'd131b5f1fc@nana.sa', - address: { city: 'الرياض', country: 'sa' }, + address: { + city: 'الرياض', + country: 'sa', + }, country: 'sa', lastName: '', firstName: 'منيرة ام عمر', @@ -233,7 +338,10 @@ export const data = [ }, ml_availability_segment: -1, }, - library: { name: 'rudder-ios-library', version: '1.0.7' }, + library: { + name: 'rudder-ios-library', + version: '1.0.7', + }, network: { wifi: true, carrier: 'unavailable', @@ -243,7 +351,10 @@ export const data = [ timezone: 'Asia/Riyadh', userAgent: 'unknown', externalId: [ - { id: 'CBEDC847-F22C-447C-85DE-2BB693240F8E', type: 'brazeExternalId' }, + { + id: 'CBEDC847-F22C-447C-85DE-2BB693240F8E', + type: 'brazeExternalId', + }, ], }, rudderId: '8fd7a036-fcbd-4ec3-b498-ea2cbf1df629', @@ -263,10 +374,14 @@ export const data = [ receivedAt: '2022-08-01T15:04:59.091Z', request_ip: '78.95.64.84', anonymousId: 'f244e389-d899-40a0-9673-1db87a8db7d3', - integrations: { All: true }, + integrations: { + All: true, + }, originalTimestamp: '2022-08-01T15:04:49.266Z', }, - metadata: { jobId: 4, userId: 'u1' }, + metadata: { + jobId: 4, + }, destination: { Config: { pixelId: 'dummyPixelId', @@ -275,7 +390,10 @@ export const data = [ snapAppId: '', enableDeduplication: false, rudderEventsToSnapEvents: [ - { from: 'Product List Viewed', to: 'product_list_viewed' }, + { + from: 'Product List Viewed', + to: 'product_list_viewed', + }, ], }, }, @@ -291,16 +409,20 @@ export const data = [ body: { output: [ { - metadata: [{ jobId: 4, userId: 'u1' }], + metadata: [ + { + jobId: 4, + }, + ], batched: false, statusCode: 400, error: 'Snap App Id is required for app events', statTags: { errorCategory: 'dataValidation', errorType: 'configuration', - feature: 'router', - implementation: 'native', - module: 'destination', + feature: FEATURES.ROUTER, + implementation: IMPLEMENTATIONS.NATIVE, + module: MODULES.DESTINATION, destType: 'SNAPCHAT_CONVERSION', }, destination: { @@ -311,7 +433,10 @@ export const data = [ snapAppId: '', enableDeduplication: false, rudderEventsToSnapEvents: [ - { from: 'Product List Viewed', to: 'product_list_viewed' }, + { + from: 'Product List Viewed', + to: 'product_list_viewed', + }, ], }, }, diff --git a/test/integrations/destinations/snapchat_custom_audience/dataDelivery/data.ts b/test/integrations/destinations/snapchat_custom_audience/dataDelivery/data.ts index d8ec365a82..2ed5625fe8 100644 --- a/test/integrations/destinations/snapchat_custom_audience/dataDelivery/data.ts +++ b/test/integrations/destinations/snapchat_custom_audience/dataDelivery/data.ts @@ -1,206 +1,222 @@ export const data = [ { - name: 'snapchat_custom_audience', - description: 'Test 0', - feature: 'dataDelivery', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://adsapi.snapchat.com/v1/segments/123/users', - headers: { - Authorization: 'Bearer abcd123', - 'Content-Type': 'application/json', + "name": "snapchat_custom_audience", + "description": "Test 0", + "feature": "dataDelivery", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://adsapi.snapchat.com/v1/segments/123/users", + "headers": { + "Authorization": "Bearer abcd123", + "Content-Type": "application/json" }, - body: { - JSON: { - users: [ + "body": { + "JSON": { + "users": [ { - schema: ['EMAIL_SHA256'], - data: [['938758751f5af66652a118e26503af824404bc13acd1cb7642ddff99916f0e1c']], - }, - ], + "schema": [ + "EMAIL_SHA256" + ], + "data": [ + [ + "938758751f5af66652a118e26503af824404bc13acd1cb7642ddff99916f0e1c" + ] + ] + } + ] }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - params: { - destination: 'snapchat_custom_audience', + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} }, + "files": {}, + "params": { + "destination": "snapchat_custom_audience" + } }, - method: 'POST', - }, + "method": "POST" + } }, - output: { - response: { - status: 200, - body: { - output: { - status: 200, - message: 'Request Processed Successfully', - destinationResponse: { - response: { - request_status: 'SUCCESS', - request_id: '12345', - users: [ + "output": { + "response": { + "status": 200, + "body": { + "output": { + "status": 200, + "message": "Request Processed Successfully", + "destinationResponse": { + "response": { + "request_status": "SUCCESS", + "request_id": "12345", + "users": [ { - sub_request_status: 'SUCCESS', - user: { - number_uploaded_users: 1, - }, - }, - ], + "sub_request_status": "SUCCESS", + "user": { + "number_uploaded_users": 1 + } + } + ] }, - status: 200, - }, - }, - }, - }, - }, + "status": 200 + } + } + } + } + } }, { - name: 'snapchat_custom_audience', - description: 'Test 1', - feature: 'dataDelivery', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://adsapi.snapchat.com/v1/segments/456/users', - headers: { - Authorization: 'Bearer abcd123', - 'Content-Type': 'application/json', + "name": "snapchat_custom_audience", + "description": "Test 1", + "feature": "dataDelivery", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://adsapi.snapchat.com/v1/segments/456/users", + "headers": { + "Authorization": "Bearer abcd123", + "Content-Type": "application/json" }, - body: { - JSON: { - users: [ + "body": { + "JSON": { + "users": [ { - schema: ['EMAIL_SHA256'], - data: [['938758751f5af66652a118e26503af824404bc13acd1cb7642ddff99916f0e1c']], - }, - ], + "schema": [ + "EMAIL_SHA256" + ], + "data": [ + [ + "938758751f5af66652a118e26503af824404bc13acd1cb7642ddff99916f0e1c" + ] + ] + } + ] }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - params: { - destination: 'snapchat_custom_audience', + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} }, + "files": {}, + "params": { + "destination": "snapchat_custom_audience" + } }, - method: 'POST', - }, + "method": "POST" + } }, - output: { - response: { - status: 500, - body: { - output: { - status: 500, - destinationResponse: { - response: 'unauthorized', - status: 401, + "output": { + "response": { + "status": 500, + "body": { + "output": { + "status": 500, + "destinationResponse": { + "response": "unauthorized", + "status": 401 }, - message: - 'Failed with unauthorized during snapchat_custom_audience response transformation', - statTags: { - destType: 'SNAPCHAT_CUSTOM_AUDIENCE', - errorCategory: 'network', - destinationId: 'Non-determininable', - workspaceId: 'Non-determininable', - errorType: 'retryable', - feature: 'dataDelivery', - implementation: 'native', - module: 'destination', + "message": "Failed with unauthorized during snapchat_custom_audience response transformation", + "statTags": { + "destType": "SNAPCHAT_CUSTOM_AUDIENCE", + "errorCategory": "network", + "destinationId": "Non-determininable", + "workspaceId": "Non-determininable", + "errorType": "retryable", + "feature": "dataDelivery", + "implementation": "native", + "module": "destination" }, - authErrorCategory: 'REFRESH_TOKEN', - }, - }, - }, - }, + "authErrorCategory": "REFRESH_TOKEN" + } + } + } + } }, { - name: 'snapchat_custom_audience', - description: 'Test 2', - feature: 'dataDelivery', - module: 'destination', - version: 'v0', - input: { - request: { - body: { - version: '1', - type: 'REST', - method: 'DELETE', - endpoint: 'https://adsapi.snapchat.com/v1/segments/789/users', - headers: { - Authorization: 'Bearer abcd123', - 'Content-Type': 'application/json', + "name": "snapchat_custom_audience", + "description": "Test 2", + "feature": "dataDelivery", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": { + "version": "1", + "type": "REST", + "method": "DELETE", + "endpoint": "https://adsapi.snapchat.com/v1/segments/789/users", + "headers": { + "Authorization": "Bearer abcd123", + "Content-Type": "application/json" }, - body: { - JSON: { - users: [ + "body": { + "JSON": { + "users": [ { - id: '123456', - schema: ['EMAIL_SHA256'], - data: [['938758751f5af66652a118e26503af824404bc13acd1cb7642ddff99916f0e1c']], - }, - ], + "id": "123456", + "schema": [ + "EMAIL_SHA256" + ], + "data": [ + [ + "938758751f5af66652a118e26503af824404bc13acd1cb7642ddff99916f0e1c" + ] + ] + } + ] }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - params: { - destination: 'snapchat_custom_audience', + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} }, + "files": {}, + "params": { + "destination": "snapchat_custom_audience" + } }, - method: 'POST', - }, + "method": "POST" + } }, - output: { - response: { - status: 400, - body: { - output: { - authErrorCategory: 'AUTH_STATUS_INACTIVE', - status: 400, - destinationResponse: { - response: { - request_status: 'ERROR', - request_id: '98e2a602-3cf4-4596-a8f9-7f034161f89a', - debug_message: 'Caller does not have permission', - display_message: - "We're sorry, but the requested resource is not available at this time", - error_code: 'E3002', + "output": { + "response": { + "status": 400, + "body": { + "output": { + "authErrorCategory": "AUTH_STATUS_INACTIVE", + "status": 400, + "destinationResponse": { + "response": { + "request_status": "ERROR", + "request_id": "98e2a602-3cf4-4596-a8f9-7f034161f89a", + "debug_message": "Caller does not have permission", + "display_message": "We're sorry, but the requested resource is not available at this time", + "error_code": "E3002" }, - status: 403, + "status": 403 }, - message: 'undefined during snapchat_custom_audience response transformation', - statTags: { - destType: 'SNAPCHAT_CUSTOM_AUDIENCE', - errorCategory: 'network', - destinationId: 'Non-determininable', - workspaceId: 'Non-determininable', - errorType: 'aborted', - feature: 'dataDelivery', - implementation: 'native', - module: 'destination', - }, - }, - }, - }, - }, - }, -]; + "message": "undefined during snapchat_custom_audience response transformation", + "statTags": { + "destType": "SNAPCHAT_CUSTOM_AUDIENCE", + "errorCategory": "network", + "destinationId": "Non-determininable", + "workspaceId": "Non-determininable", + "errorType": "aborted", + "feature": "dataDelivery", + "implementation": "native", + "module": "destination" + } + } + } + } + } + } +] \ No newline at end of file diff --git a/test/integrations/destinations/snapchat_custom_audience/processor/data.ts b/test/integrations/destinations/snapchat_custom_audience/processor/data.ts index 546f056fa4..9ad6106c7e 100644 --- a/test/integrations/destinations/snapchat_custom_audience/processor/data.ts +++ b/test/integrations/destinations/snapchat_custom_audience/processor/data.ts @@ -1,1351 +1,1404 @@ export const data = [ - { - name: 'snapchat_custom_audience', - description: 'Test 0', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - metadata: { - secret: { - access_token: 'dummyAccessToken', - refresh_token: 'dummyRefreshToken', - developer_token: 'dummyDeveloperToken', - }, - }, - destination: { - Config: { - segmentId: '123', - disableHashing: false, - schema: 'email', - }, - }, - 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://adsapi.snapchat.com/v1/segments/123/users', - headers: { - Authorization: 'Bearer dummyAccessToken', - 'Content-Type': 'application/json', - }, - params: {}, - body: { - JSON: { - users: [ - { - schema: ['EMAIL_SHA256'], - data: [['d3142c8f9c9129484daf28df80cc5c955791efed5e69afabb603bc8cb9ffd419']], - }, - ], - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - metadata: { - secret: { - access_token: 'dummyAccessToken', - refresh_token: 'dummyRefreshToken', - developer_token: 'dummyDeveloperToken', - }, - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'snapchat_custom_audience', - description: 'Test 1', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - metadata: { - secret: { - access_token: 'dummyAccessToken', - refresh_token: 'dummyRefreshToken', - developer_token: 'dummyDeveloperToken', - }, - }, - destination: { - Config: { - segmentId: '123', - disableHashing: true, - schema: 'email', - }, - }, - message: { - userId: 'user 1', - anonymousId: 'anon-id-new', - event: 'event1', - type: 'audiencelist', - properties: { - listData: { - remove: [ - { - email: 'd3142c8f9c9129484daf28df80cc5c955791efed5e69afabb603bc8cb9ffd419', - 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: 'DELETE', - endpoint: 'https://adsapi.snapchat.com/v1/segments/123/users', - headers: { - Authorization: 'Bearer dummyAccessToken', - 'Content-Type': 'application/json', - }, - params: {}, - body: { - JSON: { - users: [ - { - schema: ['EMAIL_SHA256'], - data: [['d3142c8f9c9129484daf28df80cc5c955791efed5e69afabb603bc8cb9ffd419']], - id: '123', - }, - ], - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - metadata: { - secret: { - access_token: 'dummyAccessToken', - refresh_token: 'dummyRefreshToken', - developer_token: 'dummyDeveloperToken', - }, - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'snapchat_custom_audience', - description: 'Test 2', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - metadata: { - secret: { - access_token: 'dummyAccessToken', - refresh_token: 'dummyRefreshToken', - developer_token: 'dummyDeveloperToken', - }, - }, - destination: { - Config: { - segmentId: '123', - disableHashing: false, - schema: 'email', - }, - }, - 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', - }, - ], - 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', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://adsapi.snapchat.com/v1/segments/123/users', - headers: { - Authorization: 'Bearer dummyAccessToken', - 'Content-Type': 'application/json', - }, - params: {}, - body: { - JSON: { - users: [ - { - schema: ['EMAIL_SHA256'], - data: [['d3142c8f9c9129484daf28df80cc5c955791efed5e69afabb603bc8cb9ffd419']], - }, - ], - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - metadata: { - secret: { - access_token: 'dummyAccessToken', - refresh_token: 'dummyRefreshToken', - developer_token: 'dummyDeveloperToken', - }, - }, - statusCode: 200, - }, - { - output: { - version: '1', - type: 'REST', - method: 'DELETE', - endpoint: 'https://adsapi.snapchat.com/v1/segments/123/users', - headers: { - Authorization: 'Bearer dummyAccessToken', - 'Content-Type': 'application/json', - }, - params: {}, - body: { - JSON: { - users: [ - { - schema: ['EMAIL_SHA256'], - data: [['d3142c8f9c9129484daf28df80cc5c955791efed5e69afabb603bc8cb9ffd419']], - id: '123', - }, - ], - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - metadata: { - secret: { - access_token: 'dummyAccessToken', - refresh_token: 'dummyRefreshToken', - developer_token: 'dummyDeveloperToken', - }, - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'snapchat_custom_audience', - description: 'Test 3', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - metadata: { - secret: { - access_token: 'dummyAccessToken', - refresh_token: 'dummyRefreshToken', - developer_token: 'dummyDeveloperToken', - }, - }, - destination: { - Config: { - segmentId: '123', - disableHashing: false, - schema: 'email', - }, - }, - 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', - }, - { - email: 'test@rudderstack.com', - phone: '@09876543210', - firstName: 'rudderlabs', - 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://adsapi.snapchat.com/v1/segments/123/users', - headers: { - Authorization: 'Bearer dummyAccessToken', - 'Content-Type': 'application/json', - }, - params: {}, - body: { - JSON: { - users: [ - { - schema: ['EMAIL_SHA256'], - data: [ - ['d3142c8f9c9129484daf28df80cc5c955791efed5e69afabb603bc8cb9ffd419'], - ['1c5e54849f5c711ce38fa60716fbbe44bff478f9ca250897b39cdfc2438cd1bd'], - ], - }, - ], - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - metadata: { - secret: { - access_token: 'dummyAccessToken', - refresh_token: 'dummyRefreshToken', - developer_token: 'dummyDeveloperToken', - }, - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'snapchat_custom_audience', - description: 'Test 4', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - metadata: { - secret: { - access_token: 'dummyAccessToken', - refresh_token: 'dummyRefreshToken', - developer_token: 'dummyDeveloperToken', - }, - }, - destination: { - Config: { - segmentId: '123', - disableHashing: false, - schema: 'email', - }, - }, - 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', - }, - { - email: 'test@rudderstack.com', - phone: '@09876543210', - firstName: 'rudderlabs', - 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: 'DELETE', - endpoint: 'https://adsapi.snapchat.com/v1/segments/123/users', - headers: { - Authorization: 'Bearer dummyAccessToken', - 'Content-Type': 'application/json', - }, - params: {}, - body: { - JSON: { - users: [ - { - schema: ['EMAIL_SHA256'], - data: [ - ['d3142c8f9c9129484daf28df80cc5c955791efed5e69afabb603bc8cb9ffd419'], - ['1c5e54849f5c711ce38fa60716fbbe44bff478f9ca250897b39cdfc2438cd1bd'], - ], - id: '123', - }, - ], - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - metadata: { - secret: { - access_token: 'dummyAccessToken', - refresh_token: 'dummyRefreshToken', - developer_token: 'dummyDeveloperToken', - }, - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'snapchat_custom_audience', - description: 'Test 5', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - metadata: { - secret: { - access_token: 'dummyAccessToken', - refresh_token: 'dummyRefreshToken', - developer_token: 'dummyDeveloperToken', - }, - }, - destination: { - Config: { - segmentId: '123', - disableHashing: false, - schema: 'email', - }, - }, - message: { - userId: 'user 1', - anonymousId: 'anon-id-new', - event: 'event1', - type: 'audience', - properties: { - listData: { - add: [ - { - email: 'test@rudderstack.com', - phone: '@09876543210', - firstName: 'rudderlabs', - 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: { - access_token: 'dummyAccessToken', - refresh_token: 'dummyRefreshToken', - developer_token: 'dummyDeveloperToken', - }, - }, - statusCode: 400, - error: 'Event type audience is not supported', - statTags: { - errorCategory: 'dataValidation', - errorType: 'instrumentation', - destType: 'SNAPCHAT_CUSTOM_AUDIENCE', - module: 'destination', - implementation: 'native', - feature: 'processor', - }, - }, - ], - }, - }, - }, - { - name: 'snapchat_custom_audience', - description: 'Test 6', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - metadata: { - secret: { - access_token: 'dummyAccessToken', - refresh_token: 'dummyRefreshToken', - developer_token: 'dummyDeveloperToken', - }, - }, - destination: { - Config: { - segmentId: '123', - disableHashing: false, - schema: 'email', - }, - }, - message: { - userId: 'user 1', - anonymousId: 'anon-id-new', - event: 'event1', - properties: { - listData: { - add: [ - { - email: 'test@rudderstack.com', - phone: '@09876543210', - firstName: 'rudderlabs', - 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: { - access_token: 'dummyAccessToken', - refresh_token: 'dummyRefreshToken', - developer_token: 'dummyDeveloperToken', - }, - }, - statusCode: 400, - error: 'Event type is required', - statTags: { - errorCategory: 'dataValidation', - errorType: 'instrumentation', - destType: 'SNAPCHAT_CUSTOM_AUDIENCE', - module: 'destination', - implementation: 'native', - feature: 'processor', - }, - }, - ], - }, - }, - }, - { - name: 'snapchat_custom_audience', - description: 'Test 7', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - metadata: { - secret: { - access_token: 'dummyAccessToken', - refresh_token: 'dummyRefreshToken', - developer_token: 'dummyDeveloperToken', - }, - }, - destination: { - Config: { - segmentId: '123', - disableHashing: false, - schema: 'email', - }, - }, - message: { - userId: 'user 1', - anonymousId: 'anon-id-new', - event: 'event1', - type: 'audiencelist', - 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: 'dummyAccessToken', - refresh_token: 'dummyRefreshToken', - developer_token: 'dummyDeveloperToken', - }, - }, - statusCode: 400, - error: 'Message properties is not present. Aborting message', - statTags: { - errorCategory: 'dataValidation', - errorType: 'instrumentation', - destType: 'SNAPCHAT_CUSTOM_AUDIENCE', - module: 'destination', - implementation: 'native', - feature: 'processor', - }, - }, - ], - }, - }, - }, - { - name: 'snapchat_custom_audience', - description: 'Test 8', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - metadata: { - secret: { - access_token: 'dummyAccessToken', - refresh_token: 'dummyRefreshToken', - developer_token: 'dummyDeveloperToken', - }, - }, - destination: { - Config: { - segmentId: '123', - disableHashing: false, - schema: 'email', - }, - }, - message: { - userId: 'user 1', - anonymousId: 'anon-id-new', - event: 'event1', - type: 'audiencelist', - 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: 'dummyAccessToken', - refresh_token: 'dummyRefreshToken', - developer_token: 'dummyDeveloperToken', - }, - }, - statusCode: 400, - error: 'listData is not present inside properties. Aborting message', - statTags: { - errorCategory: 'dataValidation', - errorType: 'instrumentation', - destType: 'SNAPCHAT_CUSTOM_AUDIENCE', - module: 'destination', - implementation: 'native', - feature: 'processor', - }, - }, - ], - }, - }, - }, - { - name: 'snapchat_custom_audience', - description: 'Test 9', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - metadata: { - secret: { - access_token: 'dummyAccessToken', - refresh_token: 'dummyRefreshToken', - developer_token: 'dummyDeveloperToken', - }, - }, - destination: { - Config: { - segmentId: '123', - disableHashing: false, - schema: 'email', - }, - }, - message: { - userId: 'user 1', - anonymousId: 'anon-id-new', - event: 'event1', - type: 'audiencelist', - properties: { - listData: { - abc: '123', - }, - 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: 'dummyAccessToken', - refresh_token: 'dummyRefreshToken', - developer_token: 'dummyDeveloperToken', - }, - }, - statusCode: 400, - error: - "Neither 'add' nor 'remove' property is present inside 'listData'. Aborting message", - statTags: { - errorCategory: 'dataValidation', - errorType: 'instrumentation', - destType: 'SNAPCHAT_CUSTOM_AUDIENCE', - module: 'destination', - implementation: 'native', - feature: 'processor', - }, - }, - ], - }, - }, - }, - { - name: 'snapchat_custom_audience', - description: 'Test 10', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - metadata: { - secret: { - access_token: 'dummyAccessToken', - refresh_token: 'dummyRefreshToken', - developer_token: 'dummyDeveloperToken', - }, - }, - destination: { - Config: { - segmentId: '123', - disableHashing: false, - schema: 'email', - }, - }, - message: { - userId: 'user 1', - anonymousId: 'anon-id-new', - event: 'event1', - type: 'audiencelist', - properties: { - listData: { - remove: [ - { - email: '', - phone: '@09876543210', - firstName: 'test', - lastName: 'rudderlabs', - country: 'US', - postalCode: '1245', - }, - { - 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: { - access_token: 'dummyAccessToken', - refresh_token: 'dummyRefreshToken', - developer_token: 'dummyDeveloperToken', - }, - }, - statusCode: 400, - error: 'Required schema parameter email is not found from payload', - statTags: { - errorCategory: 'dataValidation', - errorType: 'instrumentation', - destType: 'SNAPCHAT_CUSTOM_AUDIENCE', - module: 'destination', - implementation: 'native', - feature: 'processor', - }, - }, - ], - }, - }, - }, - { - name: 'snapchat_custom_audience', - description: 'Test 11', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - metadata: { - secret: { - access_token: 'dummyAccessToken', - refresh_token: 'dummyRefreshToken', - developer_token: 'dummyDeveloperToken', - }, - }, - destination: { - Config: { - segmentId: '123', - disableHashing: false, - schema: 'email', - }, - }, - message: { - userId: 'user 1', - anonymousId: 'anon-id-new', - event: 'event1', - type: 'audiencelist', - properties: { - listData: { - remove: [ - { - email: 'abcd@abc.com', - phone: '@09876543210', - firstName: 'test', - lastName: 'rudderlabs', - country: 'US', - postalCode: '1245', - }, - { - 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: 'DELETE', - endpoint: 'https://adsapi.snapchat.com/v1/segments/123/users', - headers: { - Authorization: 'Bearer dummyAccessToken', - 'Content-Type': 'application/json', - }, - params: {}, - body: { - JSON: { - users: [ - { - schema: ['EMAIL_SHA256'], - data: [['8c37cbc5d9abb3082303c6548571cfc7655a4546ddc1e943f041fc9126e7274a']], - id: '123', - }, - ], - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - metadata: { - secret: { - access_token: 'dummyAccessToken', - refresh_token: 'dummyRefreshToken', - developer_token: 'dummyDeveloperToken', - }, - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'snapchat_custom_audience', - description: 'Test 12', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - metadata: { - secret: { - access_token: 'dummyAccessToken', - refresh_token: 'dummyRefreshToken', - developer_token: 'dummyDeveloperToken', - }, - }, - destination: { - Config: { - segmentId: '123', - disableHashing: false, - schema: 'phone', - }, - }, - 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://adsapi.snapchat.com/v1/segments/123/users', - headers: { - Authorization: 'Bearer dummyAccessToken', - 'Content-Type': 'application/json', - }, - params: {}, - body: { - JSON: { - users: [ - { - schema: ['PHONE_SHA256'], - data: [['7619ee8cea49187f309616e30ecf54be072259b43760f1f550a644945d5572f2']], - }, - ], - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - metadata: { - secret: { - access_token: 'dummyAccessToken', - refresh_token: 'dummyRefreshToken', - developer_token: 'dummyDeveloperToken', - }, - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'snapchat_custom_audience', - description: 'Test 13', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - metadata: { - secret: { - access_token: 'dummyAccessToken', - refresh_token: 'dummyRefreshToken', - developer_token: 'dummyDeveloperToken', - }, - }, - destination: { - Config: { - segmentId: '123', - disableHashing: false, - schema: 'mobileAdId', - }, - }, - message: { - userId: 'user 1', - anonymousId: 'anon-id-new', - event: 'event1', - type: 'audiencelist', - properties: { - listData: { - add: [ - { - email: 'test@abc.com', - phone: '09876543210', - mobileId: '1334', - 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://adsapi.snapchat.com/v1/segments/123/users', - headers: { - Authorization: 'Bearer dummyAccessToken', - 'Content-Type': 'application/json', - }, - params: {}, - body: { - JSON: { - users: [ - { - schema: ['MOBILE_AD_ID_SHA256'], - data: [['eb43272640b269219a01caf99c5a4122d6edc0916d45ac13c0ce80ca3ad2def0']], - }, - ], - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - metadata: { - secret: { - access_token: 'dummyAccessToken', - refresh_token: 'dummyRefreshToken', - developer_token: 'dummyDeveloperToken', - }, - }, - statusCode: 200, - }, - ], - }, - }, - }, -]; + { + "name": "snapchat_custom_audience", + "description": "Test 0", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "metadata": { + "secret": { + "access_token": "dummyAccessToken", + "refresh_token": "dummyRefreshToken", + "developer_token": "dummyDeveloperToken" + } + }, + "destination": { + "Config": { + "segmentId": "123", + "disableHashing": false, + "schema": "email" + } + }, + "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://adsapi.snapchat.com/v1/segments/123/users", + "headers": { + "Authorization": "Bearer dummyAccessToken", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "users": [ + { + "schema": [ + "EMAIL_SHA256" + ], + "data": [ + [ + "d3142c8f9c9129484daf28df80cc5c955791efed5e69afabb603bc8cb9ffd419" + ] + ] + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "metadata": { + "secret": { + "access_token": "dummyAccessToken", + "refresh_token": "dummyRefreshToken", + "developer_token": "dummyDeveloperToken" + } + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "snapchat_custom_audience", + "description": "Test 1", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "metadata": { + "secret": { + "access_token": "dummyAccessToken", + "refresh_token": "dummyRefreshToken", + "developer_token": "dummyDeveloperToken" + } + }, + "destination": { + "Config": { + "segmentId": "123", + "disableHashing": true, + "schema": "email" + } + }, + "message": { + "userId": "user 1", + "anonymousId": "anon-id-new", + "event": "event1", + "type": "audiencelist", + "properties": { + "listData": { + "remove": [ + { + "email": "d3142c8f9c9129484daf28df80cc5c955791efed5e69afabb603bc8cb9ffd419", + "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": "DELETE", + "endpoint": "https://adsapi.snapchat.com/v1/segments/123/users", + "headers": { + "Authorization": "Bearer dummyAccessToken", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "users": [ + { + "schema": [ + "EMAIL_SHA256" + ], + "data": [ + [ + "d3142c8f9c9129484daf28df80cc5c955791efed5e69afabb603bc8cb9ffd419" + ] + ], + "id": "123" + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "metadata": { + "secret": { + "access_token": "dummyAccessToken", + "refresh_token": "dummyRefreshToken", + "developer_token": "dummyDeveloperToken" + } + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "snapchat_custom_audience", + "description": "Test 2", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "metadata": { + "secret": { + "access_token": "dummyAccessToken", + "refresh_token": "dummyRefreshToken", + "developer_token": "dummyDeveloperToken" + } + }, + "destination": { + "Config": { + "segmentId": "123", + "disableHashing": false, + "schema": "email" + } + }, + "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" + } + ], + "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" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://adsapi.snapchat.com/v1/segments/123/users", + "headers": { + "Authorization": "Bearer dummyAccessToken", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "users": [ + { + "schema": [ + "EMAIL_SHA256" + ], + "data": [ + [ + "d3142c8f9c9129484daf28df80cc5c955791efed5e69afabb603bc8cb9ffd419" + ] + ] + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "metadata": { + "secret": { + "access_token": "dummyAccessToken", + "refresh_token": "dummyRefreshToken", + "developer_token": "dummyDeveloperToken" + } + }, + "statusCode": 200 + }, + { + "output": { + "version": "1", + "type": "REST", + "method": "DELETE", + "endpoint": "https://adsapi.snapchat.com/v1/segments/123/users", + "headers": { + "Authorization": "Bearer dummyAccessToken", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "users": [ + { + "schema": [ + "EMAIL_SHA256" + ], + "data": [ + [ + "d3142c8f9c9129484daf28df80cc5c955791efed5e69afabb603bc8cb9ffd419" + ] + ], + "id": "123" + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "metadata": { + "secret": { + "access_token": "dummyAccessToken", + "refresh_token": "dummyRefreshToken", + "developer_token": "dummyDeveloperToken" + } + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "snapchat_custom_audience", + "description": "Test 3", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "metadata": { + "secret": { + "access_token": "dummyAccessToken", + "refresh_token": "dummyRefreshToken", + "developer_token": "dummyDeveloperToken" + } + }, + "destination": { + "Config": { + "segmentId": "123", + "disableHashing": false, + "schema": "email" + } + }, + "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" + }, + { + "email": "test@rudderstack.com", + "phone": "@09876543210", + "firstName": "rudderlabs", + "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://adsapi.snapchat.com/v1/segments/123/users", + "headers": { + "Authorization": "Bearer dummyAccessToken", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "users": [ + { + "schema": [ + "EMAIL_SHA256" + ], + "data": [ + [ + "d3142c8f9c9129484daf28df80cc5c955791efed5e69afabb603bc8cb9ffd419" + ], + [ + "1c5e54849f5c711ce38fa60716fbbe44bff478f9ca250897b39cdfc2438cd1bd" + ] + ] + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "metadata": { + "secret": { + "access_token": "dummyAccessToken", + "refresh_token": "dummyRefreshToken", + "developer_token": "dummyDeveloperToken" + } + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "snapchat_custom_audience", + "description": "Test 4", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "metadata": { + "secret": { + "access_token": "dummyAccessToken", + "refresh_token": "dummyRefreshToken", + "developer_token": "dummyDeveloperToken" + } + }, + "destination": { + "Config": { + "segmentId": "123", + "disableHashing": false, + "schema": "email" + } + }, + "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" + }, + { + "email": "test@rudderstack.com", + "phone": "@09876543210", + "firstName": "rudderlabs", + "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": "DELETE", + "endpoint": "https://adsapi.snapchat.com/v1/segments/123/users", + "headers": { + "Authorization": "Bearer dummyAccessToken", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "users": [ + { + "schema": [ + "EMAIL_SHA256" + ], + "data": [ + [ + "d3142c8f9c9129484daf28df80cc5c955791efed5e69afabb603bc8cb9ffd419" + ], + [ + "1c5e54849f5c711ce38fa60716fbbe44bff478f9ca250897b39cdfc2438cd1bd" + ] + ], + "id": "123" + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "metadata": { + "secret": { + "access_token": "dummyAccessToken", + "refresh_token": "dummyRefreshToken", + "developer_token": "dummyDeveloperToken" + } + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "snapchat_custom_audience", + "description": "Test 5", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "metadata": { + "secret": { + "access_token": "dummyAccessToken", + "refresh_token": "dummyRefreshToken", + "developer_token": "dummyDeveloperToken" + } + }, + "destination": { + "Config": { + "segmentId": "123", + "disableHashing": false, + "schema": "email" + } + }, + "message": { + "userId": "user 1", + "anonymousId": "anon-id-new", + "event": "event1", + "type": "audience", + "properties": { + "listData": { + "add": [ + { + "email": "test@rudderstack.com", + "phone": "@09876543210", + "firstName": "rudderlabs", + "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": { + "access_token": "dummyAccessToken", + "refresh_token": "dummyRefreshToken", + "developer_token": "dummyDeveloperToken" + } + }, + "statusCode": 400, + "error": "Event type audience is not supported", + "statTags": { + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "destType": "SNAPCHAT_CUSTOM_AUDIENCE", + "module": "destination", + "implementation": "native", + "feature": "processor" + } + } + ] + } + } + }, + { + "name": "snapchat_custom_audience", + "description": "Test 6", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "metadata": { + "secret": { + "access_token": "dummyAccessToken", + "refresh_token": "dummyRefreshToken", + "developer_token": "dummyDeveloperToken" + } + }, + "destination": { + "Config": { + "segmentId": "123", + "disableHashing": false, + "schema": "email" + } + }, + "message": { + "userId": "user 1", + "anonymousId": "anon-id-new", + "event": "event1", + "properties": { + "listData": { + "add": [ + { + "email": "test@rudderstack.com", + "phone": "@09876543210", + "firstName": "rudderlabs", + "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": { + "access_token": "dummyAccessToken", + "refresh_token": "dummyRefreshToken", + "developer_token": "dummyDeveloperToken" + } + }, + "statusCode": 400, + "error": "Event type is required", + "statTags": { + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "destType": "SNAPCHAT_CUSTOM_AUDIENCE", + "module": "destination", + "implementation": "native", + "feature": "processor" + } + } + ] + } + } + }, + { + "name": "snapchat_custom_audience", + "description": "Test 7", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "metadata": { + "secret": { + "access_token": "dummyAccessToken", + "refresh_token": "dummyRefreshToken", + "developer_token": "dummyDeveloperToken" + } + }, + "destination": { + "Config": { + "segmentId": "123", + "disableHashing": false, + "schema": "email" + } + }, + "message": { + "userId": "user 1", + "anonymousId": "anon-id-new", + "event": "event1", + "type": "audiencelist", + "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": "dummyAccessToken", + "refresh_token": "dummyRefreshToken", + "developer_token": "dummyDeveloperToken" + } + }, + "statusCode": 400, + "error": "Message properties is not present. Aborting message", + "statTags": { + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "destType": "SNAPCHAT_CUSTOM_AUDIENCE", + "module": "destination", + "implementation": "native", + "feature": "processor" + } + } + ] + } + } + }, + { + "name": "snapchat_custom_audience", + "description": "Test 8", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "metadata": { + "secret": { + "access_token": "dummyAccessToken", + "refresh_token": "dummyRefreshToken", + "developer_token": "dummyDeveloperToken" + } + }, + "destination": { + "Config": { + "segmentId": "123", + "disableHashing": false, + "schema": "email" + } + }, + "message": { + "userId": "user 1", + "anonymousId": "anon-id-new", + "event": "event1", + "type": "audiencelist", + "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": "dummyAccessToken", + "refresh_token": "dummyRefreshToken", + "developer_token": "dummyDeveloperToken" + } + }, + "statusCode": 400, + "error": "listData is not present inside properties. Aborting message", + "statTags": { + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "destType": "SNAPCHAT_CUSTOM_AUDIENCE", + "module": "destination", + "implementation": "native", + "feature": "processor" + } + } + ] + } + } + }, + { + "name": "snapchat_custom_audience", + "description": "Test 9", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "metadata": { + "secret": { + "access_token": "dummyAccessToken", + "refresh_token": "dummyRefreshToken", + "developer_token": "dummyDeveloperToken" + } + }, + "destination": { + "Config": { + "segmentId": "123", + "disableHashing": false, + "schema": "email" + } + }, + "message": { + "userId": "user 1", + "anonymousId": "anon-id-new", + "event": "event1", + "type": "audiencelist", + "properties": { + "listData": { + "abc": "123" + }, + "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": "dummyAccessToken", + "refresh_token": "dummyRefreshToken", + "developer_token": "dummyDeveloperToken" + } + }, + "statusCode": 400, + "error": "Neither 'add' nor 'remove' property is present inside 'listData'. Aborting message", + "statTags": { + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "destType": "SNAPCHAT_CUSTOM_AUDIENCE", + "module": "destination", + "implementation": "native", + "feature": "processor" + } + } + ] + } + } + }, + { + "name": "snapchat_custom_audience", + "description": "Test 10", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "metadata": { + "secret": { + "access_token": "dummyAccessToken", + "refresh_token": "dummyRefreshToken", + "developer_token": "dummyDeveloperToken" + } + }, + "destination": { + "Config": { + "segmentId": "123", + "disableHashing": false, + "schema": "email" + } + }, + "message": { + "userId": "user 1", + "anonymousId": "anon-id-new", + "event": "event1", + "type": "audiencelist", + "properties": { + "listData": { + "remove": [ + { + "email": "", + "phone": "@09876543210", + "firstName": "test", + "lastName": "rudderlabs", + "country": "US", + "postalCode": "1245" + }, + { + "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": { + "access_token": "dummyAccessToken", + "refresh_token": "dummyRefreshToken", + "developer_token": "dummyDeveloperToken" + } + }, + "statusCode": 400, + "error": "Required schema parameter email is not found from payload", + "statTags": { + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "destType": "SNAPCHAT_CUSTOM_AUDIENCE", + "module": "destination", + "implementation": "native", + "feature": "processor" + } + } + ] + } + } + }, + { + "name": "snapchat_custom_audience", + "description": "Test 11", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "metadata": { + "secret": { + "access_token": "dummyAccessToken", + "refresh_token": "dummyRefreshToken", + "developer_token": "dummyDeveloperToken" + } + }, + "destination": { + "Config": { + "segmentId": "123", + "disableHashing": false, + "schema": "email" + } + }, + "message": { + "userId": "user 1", + "anonymousId": "anon-id-new", + "event": "event1", + "type": "audiencelist", + "properties": { + "listData": { + "remove": [ + { + "email": "abcd@abc.com", + "phone": "@09876543210", + "firstName": "test", + "lastName": "rudderlabs", + "country": "US", + "postalCode": "1245" + }, + { + "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": "DELETE", + "endpoint": "https://adsapi.snapchat.com/v1/segments/123/users", + "headers": { + "Authorization": "Bearer dummyAccessToken", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "users": [ + { + "schema": [ + "EMAIL_SHA256" + ], + "data": [ + [ + "8c37cbc5d9abb3082303c6548571cfc7655a4546ddc1e943f041fc9126e7274a" + ] + ], + "id": "123" + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "metadata": { + "secret": { + "access_token": "dummyAccessToken", + "refresh_token": "dummyRefreshToken", + "developer_token": "dummyDeveloperToken" + } + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "snapchat_custom_audience", + "description": "Test 12", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "metadata": { + "secret": { + "access_token": "dummyAccessToken", + "refresh_token": "dummyRefreshToken", + "developer_token": "dummyDeveloperToken" + } + }, + "destination": { + "Config": { + "segmentId": "123", + "disableHashing": false, + "schema": "phone" + } + }, + "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://adsapi.snapchat.com/v1/segments/123/users", + "headers": { + "Authorization": "Bearer dummyAccessToken", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "users": [ + { + "schema": [ + "PHONE_SHA256" + ], + "data": [ + [ + "7619ee8cea49187f309616e30ecf54be072259b43760f1f550a644945d5572f2" + ] + ] + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "metadata": { + "secret": { + "access_token": "dummyAccessToken", + "refresh_token": "dummyRefreshToken", + "developer_token": "dummyDeveloperToken" + } + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "snapchat_custom_audience", + "description": "Test 13", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "metadata": { + "secret": { + "access_token": "dummyAccessToken", + "refresh_token": "dummyRefreshToken", + "developer_token": "dummyDeveloperToken" + } + }, + "destination": { + "Config": { + "segmentId": "123", + "disableHashing": false, + "schema": "mobileAdId" + } + }, + "message": { + "userId": "user 1", + "anonymousId": "anon-id-new", + "event": "event1", + "type": "audiencelist", + "properties": { + "listData": { + "add": [ + { + "email": "test@abc.com", + "phone": "09876543210", + "mobileId": "1334", + "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://adsapi.snapchat.com/v1/segments/123/users", + "headers": { + "Authorization": "Bearer dummyAccessToken", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "users": [ + { + "schema": [ + "MOBILE_AD_ID_SHA256" + ], + "data": [ + [ + "eb43272640b269219a01caf99c5a4122d6edc0916d45ac13c0ce80ca3ad2def0" + ] + ] + } + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "metadata": { + "secret": { + "access_token": "dummyAccessToken", + "refresh_token": "dummyRefreshToken", + "developer_token": "dummyDeveloperToken" + } + }, + "statusCode": 200 + } + ] + } + } + } +] \ No newline at end of file diff --git a/test/integrations/destinations/snapchat_custom_audience/router/data.ts b/test/integrations/destinations/snapchat_custom_audience/router/data.ts index 44fdb4b47b..2807201e73 100644 --- a/test/integrations/destinations/snapchat_custom_audience/router/data.ts +++ b/test/integrations/destinations/snapchat_custom_audience/router/data.ts @@ -1,9 +1,13 @@ +import { FEATURES, MODULES } from '../../../../../src/v0/util/tags'; + +const DEST_TYPE = 'snapchat_custom_audience'; + export const data = [ { - name: 'snapchat_custom_audience', + name: DEST_TYPE, description: 'Test 0', - feature: 'router', - module: 'destination', + feature: FEATURES.ROUTER, + module: MODULES.DESTINATION, version: 'v0', input: { request: { @@ -16,9 +20,14 @@ export const data = [ refresh_token: 'dummyRefreshToken', developer_token: 'dummyDeveloperToken', }, - userId: 'u1', }, - destination: { Config: { segmentId: '123', disableHashing: false, schema: 'email' } }, + destination: { + Config: { + segmentId: '123', + disableHashing: false, + schema: 'email', + }, + }, message: { userId: 'user 1', anonymousId: 'anon-id-new', @@ -39,12 +48,17 @@ export const data = [ }, enablePartialFailure: true, }, - context: { ip: '14.5.67.21', library: { name: 'http' } }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, timestamp: '2020-02-02T00:23:09.544Z', }, }, ], - destType: 'snapchat_custom_audience', + destType: DEST_TYPE, }, }, }, @@ -90,12 +104,17 @@ export const data = [ developer_token: 'dummyDeveloperToken', refresh_token: 'dummyRefreshToken', }, - userId: 'u1', }, ], batched: false, statusCode: 200, - destination: { Config: { disableHashing: false, schema: 'email', segmentId: '123' } }, + destination: { + Config: { + disableHashing: false, + schema: 'email', + segmentId: '123', + }, + }, }, ], }, diff --git a/test/integrations/destinations/splitio/processor/data.ts b/test/integrations/destinations/splitio/processor/data.ts index 3fda93cc30..6f77c6f562 100644 --- a/test/integrations/destinations/splitio/processor/data.ts +++ b/test/integrations/destinations/splitio/processor/data.ts @@ -1,905 +1,915 @@ export const data = [ - { - name: 'splitio', - description: 'Test 0', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - traits: { - martin: 21.565, - trafficTypeName: 'user', - vertical: 'restaurant', - eventTypeId: 'page_load end to end', - timestamp: 1513357833000, - GMV: false, - }, - userId: 'user123', - messageId: 'c73198a8-41d8-4426-9fd9-de167194d5f3', - rudderId: 'bda76e3e-87eb-4153-9d1e-e9c2ed48b7a5', - context: { - ip: '14.5.67.21', - traits: { - abc: 'new-val', - key: 'key_user_0', - value: '0.93', - }, - library: { - name: 'http', - }, - }, - type: 'group', - groupId: 'group1', - timestamp: '2020-01-21T00:21:34.208Z', - writeKey: '1pe7u01A7rYOrvacE6WSgI6ESXh', - receivedAt: '2021-04-19T14:53:18.215+05:30', - requestIP: '[::1]', - }, - destination: { - Config: { - apiKey: 'abcde', - environment: 'staging', - trafficType: 'user', - }, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://events.split.io/api/events', - headers: { - 'Content-Type': 'application/json', - Authorization: 'Bearer abcde', - }, - params: {}, - body: { - JSON: { - eventTypeId: 'group', - key: 'user123', - timestamp: 1579566094208, - environmentName: 'staging', - trafficTypeName: 'user', - properties: { - martin: 21.565, - vertical: 'restaurant', - GMV: false, - }, - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'splitio', - description: 'Test 1', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - traits: { - martin: 21.565, - trafficTypeName: 'user', - eventTypeId: 'page_load end to end', - timestamp: 1513357833000, - address: { - city: 'San Francisco', - state: 'CA', - country: 'USA', - }, - key1: { - a: 'a', - }, - key2: [1, 2, 3], - key3: { - key4: {}, - }, - key5: null, - }, - userId: 'user123', - messageId: 'c73198a8-41d8-4426-9fd9-de167194d5f3', - rudderId: 'bda76e3e-87eb-4153-9d1e-e9c2ed48b7a5', - context: { - ip: '14.5.67.21', - traits: { - abc: 'new-val', - key: 'key_user_0', - }, - library: { - name: 'http', - }, - }, - type: 'identify', - timestamp: '2020-01-21T00:21:34.208Z', - writeKey: '1pe7u01A7rYOrvacE6WSgI6ESXh', - receivedAt: '2021-04-19T14:53:18.215+05:30', - requestIP: '[::1]', - }, - destination: { - Config: { - apiKey: 'abcde', - environment: 'staging', - trafficType: 'user', - }, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://events.split.io/api/events', - headers: { - 'Content-Type': 'application/json', - Authorization: 'Bearer abcde', - }, - params: {}, - body: { - JSON: { - eventTypeId: 'identify', - key: 'user123', - timestamp: 1579566094208, - environmentName: 'staging', - trafficTypeName: 'user', - properties: { - martin: 21.565, - 'address.city': 'San Francisco', - 'address.state': 'CA', - 'address.country': 'USA', - 'key1.a': 'a', - 'key2[0]': 1, - 'key2[1]': 2, - 'key2[2]': 3, - }, - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'splitio', - description: 'Test 2', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - event: 'splitio_test_1', - messageId: '9b200548-5961-4448-9dbc-098b7ce85751', - properties: { - eventTypeId: 'page_load', - trafficTypeName: 'user', - key: 'key_user_0', - timestamp: 1513357833000, - value: '0.93', - martin: 21.565, - vertical: 'restaurant', - GMV: true, - abc: 'new-val', - property1: { - property2: 1, - property3: 'test', - property4: { - subProp1: { - a: 'a', - b: 'b', - }, - subProp2: ['a', 'b'], - subProp3: { - prop: {}, - }, - }, - }, - properties5: null, - }, - receivedAt: '2021-03-01T22:55:54.806Z', - rudderId: '6886eb9e-215d-4f61-a651-4b8ef18aaea3', - timestamp: '2021-03-01T22:55:54.771Z', - type: 'track', - userId: 'user 1', - }, - destination: { - Config: { - apiKey: 'abcde', - environment: 'production', - trafficType: 'user', - }, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://events.split.io/api/events', - headers: { - 'Content-Type': 'application/json', - Authorization: 'Bearer abcde', - }, - params: {}, - body: { - JSON: { - eventTypeId: 'splitio_test_1', - key: 'user 1', - timestamp: 1614639354771, - value: 0.93, - environmentName: 'production', - trafficTypeName: 'user', - properties: { - martin: 21.565, - vertical: 'restaurant', - GMV: true, - abc: 'new-val', - 'property1.property2': 1, - 'property1.property3': 'test', - 'property1.property4.subProp1.a': 'a', - 'property1.property4.subProp1.b': 'b', - 'property1.property4.subProp2[0]': 'a', - 'property1.property4.subProp2[1]': 'b', - }, - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'splitio', - description: 'Test 3', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - name: 'splitio_test_1', - messageId: '9b200548-5961-4448-9dbc-098b7ce85751', - properties: { - eventTypeId: 'page_load', - trafficTypeName: 'user', - key: 'key_user_0', - timestamp: 1513357833000, - value: '0.93', - martin: 21.565, - vertical: 'restaurant', - GMV: true, - abc: 'new-val', - }, - receivedAt: '2021-03-01T22:55:54.806Z', - rudderId: '6886eb9e-215d-4f61-a651-4b8ef18aaea3', - timestamp: '2021-03-01T22:55:54.771Z', - type: 'page', - userId: 'user 1', - }, - destination: { - Config: { - apiKey: 'abcde', - environment: 'production', - trafficType: 'user', - }, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://events.split.io/api/events', - headers: { - 'Content-Type': 'application/json', - Authorization: 'Bearer abcde', - }, - params: {}, - body: { - JSON: { - eventTypeId: 'Viewed_splitio_test_1_page', - key: 'user 1', - timestamp: 1614639354771, - value: 0.93, - environmentName: 'production', - trafficTypeName: 'user', - properties: { - martin: 21.565, - vertical: 'restaurant', - GMV: true, - abc: 'new-val', - }, - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'splitio', - description: 'Test 4', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - name: 'splitio_test_1', - messageId: '9b200548-5961-4448-9dbc-098b7ce85751', - properties: { - eventTypeId: 'page_load', - trafficTypeName: 'user', - key: 'key_user_0', - timestamp: 1513357833000, - value: '0.93', - martin: 21.565, - vertical: 'restaurant', - GMV: true, - abc: 'new-val', - }, - receivedAt: '2021-03-01T22:55:54.806Z', - rudderId: '6886eb9e-215d-4f61-a651-4b8ef18aaea3', - timestamp: '2021-03-01T22:55:54.771Z', - type: 'screen', - userId: 'user 1', - }, - destination: { - Config: { - apiKey: 'abcde', - environment: 'staging', - trafficType: 'user', - }, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://events.split.io/api/events', - headers: { - 'Content-Type': 'application/json', - Authorization: 'Bearer abcde', - }, - params: {}, - body: { - JSON: { - eventTypeId: 'Viewed_splitio_test_1_screen', - key: 'user 1', - timestamp: 1614639354771, - value: 0.93, - environmentName: 'staging', - trafficTypeName: 'user', - properties: { - martin: 21.565, - vertical: 'restaurant', - GMV: true, - abc: 'new-val', - }, - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'splitio', - description: 'Test 5', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - userId: 'user123', - messageId: 'c73198a8-41d8-4426-9fd9-de167194d5f3', - rudderId: 'bda76e3e-87eb-4153-9d1e-e9c2ed48b7a5', - context: { - ip: '14.5.67.21', - traits: { - abc: 'new-val', - key: 'key_user_0', - newProperty: '1', - martin: 21.565, - vertical: 'restaurant', - GMV: false, - }, - library: { - name: 'http', - }, - }, - type: 'identify', - timestamp: '2020-01-21T00:21:34.208Z', - writeKey: '1pe7u01A7rYOrvacE6WSgI6ESXh', - receivedAt: '2021-04-19T14:53:18.215+05:30', - requestIP: '[::1]', - }, - destination: { - Config: { - apiKey: 'abcde', - environment: 'staging', - trafficType: 'user', - }, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://events.split.io/api/events', - headers: { - 'Content-Type': 'application/json', - Authorization: 'Bearer abcde', - }, - params: {}, - body: { - JSON: { - eventTypeId: 'identify', - key: 'user123', - timestamp: 1579566094208, - environmentName: 'staging', - trafficTypeName: 'user', - properties: { - abc: 'new-val', - newProperty: '1', - martin: 21.565, - vertical: 'restaurant', - GMV: false, - }, - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'splitio', - description: 'Test 6', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - userId: 'user123', - messageId: 'c73198a8-41d8-4426-9fd9-de167194d5f3', - rudderId: 'bda76e3e-87eb-4153-9d1e-e9c2ed48b7a5', - context: { - ip: '14.5.67.21', - traits: { - abc: 'new-val', - key: 'key_user_0', - newProperty: '1', - }, - library: { - name: 'http', - }, - }, - timestamp: '2020-01-21T00:21:34.208Z', - writeKey: '1pe7u01A7rYOrvacE6WSgI6ESXh', - receivedAt: '2021-04-19T14:53:18.215+05:30', - requestIP: '[::1]', - }, - destination: { - Config: { - apiKey: 'abcde', - environment: 'staging', - trafficType: 'user', - }, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - statusCode: 400, - error: 'Event type is required', - statTags: { - errorCategory: 'dataValidation', - errorType: 'instrumentation', - destType: 'SPLITIO', - module: 'destination', - implementation: 'native', - feature: 'processor', - }, - }, - ], - }, - }, - }, - { - name: 'splitio', - description: 'Test 7', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - userId: 'user123', - messageId: 'c73198a8-41d8-4426-9fd9-de167194d5f3', - rudderId: 'bda76e3e-87eb-4153-9d1e-e9c2ed48b7a5', - context: { - ip: '14.5.67.21', - traits: { - abc: 'new-val', - key: 'key_user_0', - newProperty: '1', - }, - library: { - name: 'http', - }, - }, - type: 'abc', - timestamp: '2020-01-21T00:21:34.208Z', - writeKey: '1pe7u01A7rYOrvacE6WSgI6ESXh', - receivedAt: '2021-04-19T14:53:18.215+05:30', - requestIP: '[::1]', - }, - destination: { - Config: { - apiKey: 'abcde', - environment: 'staging', - trafficType: 'user', - }, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - statusCode: 400, - error: 'Event type abc is not supported', - statTags: { - errorCategory: 'dataValidation', - errorType: 'instrumentation', - destType: 'SPLITIO', - module: 'destination', - implementation: 'native', - feature: 'processor', - }, - }, - ], - }, - }, - }, - { - name: 'splitio', - description: 'Test 8', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - name: '@$%%^&', - messageId: '9b200548-5961-4448-9dbc-098b7ce85751', - properties: { - eventTypeId: 'page_load', - trafficTypeName: 'user', - key: 'key_user_0', - timestamp: 1513357833000, - value: '0.93', - martin: 21.565, - vertical: 'restaurant', - GMV: true, - abc: 'new-val', - }, - receivedAt: '2021-03-01T22:55:54.806Z', - rudderId: '6886eb9e-215d-4f61-a651-4b8ef18aaea3', - timestamp: '2021-03-01T22:55:54.771Z', - type: 'page', - userId: 'user 1', - }, - destination: { - Config: { - apiKey: 'abcde', - environment: 'production', - trafficType: 'user', - }, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - statusCode: 400, - error: 'eventTypeId does not match with ideal format /^[\\dA-Za-z][\\w.-]{0,79}$/', - statTags: { - errorCategory: 'dataValidation', - errorType: 'instrumentation', - destType: 'SPLITIO', - module: 'destination', - implementation: 'native', - feature: 'processor', - }, - }, - ], - }, - }, - }, - { - name: 'splitio', - description: 'Test 9', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - name: '1pplication accepted', - messageId: '9b200548-5961-4448-9dbc-098b7ce85751', - category: 'food', - properties: { - eventTypeId: 'page_load', - trafficTypeName: 'user', - key: 'key_user_0', - timestamp: 1513357833000, - value: 'bc2', - martin: 21.565, - vertical: ['restaurant', 'mall'], - GMV: true, - abc: 'new-val', - }, - receivedAt: '2021-03-01T22:55:54.806Z', - rudderId: '6886eb9e-215d-4f61-a651-4b8ef18aaea3', - timestamp: '2021-03-01T22:55:54.771Z', - type: 'page', - userId: 'user 1', - }, - destination: { - Config: { - apiKey: 'abcde', - environment: 'production', - trafficType: 'user', - }, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://events.split.io/api/events', - headers: { - 'Content-Type': 'application/json', - Authorization: 'Bearer abcde', - }, - params: {}, - body: { - JSON: { - eventTypeId: 'Viewed_1pplication_accepted_page', - key: 'user 1', - timestamp: 1614639354771, - environmentName: 'production', - trafficTypeName: 'user', - properties: { - martin: 21.565, - 'vertical[0]': 'restaurant', - 'vertical[1]': 'mall', - GMV: true, - abc: 'new-val', - category: 'food', - }, - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'splitio', - description: 'Test 10', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - userId: 'user123', - messageId: 'c73198a8-41d8-4426-9fd9-de167194d5f3', - rudderId: 'bda76e3e-87eb-4153-9d1e-e9c2ed48b7a5', - context: { - ip: '14.5.67.21', - library: { - name: 'http', - }, - }, - type: 'identify', - timestamp: '2020-01-21T00:21:34.208Z', - writeKey: '1pe7u01A7rYOrvacE6WSgI6ESXh', - receivedAt: '2021-04-19T14:53:18.215+05:30', - requestIP: '[::1]', - }, - destination: { - Config: { - apiKey: 'abcde', - environment: 'staging', - trafficType: 'user', - }, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://events.split.io/api/events', - headers: { - 'Content-Type': 'application/json', - Authorization: 'Bearer abcde', - }, - params: {}, - body: { - JSON: { - eventTypeId: 'identify', - key: 'user123', - timestamp: 1579566094208, - environmentName: 'staging', - trafficTypeName: 'user', - properties: {}, - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, -]; + { + "name": "splitio", + "description": "Test 0", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "traits": { + "martin": 21.565, + "trafficTypeName": "user", + "vertical": "restaurant", + "eventTypeId": "page_load end to end", + "timestamp": 1513357833000, + "GMV": false + }, + "userId": "user123", + "messageId": "c73198a8-41d8-4426-9fd9-de167194d5f3", + "rudderId": "bda76e3e-87eb-4153-9d1e-e9c2ed48b7a5", + "context": { + "ip": "14.5.67.21", + "traits": { + "abc": "new-val", + "key": "key_user_0", + "value": "0.93" + }, + "library": { + "name": "http" + } + }, + "type": "group", + "groupId": "group1", + "timestamp": "2020-01-21T00:21:34.208Z", + "writeKey": "1pe7u01A7rYOrvacE6WSgI6ESXh", + "receivedAt": "2021-04-19T14:53:18.215+05:30", + "requestIP": "[::1]" + }, + "destination": { + "Config": { + "apiKey": "abcde", + "environment": "staging", + "trafficType": "user" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://events.split.io/api/events", + "headers": { + "Content-Type": "application/json", + "Authorization": "Bearer abcde" + }, + "params": {}, + "body": { + "JSON": { + "eventTypeId": "group", + "key": "user123", + "timestamp": 1579566094208, + "environmentName": "staging", + "trafficTypeName": "user", + "properties": { + "martin": 21.565, + "vertical": "restaurant", + "GMV": false + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "splitio", + "description": "Test 1", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "traits": { + "martin": 21.565, + "trafficTypeName": "user", + "eventTypeId": "page_load end to end", + "timestamp": 1513357833000, + "address": { + "city": "San Francisco", + "state": "CA", + "country": "USA" + }, + "key1": { + "a": "a" + }, + "key2": [ + 1, + 2, + 3 + ], + "key3": { + "key4": {} + }, + "key5": null + }, + "userId": "user123", + "messageId": "c73198a8-41d8-4426-9fd9-de167194d5f3", + "rudderId": "bda76e3e-87eb-4153-9d1e-e9c2ed48b7a5", + "context": { + "ip": "14.5.67.21", + "traits": { + "abc": "new-val", + "key": "key_user_0" + }, + "library": { + "name": "http" + } + }, + "type": "identify", + "timestamp": "2020-01-21T00:21:34.208Z", + "writeKey": "1pe7u01A7rYOrvacE6WSgI6ESXh", + "receivedAt": "2021-04-19T14:53:18.215+05:30", + "requestIP": "[::1]" + }, + "destination": { + "Config": { + "apiKey": "abcde", + "environment": "staging", + "trafficType": "user" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://events.split.io/api/events", + "headers": { + "Content-Type": "application/json", + "Authorization": "Bearer abcde" + }, + "params": {}, + "body": { + "JSON": { + "eventTypeId": "identify", + "key": "user123", + "timestamp": 1579566094208, + "environmentName": "staging", + "trafficTypeName": "user", + "properties": { + "martin": 21.565, + "address.city": "San Francisco", + "address.state": "CA", + "address.country": "USA", + "key1.a": "a", + "key2[0]": 1, + "key2[1]": 2, + "key2[2]": 3 + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "splitio", + "description": "Test 2", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "event": "splitio_test_1", + "messageId": "9b200548-5961-4448-9dbc-098b7ce85751", + "properties": { + "eventTypeId": "page_load", + "trafficTypeName": "user", + "key": "key_user_0", + "timestamp": 1513357833000, + "value": "0.93", + "martin": 21.565, + "vertical": "restaurant", + "GMV": true, + "abc": "new-val", + "property1": { + "property2": 1, + "property3": "test", + "property4": { + "subProp1": { + "a": "a", + "b": "b" + }, + "subProp2": [ + "a", + "b" + ], + "subProp3": { + "prop": {} + } + } + }, + "properties5": null + }, + "receivedAt": "2021-03-01T22:55:54.806Z", + "rudderId": "6886eb9e-215d-4f61-a651-4b8ef18aaea3", + "timestamp": "2021-03-01T22:55:54.771Z", + "type": "track", + "userId": "user 1" + }, + "destination": { + "Config": { + "apiKey": "abcde", + "environment": "production", + "trafficType": "user" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://events.split.io/api/events", + "headers": { + "Content-Type": "application/json", + "Authorization": "Bearer abcde" + }, + "params": {}, + "body": { + "JSON": { + "eventTypeId": "splitio_test_1", + "key": "user 1", + "timestamp": 1614639354771, + "value": 0.93, + "environmentName": "production", + "trafficTypeName": "user", + "properties": { + "martin": 21.565, + "vertical": "restaurant", + "GMV": true, + "abc": "new-val", + "property1.property2": 1, + "property1.property3": "test", + "property1.property4.subProp1.a": "a", + "property1.property4.subProp1.b": "b", + "property1.property4.subProp2[0]": "a", + "property1.property4.subProp2[1]": "b" + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "splitio", + "description": "Test 3", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "name": "splitio_test_1", + "messageId": "9b200548-5961-4448-9dbc-098b7ce85751", + "properties": { + "eventTypeId": "page_load", + "trafficTypeName": "user", + "key": "key_user_0", + "timestamp": 1513357833000, + "value": "0.93", + "martin": 21.565, + "vertical": "restaurant", + "GMV": true, + "abc": "new-val" + }, + "receivedAt": "2021-03-01T22:55:54.806Z", + "rudderId": "6886eb9e-215d-4f61-a651-4b8ef18aaea3", + "timestamp": "2021-03-01T22:55:54.771Z", + "type": "page", + "userId": "user 1" + }, + "destination": { + "Config": { + "apiKey": "abcde", + "environment": "production", + "trafficType": "user" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://events.split.io/api/events", + "headers": { + "Content-Type": "application/json", + "Authorization": "Bearer abcde" + }, + "params": {}, + "body": { + "JSON": { + "eventTypeId": "Viewed_splitio_test_1_page", + "key": "user 1", + "timestamp": 1614639354771, + "value": 0.93, + "environmentName": "production", + "trafficTypeName": "user", + "properties": { + "martin": 21.565, + "vertical": "restaurant", + "GMV": true, + "abc": "new-val" + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "splitio", + "description": "Test 4", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "name": "splitio_test_1", + "messageId": "9b200548-5961-4448-9dbc-098b7ce85751", + "properties": { + "eventTypeId": "page_load", + "trafficTypeName": "user", + "key": "key_user_0", + "timestamp": 1513357833000, + "value": "0.93", + "martin": 21.565, + "vertical": "restaurant", + "GMV": true, + "abc": "new-val" + }, + "receivedAt": "2021-03-01T22:55:54.806Z", + "rudderId": "6886eb9e-215d-4f61-a651-4b8ef18aaea3", + "timestamp": "2021-03-01T22:55:54.771Z", + "type": "screen", + "userId": "user 1" + }, + "destination": { + "Config": { + "apiKey": "abcde", + "environment": "staging", + "trafficType": "user" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://events.split.io/api/events", + "headers": { + "Content-Type": "application/json", + "Authorization": "Bearer abcde" + }, + "params": {}, + "body": { + "JSON": { + "eventTypeId": "Viewed_splitio_test_1_screen", + "key": "user 1", + "timestamp": 1614639354771, + "value": 0.93, + "environmentName": "staging", + "trafficTypeName": "user", + "properties": { + "martin": 21.565, + "vertical": "restaurant", + "GMV": true, + "abc": "new-val" + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "splitio", + "description": "Test 5", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "userId": "user123", + "messageId": "c73198a8-41d8-4426-9fd9-de167194d5f3", + "rudderId": "bda76e3e-87eb-4153-9d1e-e9c2ed48b7a5", + "context": { + "ip": "14.5.67.21", + "traits": { + "abc": "new-val", + "key": "key_user_0", + "newProperty": "1", + "martin": 21.565, + "vertical": "restaurant", + "GMV": false + }, + "library": { + "name": "http" + } + }, + "type": "identify", + "timestamp": "2020-01-21T00:21:34.208Z", + "writeKey": "1pe7u01A7rYOrvacE6WSgI6ESXh", + "receivedAt": "2021-04-19T14:53:18.215+05:30", + "requestIP": "[::1]" + }, + "destination": { + "Config": { + "apiKey": "abcde", + "environment": "staging", + "trafficType": "user" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://events.split.io/api/events", + "headers": { + "Content-Type": "application/json", + "Authorization": "Bearer abcde" + }, + "params": {}, + "body": { + "JSON": { + "eventTypeId": "identify", + "key": "user123", + "timestamp": 1579566094208, + "environmentName": "staging", + "trafficTypeName": "user", + "properties": { + "abc": "new-val", + "newProperty": "1", + "martin": 21.565, + "vertical": "restaurant", + "GMV": false + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "splitio", + "description": "Test 6", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "userId": "user123", + "messageId": "c73198a8-41d8-4426-9fd9-de167194d5f3", + "rudderId": "bda76e3e-87eb-4153-9d1e-e9c2ed48b7a5", + "context": { + "ip": "14.5.67.21", + "traits": { + "abc": "new-val", + "key": "key_user_0", + "newProperty": "1" + }, + "library": { + "name": "http" + } + }, + "timestamp": "2020-01-21T00:21:34.208Z", + "writeKey": "1pe7u01A7rYOrvacE6WSgI6ESXh", + "receivedAt": "2021-04-19T14:53:18.215+05:30", + "requestIP": "[::1]" + }, + "destination": { + "Config": { + "apiKey": "abcde", + "environment": "staging", + "trafficType": "user" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "statusCode": 400, + "error": "Event type is required", + "statTags": { + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "destType": "SPLITIO", + "module": "destination", + "implementation": "native", + "feature": "processor" + } + } + ] + } + } + }, + { + "name": "splitio", + "description": "Test 7", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "userId": "user123", + "messageId": "c73198a8-41d8-4426-9fd9-de167194d5f3", + "rudderId": "bda76e3e-87eb-4153-9d1e-e9c2ed48b7a5", + "context": { + "ip": "14.5.67.21", + "traits": { + "abc": "new-val", + "key": "key_user_0", + "newProperty": "1" + }, + "library": { + "name": "http" + } + }, + "type": "abc", + "timestamp": "2020-01-21T00:21:34.208Z", + "writeKey": "1pe7u01A7rYOrvacE6WSgI6ESXh", + "receivedAt": "2021-04-19T14:53:18.215+05:30", + "requestIP": "[::1]" + }, + "destination": { + "Config": { + "apiKey": "abcde", + "environment": "staging", + "trafficType": "user" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "statusCode": 400, + "error": "Event type abc is not supported", + "statTags": { + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "destType": "SPLITIO", + "module": "destination", + "implementation": "native", + "feature": "processor" + } + } + ] + } + } + }, + { + "name": "splitio", + "description": "Test 8", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "name": "@$%%^&", + "messageId": "9b200548-5961-4448-9dbc-098b7ce85751", + "properties": { + "eventTypeId": "page_load", + "trafficTypeName": "user", + "key": "key_user_0", + "timestamp": 1513357833000, + "value": "0.93", + "martin": 21.565, + "vertical": "restaurant", + "GMV": true, + "abc": "new-val" + }, + "receivedAt": "2021-03-01T22:55:54.806Z", + "rudderId": "6886eb9e-215d-4f61-a651-4b8ef18aaea3", + "timestamp": "2021-03-01T22:55:54.771Z", + "type": "page", + "userId": "user 1" + }, + "destination": { + "Config": { + "apiKey": "abcde", + "environment": "production", + "trafficType": "user" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "statusCode": 400, + "error": "eventTypeId does not match with ideal format /^[\\dA-Za-z][\\w.-]{0,79}$/", + "statTags": { + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "destType": "SPLITIO", + "module": "destination", + "implementation": "native", + "feature": "processor" + } + } + ] + } + } + }, + { + "name": "splitio", + "description": "Test 9", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "name": "1pplication accepted", + "messageId": "9b200548-5961-4448-9dbc-098b7ce85751", + "category": "food", + "properties": { + "eventTypeId": "page_load", + "trafficTypeName": "user", + "key": "key_user_0", + "timestamp": 1513357833000, + "value": "bc2", + "martin": 21.565, + "vertical": [ + "restaurant", + "mall" + ], + "GMV": true, + "abc": "new-val" + }, + "receivedAt": "2021-03-01T22:55:54.806Z", + "rudderId": "6886eb9e-215d-4f61-a651-4b8ef18aaea3", + "timestamp": "2021-03-01T22:55:54.771Z", + "type": "page", + "userId": "user 1" + }, + "destination": { + "Config": { + "apiKey": "abcde", + "environment": "production", + "trafficType": "user" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://events.split.io/api/events", + "headers": { + "Content-Type": "application/json", + "Authorization": "Bearer abcde" + }, + "params": {}, + "body": { + "JSON": { + "eventTypeId": "Viewed_1pplication_accepted_page", + "key": "user 1", + "timestamp": 1614639354771, + "environmentName": "production", + "trafficTypeName": "user", + "properties": { + "martin": 21.565, + "vertical[0]": "restaurant", + "vertical[1]": "mall", + "GMV": true, + "abc": "new-val", + "category": "food" + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "splitio", + "description": "Test 10", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "message": { + "userId": "user123", + "messageId": "c73198a8-41d8-4426-9fd9-de167194d5f3", + "rudderId": "bda76e3e-87eb-4153-9d1e-e9c2ed48b7a5", + "context": { + "ip": "14.5.67.21", + "library": { + "name": "http" + } + }, + "type": "identify", + "timestamp": "2020-01-21T00:21:34.208Z", + "writeKey": "1pe7u01A7rYOrvacE6WSgI6ESXh", + "receivedAt": "2021-04-19T14:53:18.215+05:30", + "requestIP": "[::1]" + }, + "destination": { + "Config": { + "apiKey": "abcde", + "environment": "staging", + "trafficType": "user" + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://events.split.io/api/events", + "headers": { + "Content-Type": "application/json", + "Authorization": "Bearer abcde" + }, + "params": {}, + "body": { + "JSON": { + "eventTypeId": "identify", + "key": "user123", + "timestamp": 1579566094208, + "environmentName": "staging", + "trafficTypeName": "user", + "properties": {} + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + } +] \ No newline at end of file diff --git a/test/integrations/destinations/splitio/router/data.ts b/test/integrations/destinations/splitio/router/data.ts index 47f8ad5cff..1004756812 100644 --- a/test/integrations/destinations/splitio/router/data.ts +++ b/test/integrations/destinations/splitio/router/data.ts @@ -1,8 +1,10 @@ +import { FEATURES } from '../../../../../src/v0/util/tags'; + export const data = [ { name: 'splitio', description: 'Test 0', - feature: 'router', + feature: FEATURES.ROUTER, module: 'destination', version: 'v0', input: { @@ -12,7 +14,7 @@ export const data = [ { message: { traits: { - martin: 21.565, + martin: 21.565000000000001, trafficTypeName: 'user', vertical: 'restaurant', eventTypeId: 'page_load end to end', @@ -24,8 +26,14 @@ export const data = [ rudderId: 'bda76e3e-87eb-4153-9d1e-e9c2ed48b7a5', context: { ip: '14.5.67.21', - traits: { abc: 'new-val', key: 'key_user_0', value: '0.93' }, - library: { name: 'http' }, + traits: { + abc: 'new-val', + key: 'key_user_0', + value: '0.93', + }, + library: { + name: 'http', + }, }, type: 'group', groupId: 'group1', @@ -34,9 +42,15 @@ export const data = [ receivedAt: '2021-04-19T14:53:18.215+05:30', requestIP: '[::1]', }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, destination: { - Config: { apiKey: 'abcde', environment: 'staging', trafficType: 'user' }, + Config: { + apiKey: 'abcde', + environment: 'staging', + trafficType: 'user', + }, }, }, ], @@ -56,7 +70,10 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://events.split.io/api/events', - headers: { 'Content-Type': 'application/json', Authorization: 'Bearer abcde' }, + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer abcde', + }, params: {}, body: { JSON: { @@ -65,7 +82,11 @@ export const data = [ timestamp: 1579566094208, environmentName: 'staging', trafficTypeName: 'user', - properties: { martin: 21.565, vertical: 'restaurant', GMV: false }, + properties: { + martin: 21.565, + vertical: 'restaurant', + GMV: false, + }, }, XML: {}, JSON_ARRAY: {}, @@ -73,11 +94,19 @@ export const data = [ }, files: {}, }, - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [ + { + jobId: 1, + }, + ], batched: false, statusCode: 200, destination: { - Config: { apiKey: 'abcde', environment: 'staging', trafficType: 'user' }, + Config: { + apiKey: 'abcde', + environment: 'staging', + trafficType: 'user', + }, }, }, ], @@ -88,7 +117,7 @@ export const data = [ { name: 'splitio', description: 'Test 1', - feature: 'router', + feature: FEATURES.ROUTER, module: 'destination', version: 'v0', input: { @@ -98,7 +127,7 @@ export const data = [ { message: { traits: { - martin: 21.565, + martin: 21.565000000000001, trafficTypeName: 'user', eventTypeId: 'page_load end to end', timestamp: 1513357833000, @@ -108,8 +137,13 @@ export const data = [ rudderId: 'bda76e3e-87eb-4153-9d1e-e9c2ed48b7a5', context: { ip: '14.5.67.21', - traits: { abc: 'new-val', key: 'key_user_0' }, - library: { name: 'http' }, + traits: { + abc: 'new-val', + key: 'key_user_0', + }, + library: { + name: 'http', + }, }, type: 'identify', timestamp: '2020-01-21T00:21:34.208Z', @@ -117,9 +151,15 @@ export const data = [ receivedAt: '2021-04-19T14:53:18.215+05:30', requestIP: '[::1]', }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, destination: { - Config: { apiKey: 'abcde', environment: 'staging', trafficType: 'user' }, + Config: { + apiKey: 'abcde', + environment: 'staging', + trafficType: 'user', + }, }, }, ], @@ -139,7 +179,10 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://events.split.io/api/events', - headers: { 'Content-Type': 'application/json', Authorization: 'Bearer abcde' }, + headers: { + 'Content-Type': 'application/json', + Authorization: 'Bearer abcde', + }, params: {}, body: { JSON: { @@ -148,7 +191,9 @@ export const data = [ timestamp: 1579566094208, environmentName: 'staging', trafficTypeName: 'user', - properties: { martin: 21.565 }, + properties: { + martin: 21.565, + }, }, XML: {}, JSON_ARRAY: {}, @@ -156,11 +201,19 @@ export const data = [ }, files: {}, }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { - Config: { apiKey: 'abcde', environment: 'staging', trafficType: 'user' }, + Config: { + apiKey: 'abcde', + environment: 'staging', + trafficType: 'user', + }, }, }, ], diff --git a/test/integrations/destinations/stormly/router/data.ts b/test/integrations/destinations/stormly/router/data.ts index 1973173795..efdae153e4 100644 --- a/test/integrations/destinations/stormly/router/data.ts +++ b/test/integrations/destinations/stormly/router/data.ts @@ -1,8 +1,10 @@ +import { FEATURES } from '../../../../../src/v0/util/tags'; + export const data = [ { name: 'stormly', description: 'Test 0', - feature: 'router', + feature: FEATURES.ROUTER, module: 'destination', version: 'v0', input: { @@ -10,29 +12,49 @@ export const data = [ body: { input: [ { - destination: { Config: { apiKey: 'dummyApiKey' }, ID: 'stormly123' }, - metadata: { jobId: 1, userId: 'u1' }, + 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 } }, + 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, userId: 'u1' }, + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + ID: 'stormly123', + }, + metadata: { + jobId: 2, + }, message: { type: 'track', event: 'Product Reviewed', properties: { review_id: '12345', product_id: '123', - rating: 3, + rating: 3.0, review_body: 'Average product, expected much more.', groupId: '91Yb32830', }, @@ -60,7 +82,11 @@ export const data = [ FORM: {}, JSON: { timestamp: '2022-01-20T13:39:21.032Z', - traits: { age: 25, email: 'johndoe@gmail.com', name: 'John Doe' }, + traits: { + age: 25, + email: 'johndoe@gmail.com', + name: 'John Doe', + }, userId: '5136633649', }, JSON_ARRAY: {}, @@ -68,21 +94,42 @@ export const data = [ }, endpoint: 'https://rudderstack.t.stormly.com/webhook/rudderstack/identify', files: {}, - headers: { Authorization: 'Basic dummyApiKey', 'Content-Type': 'application/json' }, + headers: { + Authorization: 'Basic dummyApiKey', + 'Content-Type': 'application/json', + }, method: 'POST', params: {}, type: 'REST', version: '1', }, - destination: { Config: { apiKey: 'dummyApiKey' }, ID: 'stormly123' }, - metadata: [{ jobId: 1, userId: 'u1' }], + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + ID: 'stormly123', + }, + metadata: [ + { + jobId: 1, + }, + ], statusCode: 200, }, { - destination: { Config: { apiKey: 'dummyApiKey' }, ID: 'stormly123' }, + destination: { + Config: { + apiKey: 'dummyApiKey', + }, + ID: 'stormly123', + }, batched: false, error: 'Missing required value from "userIdOnly"', - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], statTags: { destType: 'STORMLY', errorCategory: 'dataValidation', diff --git a/test/integrations/destinations/the_trade_desk/router/data.ts b/test/integrations/destinations/the_trade_desk/router/data.ts index 600d25c4fc..3c9cb1cc70 100644 --- a/test/integrations/destinations/the_trade_desk/router/data.ts +++ b/test/integrations/destinations/the_trade_desk/router/data.ts @@ -1,6 +1,18 @@ +import { overrideDestination } from '../../../testUtils'; +import { defaultMockFns } from '../mocks'; +import { + destType, + destTypeInUpperCase, + advertiserId, + dataProviderId, + segmentName, + sampleDestination, + sampleContext, +} from '../common'; + export const data = [ { - name: 'the_trade_desk', + name: destType, description: 'Add IDs to the segment', feature: 'router', module: 'destination', @@ -13,66 +25,38 @@ export const data = [ message: { type: 'record', action: 'insert', - fields: { DAID: 'test-daid-1', UID2: 'test-uid2-1' }, - channel: 'sources', - context: { - destinationFields: 'daid, uid2', - externalId: [{ identifierType: 'tdid', type: 'THE_TRADE_DESK-test-segment' }], - mappedToDestination: 'true', - sources: { - job_id: 'test-job-id', - job_run_id: 'test-job-run-id', - task_run_id: 'test-task-run-id', - version: 'v1.40.4', - }, + fields: { + DAID: 'test-daid-1', + UID2: 'test-uid2-1', }, + channel: 'sources', + context: sampleContext, recordId: '1', }, - destination: { - Config: { - advertiserId: 'test-advertiser-id', - advertiserSecretKey: 'test-advertiser-secret-key', - dataServer: 'apac', - ttlInDays: 30, - audienceId: 'test-segment', - }, - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + destination: sampleDestination, + metadata: { + jobId: 1, }, - metadata: { jobId: 1, userId: 'u1' }, }, { message: { type: 'record', action: 'insert', - fields: { DAID: 'test-daid-2', UID2: null }, - channel: 'sources', - context: { - destinationFields: 'daid, uid2', - externalId: [{ identifierType: 'tdid', type: 'THE_TRADE_DESK-test-segment' }], - mappedToDestination: 'true', - sources: { - job_id: 'test-job-id', - job_run_id: 'test-job-run-id', - task_run_id: 'test-task-run-id', - version: 'v1.40.4', - }, + fields: { + DAID: 'test-daid-2', + UID2: null, }, + channel: 'sources', + context: sampleContext, recordId: '2', }, - destination: { - Config: { - advertiserId: 'test-advertiser-id', - advertiserSecretKey: 'test-advertiser-secret-key', - dataServer: 'apac', - ttlInDays: 30, - audienceId: 'test-segment', - }, - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + destination: sampleDestination, + metadata: { + jobId: 2, }, - metadata: { jobId: 2, userId: 'u1' }, }, ], - destType: 'the_trade_desk', + destType, }, method: 'POST', }, @@ -93,20 +77,35 @@ export const data = [ params: {}, body: { JSON: { - DataProviderId: 'rudderstack', - AdvertiserId: 'test-advertiser-id', + DataProviderId: dataProviderId, + AdvertiserId: advertiserId, Items: [ { DAID: 'test-daid-1', - Data: [{ Name: 'test-segment', TTLInMinutes: 43200 }], + Data: [ + { + Name: segmentName, + TTLInMinutes: 43200, + }, + ], }, { UID2: 'test-uid2-1', - Data: [{ Name: 'test-segment', TTLInMinutes: 43200 }], + Data: [ + { + Name: segmentName, + TTLInMinutes: 43200, + }, + ], }, { DAID: 'test-daid-2', - Data: [{ Name: 'test-segment', TTLInMinutes: 43200 }], + Data: [ + { + Name: segmentName, + TTLInMinutes: 43200, + }, + ], }, ], }, @@ -118,29 +117,25 @@ export const data = [ }, ], metadata: [ - { jobId: 1, userId: 'u1' }, - { jobId: 2, userId: 'u1' }, + { + jobId: 1, + }, + { + jobId: 2, + }, ], batched: true, statusCode: 200, - destination: { - Config: { - advertiserId: 'test-advertiser-id', - advertiserSecretKey: 'test-advertiser-secret-key', - dataServer: 'apac', - ttlInDays: 30, - audienceId: 'test-segment', - }, - DestinationDefinition: { Config: { cdkV2Enabled: true } }, - }, + destination: sampleDestination, }, ], }, }, }, + mockFns: defaultMockFns, }, { - name: 'the_trade_desk', + name: destType, description: 'Add/Remove IDs to/from the segment and split into multiple requests based on size', feature: 'router', @@ -154,66 +149,38 @@ export const data = [ message: { type: 'record', action: 'insert', - fields: { DAID: 'test-daid-1', UID2: 'test-uid2-1' }, - channel: 'sources', - context: { - destinationFields: 'daid, uid2', - externalId: [{ identifierType: 'tdid', type: 'THE_TRADE_DESK-test-segment' }], - mappedToDestination: 'true', - sources: { - job_id: 'test-job-id', - job_run_id: 'test-job-run-id', - task_run_id: 'test-task-run-id', - version: 'v1.40.4', - }, + fields: { + DAID: 'test-daid-1', + UID2: 'test-uid2-1', }, + channel: 'sources', + context: sampleContext, recordId: '1', }, - destination: { - Config: { - advertiserId: 'test-advertiser-id', - advertiserSecretKey: 'test-advertiser-secret-key', - dataServer: 'apac', - ttlInDays: 30, - audienceId: 'test-segment', - }, - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + destination: sampleDestination, + metadata: { + jobId: 1, }, - metadata: { jobId: 1, userId: 'u1' }, }, { message: { type: 'record', action: 'delete', - fields: { DAID: 'test-daid-2', UID2: 'test-uid2-2' }, - channel: 'sources', - context: { - destinationFields: 'daid, uid2', - externalId: [{ identifierType: 'tdid', type: 'THE_TRADE_DESK-test-segment' }], - mappedToDestination: 'true', - sources: { - job_id: 'test-job-id', - job_run_id: 'test-job-run-id', - task_run_id: 'test-task-run-id', - version: 'v1.40.4', - }, + fields: { + DAID: 'test-daid-2', + UID2: 'test-uid2-2', }, + channel: 'sources', + context: sampleContext, recordId: '2', }, - destination: { - Config: { - advertiserId: 'test-advertiser-id', - advertiserSecretKey: 'test-advertiser-secret-key', - dataServer: 'apac', - ttlInDays: 30, - audienceId: 'test-segment', - }, - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + destination: sampleDestination, + metadata: { + jobId: 2, }, - metadata: { jobId: 2, userId: 'u1' }, }, ], - destType: 'the_trade_desk', + destType, }, method: 'POST', }, @@ -234,18 +201,36 @@ export const data = [ params: {}, body: { JSON: { - DataProviderId: 'rudderstack', - AdvertiserId: 'test-advertiser-id', + DataProviderId: dataProviderId, + AdvertiserId: advertiserId, Items: [ { DAID: 'test-daid-1', - Data: [{ Name: 'test-segment', TTLInMinutes: 43200 }], + Data: [ + { + Name: segmentName, + TTLInMinutes: 43200, + }, + ], }, { UID2: 'test-uid2-1', - Data: [{ Name: 'test-segment', TTLInMinutes: 43200 }], + Data: [ + { + Name: segmentName, + TTLInMinutes: 43200, + }, + ], + }, + { + DAID: 'test-daid-2', + Data: [ + { + Name: segmentName, + TTLInMinutes: 0, + }, + ], }, - { DAID: 'test-daid-2', Data: [{ Name: 'test-segment', TTLInMinutes: 0 }] }, ], }, JSON_ARRAY: {}, @@ -263,10 +248,18 @@ export const data = [ params: {}, body: { JSON: { - DataProviderId: 'rudderstack', - AdvertiserId: 'test-advertiser-id', + DataProviderId: dataProviderId, + AdvertiserId: advertiserId, Items: [ - { UID2: 'test-uid2-2', Data: [{ Name: 'test-segment', TTLInMinutes: 0 }] }, + { + UID2: 'test-uid2-2', + Data: [ + { + Name: segmentName, + TTLInMinutes: 0, + }, + ], + }, ], }, JSON_ARRAY: {}, @@ -277,29 +270,25 @@ export const data = [ }, ], metadata: [ - { jobId: 1, userId: 'u1' }, - { jobId: 2, userId: 'u1' }, + { + jobId: 1, + }, + { + jobId: 2, + }, ], batched: true, statusCode: 200, - destination: { - Config: { - advertiserId: 'test-advertiser-id', - advertiserSecretKey: 'test-advertiser-secret-key', - dataServer: 'apac', - ttlInDays: 30, - audienceId: 'test-segment', - }, - DestinationDefinition: { Config: { cdkV2Enabled: true } }, - }, + destination: sampleDestination, }, ], }, }, }, + mockFns: defaultMockFns, }, { - name: 'the_trade_desk', + name: destType, description: 'Missing segment name (audienceId) in the config (segment name will be populated from vdm)', feature: 'router', @@ -313,66 +302,38 @@ export const data = [ message: { type: 'record', action: 'insert', - fields: { DAID: 'test-daid-1', UID2: 'test-uid2-1' }, - channel: 'sources', - context: { - destinationFields: 'daid, uid2', - externalId: [{ identifierType: 'tdid', type: 'THE_TRADE_DESK-test-segment' }], - mappedToDestination: 'true', - sources: { - job_id: 'test-job-id', - job_run_id: 'test-job-run-id', - task_run_id: 'test-task-run-id', - version: 'v1.40.4', - }, + fields: { + DAID: 'test-daid-1', + UID2: 'test-uid2-1', }, + channel: 'sources', + context: sampleContext, recordId: '1', }, - destination: { - Config: { - advertiserId: 'test-advertiser-id', - advertiserSecretKey: 'test-advertiser-secret-key', - dataServer: 'apac', - ttlInDays: 30, - audienceId: '', - }, - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + destination: overrideDestination(sampleDestination, { audienceId: '' }), + metadata: { + jobId: 1, }, - metadata: { jobId: 1, userId: 'u1' }, }, { message: { type: 'record', action: 'insert', - fields: { DAID: 'test-daid-2', UID2: 'test-uid2-2' }, - channel: 'sources', - context: { - destinationFields: 'daid, uid2', - externalId: [{ identifierType: 'tdid', type: 'THE_TRADE_DESK-test-segment' }], - mappedToDestination: 'true', - sources: { - job_id: 'test-job-id', - job_run_id: 'test-job-run-id', - task_run_id: 'test-task-run-id', - version: 'v1.40.4', - }, + fields: { + DAID: 'test-daid-2', + UID2: 'test-uid2-2', }, + channel: 'sources', + context: sampleContext, recordId: '2', }, - destination: { - Config: { - advertiserId: 'test-advertiser-id', - advertiserSecretKey: 'test-advertiser-secret-key', - dataServer: 'apac', - ttlInDays: 30, - audienceId: '', - }, - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + destination: overrideDestination(sampleDestination, { audienceId: '' }), + metadata: { + jobId: 2, }, - metadata: { jobId: 2, userId: 'u1' }, }, ], - destType: 'the_trade_desk', + destType, }, method: 'POST', }, @@ -384,14 +345,11 @@ export const data = [ output: [ { batched: false, - metadata: [ - { jobId: 1, userId: 'u1' }, - { jobId: 2, userId: 'u1' }, - ], + metadata: [{ jobId: 1 }, { jobId: 2 }], statusCode: 400, error: 'Segment name is not present. Aborting', statTags: { - destType: 'THE_TRADE_DESK', + destType: destTypeInUpperCase, implementation: 'cdkV2', feature: 'router', module: 'destination', @@ -405,7 +363,7 @@ export const data = [ }, }, { - name: 'the_trade_desk', + name: destType, description: 'Missing advertiser ID in the config', feature: 'router', module: 'destination', @@ -418,35 +376,21 @@ export const data = [ message: { type: 'record', action: 'insert', - fields: { DAID: 'test-daid-1', UID2: 'test-uid2-1' }, - channel: 'sources', - context: { - destinationFields: 'daid, uid2', - externalId: [{ identifierType: 'tdid', type: 'THE_TRADE_DESK-test-segment' }], - mappedToDestination: 'true', - sources: { - job_id: 'test-job-id', - job_run_id: 'test-job-run-id', - task_run_id: 'test-task-run-id', - version: 'v1.40.4', - }, + fields: { + DAID: 'test-daid-1', + UID2: 'test-uid2-1', }, + channel: 'sources', + context: sampleContext, recordId: '1', }, - destination: { - Config: { - advertiserId: '', - advertiserSecretKey: 'test-advertiser-secret-key', - dataServer: 'apac', - ttlInDays: 30, - audienceId: 'test-segment', - }, - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + destination: overrideDestination(sampleDestination, { advertiserId: '' }), + metadata: { + jobId: 1, }, - metadata: { jobId: 1, userId: 'u1' }, }, ], - destType: 'the_trade_desk', + destType, }, method: 'POST', }, @@ -458,11 +402,11 @@ export const data = [ output: [ { batched: false, - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [{ jobId: 1 }], statusCode: 400, error: 'Advertiser ID is not present. Aborting', statTags: { - destType: 'THE_TRADE_DESK', + destType: destTypeInUpperCase, implementation: 'cdkV2', feature: 'router', module: 'destination', @@ -476,7 +420,7 @@ export const data = [ }, }, { - name: 'the_trade_desk', + name: destType, description: 'Missing advertiser secret key in the config', feature: 'router', module: 'destination', @@ -489,35 +433,21 @@ export const data = [ message: { type: 'record', action: 'insert', - fields: { DAID: 'test-daid-1', UID2: 'test-uid2-1' }, - channel: 'sources', - context: { - destinationFields: 'daid, uid2', - externalId: [{ identifierType: 'tdid', type: 'THE_TRADE_DESK-test-segment' }], - mappedToDestination: 'true', - sources: { - job_id: 'test-job-id', - job_run_id: 'test-job-run-id', - task_run_id: 'test-task-run-id', - version: 'v1.40.4', - }, + fields: { + DAID: 'test-daid-1', + UID2: 'test-uid2-1', }, + channel: 'sources', + context: sampleContext, recordId: '1', }, - destination: { - Config: { - advertiserId: 'test-advertiser-id', - advertiserSecretKey: '', - dataServer: 'apac', - ttlInDays: 30, - audienceId: 'test-segment', - }, - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + destination: overrideDestination(sampleDestination, { advertiserSecretKey: '' }), + metadata: { + jobId: 1, }, - metadata: { jobId: 1, userId: 'u1' }, }, ], - destType: 'the_trade_desk', + destType, }, method: 'POST', }, @@ -529,11 +459,11 @@ export const data = [ output: [ { batched: false, - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [{ jobId: 1 }], statusCode: 400, error: 'Advertiser Secret Key is not present. Aborting', statTags: { - destType: 'THE_TRADE_DESK', + destType: destTypeInUpperCase, implementation: 'cdkV2', feature: 'router', module: 'destination', @@ -547,7 +477,7 @@ export const data = [ }, }, { - name: 'the_trade_desk', + name: destType, description: 'TTL is out of range', feature: 'router', module: 'destination', @@ -560,35 +490,21 @@ export const data = [ message: { type: 'record', action: 'insert', - fields: { DAID: 'test-daid-1', UID2: 'test-uid2-1' }, - channel: 'sources', - context: { - destinationFields: 'daid, uid2', - externalId: [{ identifierType: 'tdid', type: 'THE_TRADE_DESK-test-segment' }], - mappedToDestination: 'true', - sources: { - job_id: 'test-job-id', - job_run_id: 'test-job-run-id', - task_run_id: 'test-task-run-id', - version: 'v1.40.4', - }, + fields: { + DAID: 'test-daid-1', + UID2: 'test-uid2-1', }, + channel: 'sources', + context: sampleContext, recordId: '1', }, - destination: { - Config: { - advertiserId: 'test-advertiser-id', - advertiserSecretKey: 'test-advertiser-secret-key', - dataServer: 'apac', - ttlInDays: 190, - audienceId: 'test-segment', - }, - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + destination: overrideDestination(sampleDestination, { ttlInDays: 190 }), + metadata: { + jobId: 1, }, - metadata: { jobId: 1, userId: 'u1' }, }, ], - destType: 'the_trade_desk', + destType, }, method: 'POST', }, @@ -600,11 +516,11 @@ export const data = [ output: [ { batched: false, - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [{ jobId: 1 }], statusCode: 400, error: 'TTL is out of range. Allowed values are 0 to 180 days', statTags: { - destType: 'THE_TRADE_DESK', + destType: destTypeInUpperCase, implementation: 'cdkV2', feature: 'router', module: 'destination', diff --git a/test/integrations/destinations/tiktok_ads/processor/data.ts b/test/integrations/destinations/tiktok_ads/processor/data.ts index c1938203e6..76a4a1ca89 100644 --- a/test/integrations/destinations/tiktok_ads/processor/data.ts +++ b/test/integrations/destinations/tiktok_ads/processor/data.ts @@ -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', @@ -4619,7 +4619,7 @@ export const data = [ content_name: 'Monopoly', price: 14, quantity: 1, - brand: 'brand_name', + brand:"brand_name" }, { content_type: 'product_group', diff --git a/test/integrations/destinations/tiktok_ads/router/data.ts b/test/integrations/destinations/tiktok_ads/router/data.ts index 6656ce3518..a8c233c7a8 100644 --- a/test/integrations/destinations/tiktok_ads/router/data.ts +++ b/test/integrations/destinations/tiktok_ads/router/data.ts @@ -1,8 +1,10 @@ +import { FEATURES } from '../../../../../src/v0/util/tags'; + export const data = [ { name: 'tiktok_ads', description: 'Test 0', - feature: 'router', + feature: FEATURES.ROUTER, module: 'destination', version: 'v0', input: { @@ -20,13 +22,21 @@ 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 }, + locale: 'en-US', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, externalId: [ { type: 'tiktokExternalId', @@ -39,9 +49,26 @@ export const data = [ originalTimestamp: '2019-10-14T09:03:17.562Z', timestamp: '2020-09-17T19:49:27Z', type: 'track', - event: 'checkout started', + 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.0, context: { page: { url: 'http://demo.mywebsite.com/purchase', @@ -53,17 +80,15 @@ export const data = [ email: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', }, }, - 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 }, + integrations: { + All: true, + }, sentAt: '2019-10-14T09:03:22.563Z', }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 5, + }, destination: { Config: { accessToken: 'dummyAccessToken', @@ -83,13 +108,21 @@ 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', @@ -102,7 +135,7 @@ export const data = [ originalTimestamp: '2019-10-14T09:03:17.562Z', timestamp: '2020-09-17T19:49:27Z', type: 'track', - event: 'download', + event: 'checkout started', properties: { eventId: '1616318632825_357', context: { @@ -115,21 +148,32 @@ export const data = [ '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', email: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', }, - 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, + value: 46.0, + }, + integrations: { + All: true, }, - integrations: { All: true }, sentAt: '2019-10-14T09:03:22.563Z', }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 1, + }, destination: { Config: { accessToken: 'dummyAccessToken', @@ -149,13 +193,21 @@ 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', @@ -168,7 +220,7 @@ export const data = [ originalTimestamp: '2019-10-14T09:03:17.562Z', timestamp: '2020-09-17T19:49:27Z', type: 'track', - event: 'search', + event: 'download', properties: { eventId: '1616318632825_357', context: { @@ -186,16 +238,30 @@ 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, + value: 46.0, + }, + integrations: { + All: true, }, - integrations: { All: true }, sentAt: '2019-10-14T09:03:22.563Z', }, - metadata: { jobId: 4, userId: 'u1' }, + metadata: { + jobId: 2, + }, destination: { Config: { accessToken: 'dummyAccessToken', @@ -215,13 +281,21 @@ 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 }, + ip: '13.57.97.131', + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, externalId: [ { type: 'tiktokExternalId', @@ -234,16 +308,9 @@ export const data = [ originalTimestamp: '2019-10-14T09:03:17.562Z', timestamp: '2020-09-17T19:49:27Z', type: 'track', - event: 'checkout step completed', + event: 'search', 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, context: { page: { url: 'http://demo.mywebsite.com/purchase', @@ -254,12 +321,35 @@ export const data = [ '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', email: 'f0e388f53921a51f0bb0fc8a2944109ec188b59172935d8f23020b1614cc44bc', }, + 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', + }, + ], + currency: 'USD', + value: 46.0, + }, + integrations: { + All: true, }, - integrations: { All: true }, sentAt: '2019-10-14T09:03:22.563Z', }, - metadata: { jobId: 5, userId: 'u1' }, + metadata: { + jobId: 4, + }, destination: { Config: { accessToken: 'dummyAccessToken', @@ -285,7 +375,10 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://business-api.tiktok.com/open_api/v1.3/pixel/batch/', - headers: { 'Access-Token': 'dummyAccessToken', 'Content-Type': 'application/json' }, + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, params: {}, body: { JSON: { @@ -293,12 +386,32 @@ export const data = [ partner_name: 'RudderStack', batch: [ { - event: 'InitiateCheckout', + event: 'CompletePayment', event_id: '1616318632825_357', type: 'track', 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: { - ip: '13.57.97.131', + ad: { + callback: 'dummyClickId', + }, page: { url: 'http://demo.mywebsite.com/purchase', referrer: 'http://demo.mywebsite.com', @@ -311,25 +424,13 @@ export const data = [ phone_number: '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', }, + ip: '13.57.97.131', user_agent: 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', }, - properties: { - value: 46, - contents: [ - { price: 8, quantity: 2, content_id: '1077218', content_type: 'socks' }, - { - price: 30, - quantity: 1, - content_id: '1197218', - content_type: 'dress', - }, - ], - currency: 'USD', - }, }, { - event: 'Download', + event: 'InitiateCheckout', event_id: '1616318632825_357', type: 'track', timestamp: '2020-09-17T19:49:27Z', @@ -353,7 +454,12 @@ 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, @@ -365,7 +471,7 @@ export const data = [ }, }, { - event: 'Search', + event: 'Download', event_id: '1616318632825_357', type: 'track', timestamp: '2020-09-17T19:49:27Z', @@ -389,7 +495,12 @@ 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, @@ -401,25 +512,12 @@ export const data = [ }, }, { - event: 'CompletePayment', + event: 'Search', event_id: '1616318632825_357', type: 'track', 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' }, + ip: '13.57.97.131', page: { url: 'http://demo.mywebsite.com/purchase', referrer: 'http://demo.mywebsite.com', @@ -432,10 +530,27 @@ export const data = [ phone_number: '2f9d2b4df907e5c9a7b3434351b55700167b998a83dc479b825096486ffcf4ea', }, - ip: '13.57.97.131', user_agent: 'Mozilla/5.0 (platform; rv:geckoversion) Gecko/geckotrail Firefox/firefoxversion', }, + properties: { + value: 46, + contents: [ + { + price: 8, + quantity: 2, + content_id: '1077218', + content_type: 'socks', + }, + { + price: 30, + quantity: 1, + content_id: '1197218', + content_type: 'dress', + }, + ], + currency: 'USD', + }, }, ], }, @@ -446,10 +561,18 @@ export const data = [ files: {}, }, metadata: [ - { jobId: 1, userId: 'u1' }, - { jobId: 2, userId: 'u1' }, - { jobId: 4, userId: 'u1' }, - { jobId: 5, userId: 'u1' }, + { + jobId: 5, + }, + { + jobId: 1, + }, + { + jobId: 2, + }, + { + jobId: 4, + }, ], batched: true, statusCode: 200, @@ -469,7 +592,7 @@ export const data = [ { name: 'tiktok_ads', description: 'Test 1', - feature: 'router', + feature: FEATURES.ROUTER, module: 'destination', version: 'v0', input: { @@ -487,14 +610,27 @@ 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', @@ -510,22 +646,39 @@ 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, + value: 46.0, + }, + integrations: { + All: true, }, - integrations: { All: true }, sentAt: '2019-10-14T09:03:22.563Z', }, - metadata: { jobId: 3, userId: 'u1' }, + metadata: { + jobId: 3, + }, destination: { Config: { accessToken: 'dummyAccessToken', @@ -574,8 +727,18 @@ export const data = [ 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, @@ -605,7 +768,11 @@ export const data = [ hashUserProperties: true, }, }, - metadata: [{ jobId: 3, userId: 'u1' }], + metadata: [ + { + jobId: 3, + }, + ], statusCode: 200, }, ], diff --git a/test/integrations/destinations/tiktok_ads_offline_events/processor/data.ts b/test/integrations/destinations/tiktok_ads_offline_events/processor/data.ts index 2b9341b851..a4ff796f37 100644 --- a/test/integrations/destinations/tiktok_ads_offline_events/processor/data.ts +++ b/test/integrations/destinations/tiktok_ads_offline_events/processor/data.ts @@ -1,617 +1,618 @@ export const data = [ - { - name: 'tiktok_ads_offline_events', - description: 'Test 0', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - accessToken: 'dummyAccessToken', - hashUserProperties: true, - }, - }, - message: { - type: 'Identify', - userId: 'yash001', - originalTimestamp: '2019-10-14T09:03:17.562Z', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - statusCode: 400, - error: 'Event type identify is not supported', - statTags: { - errorCategory: 'dataValidation', - errorType: 'instrumentation', - destType: 'TIKTOK_ADS_OFFLINE_EVENTS', - module: 'destination', - implementation: 'native', - feature: 'processor', - }, - }, - ], - }, - }, - }, - { - name: 'tiktok_ads_offline_events', - description: 'Test 1', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - accessToken: 'dummyAccessToken', - hashUserProperties: false, - }, - }, - message: { - event: 'subscribe', - context: { - traits: { - phone: 'c775e7b757ede630cd0aa1113bd102661ab38829ca52a6422ab782862f268646', - }, - channel: 'web', - }, - properties: { - eventSetId: '7181537436256731137', - eventId: '1616318632825_352', - order_id: 'abc_xyz', - shop_id: '123abc', - currency: 'USD', - value: 46, - price: 8, - quantity: 2, - content_type: 'product1234', - product_id: '1077218', - name: 'socks', - category: "Men's cloth", - }, - type: 'track', - userId: 'eventIdn01', - timestamp: '2023-01-03', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://business-api.tiktok.com/open_api/v1.3/offline/track/', - headers: { - 'Access-Token': 'dummyAccessToken', - 'Content-Type': 'application/json', - }, - params: {}, - body: { - JSON: { - event_set_id: '7181537436256731137', - event_id: '1616318632825_352', - timestamp: '2023-01-03', - properties: { - order_id: 'abc_xyz', - shop_id: '123abc', - currency: 'USD', - value: 46, - event_channel: 'web', - contents: [ - { - content_name: 'socks', - content_type: 'product1234', - content_category: "Men's cloth", - content_id: '1077218', - price: 8, - quantity: 2, - }, - ], - }, - event: 'Subscribe', - partner_name: 'RudderStack', - context: { - user: { - phone_numbers: [ - 'c775e7b757ede630cd0aa1113bd102661ab38829ca52a6422ab782862f268646', - ], - }, - }, - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - event_set_id: '7181537436256731137', - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'tiktok_ads_offline_events', - description: 'Test 2', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - accessToken: 'dummyAccessToken', - hashUserProperties: true, - }, - }, - message: { - event: 'subscribe', - context: { - traits: { - phone: '1234567890', - }, - channel: 'web', - }, - properties: { - eventSetId: '7181537436256731137', - eventId: '1616318632825_352', - prop1: 'val1', - }, - type: 'track', - userId: 'eventIdn01', - timestamp: '2023-01-03', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://business-api.tiktok.com/open_api/v1.3/offline/track/', - headers: { - 'Access-Token': 'dummyAccessToken', - 'Content-Type': 'application/json', - }, - params: {}, - body: { - JSON: { - event_set_id: '7181537436256731137', - event_id: '1616318632825_352', - timestamp: '2023-01-03', - properties: { - event_channel: 'web', - }, - event: 'Subscribe', - partner_name: 'RudderStack', - context: { - user: { - phone_numbers: [ - 'c775e7b757ede630cd0aa1113bd102661ab38829ca52a6422ab782862f268646', - ], - }, - }, - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - event_set_id: '7181537436256731137', - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'tiktok_ads_offline_events', - description: 'Test 3', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - accessToken: 'dummyAccessToken', - hashUserProperties: true, - eventsToStandard: [ - { - from: 'RandomEvent', - to: 'SubmitForm', - }, - ], - }, - }, - message: { - event: 'RandomEvent', - context: { - traits: { - phone: '1234567890', - }, - channel: 'web', - }, - properties: { - eventSetId: '7185009018564395009', - eventId: '1616318632003_004', - prop1: 'val1', - }, - userId: 'eventIdn01', - timestamp: '2023-01-03', - type: 'track', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://business-api.tiktok.com/open_api/v1.3/offline/track/', - headers: { - 'Access-Token': 'dummyAccessToken', - 'Content-Type': 'application/json', - }, - params: {}, - body: { - JSON: { - event_set_id: '7185009018564395009', - event_id: '1616318632003_004', - timestamp: '2023-01-03', - properties: { - event_channel: 'web', - }, - event: 'SubmitForm', - partner_name: 'RudderStack', - context: { - user: { - phone_numbers: [ - 'c775e7b757ede630cd0aa1113bd102661ab38829ca52a6422ab782862f268646', - ], - }, - }, - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - event_set_id: '7185009018564395009', - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'tiktok_ads_offline_events', - description: 'Test 4', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - hashUserProperties: true, - }, - }, - message: { - type: 'track', - userId: 'yash001', - originalTimestamp: '2019-10-14T09:03:17.562Z', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - statusCode: 400, - error: 'Access Token not found', - statTags: { - errorCategory: 'dataValidation', - errorType: 'configuration', - destType: 'TIKTOK_ADS_OFFLINE_EVENTS', - module: 'destination', - implementation: 'native', - feature: 'processor', - }, - }, - ], - }, - }, - }, - { - name: 'tiktok_ads_offline_events', - description: 'Test 5', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - accessToken: 'dummyAccessToken', - hashUserProperties: true, - }, - }, - message: { - event: 'subscribe', - context: { - traits: { - phone: '1234567890', - email: 'random@mail.com', - }, - channel: 'web', - }, - properties: { - eventSetId: '7181537436256731137', - eventId: '1616318632825_352', - products: [ - { - price: 8, - quantity: 2, - content_type: 'product1', - product_id: '1077218', - name: 'socks', - category: "Men's cloth", - }, - { - price: 18, - quantity: 12, - content_type: 'product2', - product_id: '1077219', - name: 'socks1', - category: "Men's cloth1", - }, - ], - }, - type: 'track', - userId: 'eventIdn01', - timestamp: '2023-01-03', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://business-api.tiktok.com/open_api/v1.3/offline/track/', - headers: { - 'Access-Token': 'dummyAccessToken', - 'Content-Type': 'application/json', - }, - params: {}, - body: { - JSON: { - event_set_id: '7181537436256731137', - event_id: '1616318632825_352', - timestamp: '2023-01-03', - properties: { - event_channel: 'web', - contents: [ - { - content_name: 'socks', - content_type: 'product1', - content_category: "Men's cloth", - content_id: '1077218', - price: 8, - quantity: 2, - }, - { - content_name: 'socks1', - content_type: 'product2', - content_category: "Men's cloth1", - content_id: '1077219', - price: 18, - quantity: 12, - }, - ], - }, - event: 'Subscribe', - partner_name: 'RudderStack', - context: { - user: { - emails: ['d9fcca64ec1b250da4261a3f89a8e0f7749c4e0f5a1a918e5397194c8b5a9f16'], - phone_numbers: [ - 'c775e7b757ede630cd0aa1113bd102661ab38829ca52a6422ab782862f268646', - ], - }, - }, - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - event_set_id: '7181537436256731137', - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'tiktok_ads_offline_events', - description: 'Test 6', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - accessToken: 'dummyAccessToken', - hashUserProperties: true, - eventsToStandard: [ - { - from: 'CompletePayment', - to: 'Purchase', - }, - ], - }, - }, - message: { - type: 'track', - event: 'CompletePayment', - sentAt: '2023-03-22T00:02:33.802Z', - traits: { - email: [ - 'efaaf5c8803af4fbf305d7a110c832673d89ed40983770329092fd04b0ba7900', - '078d6c8e19f24093368d1712d7801970467f59216f7ccc087bf81b91e0e1f68f', - ], - phone: [ - 'c4994d14e724936f1169147dddf1673a09af69b55cc54bc695dbe246bd093b05', - '078d6c8e19f24093368d1712d7801970467f59216f7ccc087bf81b91e0e1f68f', - ], - }, - userId: '60241286212', - channel: 'sources', - context: { - sources: { - job_id: '2N4WuoNQpGYmCPASUvnV86QyhY4/Syncher', - version: 'v1.20.0', - job_run_id: 'cgd4a063b2fn2e1j0q90', - task_run_id: 'cgd4a063b2fn2e1j0qa0', - }, - }, - recordId: '16322', - rudderId: '5b4ed73f-69aa-4198-88d1-3d4d509acbf1', - messageId: 'cgd4b663b2fn2e1j8th0', - timestamp: '2023-03-22T00:02:33.170Z', - properties: { - phone: 'c4994d14e724936f1169147dddf1673a09af69b55cc54bc695dbe246bd093b05', - value: 32.839999999999996, - emails: - '["efaaf5c8803af4fbf305d7a110c832673d89ed40983770329092fd04b0ba7900","078d6c8e19f24093368d1712d7801970467f59216f7ccc087bf81b91e0e1f68f","","","","","","","",""]', - eventId: '8965fb56-090f-47a5-aa7f-bbab22d9ec90', - currency: 'USD', - order_id: 60241286212, - eventSetId: '7211223771099742210', - event_name: 'CompletePayment', - }, - receivedAt: '2023-03-22T00:02:33.171Z', - request_ip: '10.7.78.187', - anonymousId: '60241286212', - originalTimestamp: '2023-03-22T00:02:33.802Z', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://business-api.tiktok.com/open_api/v1.3/offline/track/', - headers: { - 'Access-Token': 'dummyAccessToken', - 'Content-Type': 'application/json', - }, - params: {}, - body: { - JSON: { - event_set_id: '7211223771099742210', - event_id: '8965fb56-090f-47a5-aa7f-bbab22d9ec90', - timestamp: '2023-03-22T00:02:33.170Z', - properties: { - order_id: 60241286212, - currency: 'USD', - value: 32.839999999999996, - }, - event: 'Purchase', - partner_name: 'RudderStack', - context: { - user: { - emails: [ - '4dc75b075057df6f6b729e74a9feed1244dcf8ceb7903eaba13203f3268ae4b9', - '77b639edeb3cd6c801ea05176b8acbfa38d5f38490b764cd0c80756d0cf9ec68', - ], - phone_numbers: [ - '28b7b205c2936d2ded022d2587fb2677a76e560e921b3ad615b739b0238baa5d', - '77b639edeb3cd6c801ea05176b8acbfa38d5f38490b764cd0c80756d0cf9ec68', - ], - }, - }, - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - event_set_id: '7211223771099742210', - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, -]; + { + "name": "tiktok_ads_offline_events", + "description": "Test 0", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "accessToken": "dummyAccessToken", + "hashUserProperties": true + } + }, + "message": { + "type": "Identify", + "userId": "yash001", + "originalTimestamp": "2019-10-14T09:03:17.562Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "statusCode": 400, + "error": "Event type identify is not supported", + "statTags": { + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "destType": "TIKTOK_ADS_OFFLINE_EVENTS", + "module": "destination", + "implementation": "native", + "feature": "processor" + } + } + ] + } + } + }, + { + "name": "tiktok_ads_offline_events", + "description": "Test 1", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "accessToken": "dummyAccessToken", + "hashUserProperties": false + } + }, + "message": { + "event": "subscribe", + "context": { + "traits": { + "phone": "c775e7b757ede630cd0aa1113bd102661ab38829ca52a6422ab782862f268646" + }, + "channel": "web" + }, + "properties": { + "eventSetId": "7181537436256731137", + "eventId": "1616318632825_352", + "order_id": "abc_xyz", + "shop_id": "123abc", + "currency": "USD", + "value": 46, + "price": 8, + "quantity": 2, + "content_type": "product1234", + "product_id": "1077218", + "name": "socks", + "category": "Men's cloth" + }, + "type": "track", + "userId": "eventIdn01", + "timestamp": "2023-01-03" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://business-api.tiktok.com/open_api/v1.3/offline/track/", + "headers": { + "Access-Token": "dummyAccessToken", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "event_set_id": "7181537436256731137", + "event_id": "1616318632825_352", + "timestamp": "2023-01-03", + "properties": { + "order_id": "abc_xyz", + "shop_id": "123abc", + "currency": "USD", + "value": 46, + "event_channel": "web", + "contents": [ + { + "content_name": "socks", + "content_type": "product1234", + "content_category": "Men's cloth", + "content_id": "1077218", + "price": 8, + "quantity": 2 + } + ] + }, + "event": "Subscribe", + "partner_name": "RudderStack", + "context": { + "user": { + "phone_numbers": [ + "c775e7b757ede630cd0aa1113bd102661ab38829ca52a6422ab782862f268646" + ] + } + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "event_set_id": "7181537436256731137", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "tiktok_ads_offline_events", + "description": "Test 2", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "accessToken": "dummyAccessToken", + "hashUserProperties": true + } + }, + "message": { + "event": "subscribe", + "context": { + "traits": { + "phone": "1234567890" + }, + "channel": "web" + }, + "properties": { + "eventSetId": "7181537436256731137", + "eventId": "1616318632825_352", + "prop1": "val1" + }, + "type": "track", + "userId": "eventIdn01", + "timestamp": "2023-01-03" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://business-api.tiktok.com/open_api/v1.3/offline/track/", + "headers": { + "Access-Token": "dummyAccessToken", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "event_set_id": "7181537436256731137", + "event_id": "1616318632825_352", + "timestamp": "2023-01-03", + "properties": { + "event_channel": "web" + }, + "event": "Subscribe", + "partner_name": "RudderStack", + "context": { + "user": { + "phone_numbers": [ + "c775e7b757ede630cd0aa1113bd102661ab38829ca52a6422ab782862f268646" + ] + } + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "event_set_id": "7181537436256731137", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "tiktok_ads_offline_events", + "description": "Test 3", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "accessToken": "dummyAccessToken", + "hashUserProperties": true, + "eventsToStandard": [ + { + "from": "RandomEvent", + "to": "SubmitForm" + } + ] + } + }, + "message": { + "event": "RandomEvent", + "context": { + "traits": { + "phone": "1234567890" + }, + "channel": "web" + }, + "properties": { + "eventSetId": "7185009018564395009", + "eventId": "1616318632003_004", + "prop1": "val1" + }, + "userId": "eventIdn01", + "timestamp": "2023-01-03", + "type": "track" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://business-api.tiktok.com/open_api/v1.3/offline/track/", + "headers": { + "Access-Token": "dummyAccessToken", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "event_set_id": "7185009018564395009", + "event_id": "1616318632003_004", + "timestamp": "2023-01-03", + "properties": { + "event_channel": "web" + }, + "event": "SubmitForm", + "partner_name": "RudderStack", + "context": { + "user": { + "phone_numbers": [ + "c775e7b757ede630cd0aa1113bd102661ab38829ca52a6422ab782862f268646" + ] + } + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "event_set_id": "7185009018564395009", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "tiktok_ads_offline_events", + "description": "Test 4", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "hashUserProperties": true + } + }, + "message": { + "type": "track", + "userId": "yash001", + "originalTimestamp": "2019-10-14T09:03:17.562Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "statusCode": 400, + "error": "Access Token not found", + "statTags": { + "errorCategory": "dataValidation", + "errorType": "configuration", + "destType": "TIKTOK_ADS_OFFLINE_EVENTS", + "module": "destination", + "implementation": "native", + "feature": "processor" + } + } + ] + } + } + }, + { + "name": "tiktok_ads_offline_events", + "description": "Test 5", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "accessToken": "dummyAccessToken", + "hashUserProperties": true + } + }, + "message": { + "event": "subscribe", + "context": { + "traits": { + "phone": "1234567890", + "email": "random@mail.com" + }, + "channel": "web" + }, + "properties": { + "eventSetId": "7181537436256731137", + "eventId": "1616318632825_352", + "products": [ + { + "price": 8, + "quantity": 2, + "content_type": "product1", + "product_id": "1077218", + "name": "socks", + "category": "Men's cloth" + }, + { + "price": 18, + "quantity": 12, + "content_type": "product2", + "product_id": "1077219", + "name": "socks1", + "category": "Men's cloth1" + } + ] + }, + "type": "track", + "userId": "eventIdn01", + "timestamp": "2023-01-03" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://business-api.tiktok.com/open_api/v1.3/offline/track/", + "headers": { + "Access-Token": "dummyAccessToken", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "event_set_id": "7181537436256731137", + "event_id": "1616318632825_352", + "timestamp": "2023-01-03", + "properties": { + "event_channel": "web", + "contents": [ + { + "content_name": "socks", + "content_type": "product1", + "content_category": "Men's cloth", + "content_id": "1077218", + "price": 8, + "quantity": 2 + }, + { + "content_name": "socks1", + "content_type": "product2", + "content_category": "Men's cloth1", + "content_id": "1077219", + "price": 18, + "quantity": 12 + } + ] + }, + "event": "Subscribe", + "partner_name": "RudderStack", + "context": { + "user": { + "emails": [ + "d9fcca64ec1b250da4261a3f89a8e0f7749c4e0f5a1a918e5397194c8b5a9f16" + ], + "phone_numbers": [ + "c775e7b757ede630cd0aa1113bd102661ab38829ca52a6422ab782862f268646" + ] + } + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "event_set_id": "7181537436256731137", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "tiktok_ads_offline_events", + "description": "Test 6", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "accessToken": "dummyAccessToken", + "hashUserProperties": true, + "eventsToStandard": [ + { + "from": "CompletePayment", + "to": "Purchase" + } + ] + } + }, + "message": { + "type": "track", + "event": "CompletePayment", + "sentAt": "2023-03-22T00:02:33.802Z", + "traits": { + "email": [ + "efaaf5c8803af4fbf305d7a110c832673d89ed40983770329092fd04b0ba7900", + "078d6c8e19f24093368d1712d7801970467f59216f7ccc087bf81b91e0e1f68f" + ], + "phone": [ + "c4994d14e724936f1169147dddf1673a09af69b55cc54bc695dbe246bd093b05", + "078d6c8e19f24093368d1712d7801970467f59216f7ccc087bf81b91e0e1f68f" + ] + }, + "userId": "60241286212", + "channel": "sources", + "context": { + "sources": { + "job_id": "2N4WuoNQpGYmCPASUvnV86QyhY4/Syncher", + "version": "v1.20.0", + "job_run_id": "cgd4a063b2fn2e1j0q90", + "task_run_id": "cgd4a063b2fn2e1j0qa0" + } + }, + "recordId": "16322", + "rudderId": "5b4ed73f-69aa-4198-88d1-3d4d509acbf1", + "messageId": "cgd4b663b2fn2e1j8th0", + "timestamp": "2023-03-22T00:02:33.170Z", + "properties": { + "phone": "c4994d14e724936f1169147dddf1673a09af69b55cc54bc695dbe246bd093b05", + "value": 32.839999999999996, + "emails": "[\"efaaf5c8803af4fbf305d7a110c832673d89ed40983770329092fd04b0ba7900\",\"078d6c8e19f24093368d1712d7801970467f59216f7ccc087bf81b91e0e1f68f\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]", + "eventId": "8965fb56-090f-47a5-aa7f-bbab22d9ec90", + "currency": "USD", + "order_id": 60241286212, + "eventSetId": "7211223771099742210", + "event_name": "CompletePayment" + }, + "receivedAt": "2023-03-22T00:02:33.171Z", + "request_ip": "10.7.78.187", + "anonymousId": "60241286212", + "originalTimestamp": "2023-03-22T00:02:33.802Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://business-api.tiktok.com/open_api/v1.3/offline/track/", + "headers": { + "Access-Token": "dummyAccessToken", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "event_set_id": "7211223771099742210", + "event_id": "8965fb56-090f-47a5-aa7f-bbab22d9ec90", + "timestamp": "2023-03-22T00:02:33.170Z", + "properties": { + "order_id": 60241286212, + "currency": "USD", + "value": 32.839999999999996 + }, + "event": "Purchase", + "partner_name": "RudderStack", + "context": { + "user": { + "emails": [ + "4dc75b075057df6f6b729e74a9feed1244dcf8ceb7903eaba13203f3268ae4b9", + "77b639edeb3cd6c801ea05176b8acbfa38d5f38490b764cd0c80756d0cf9ec68" + ], + "phone_numbers": [ + "28b7b205c2936d2ded022d2587fb2677a76e560e921b3ad615b739b0238baa5d", + "77b639edeb3cd6c801ea05176b8acbfa38d5f38490b764cd0c80756d0cf9ec68" + ] + } + } + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "event_set_id": "7211223771099742210", + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + } +] \ No newline at end of file diff --git a/test/integrations/destinations/tiktok_ads_offline_events/router/data.ts b/test/integrations/destinations/tiktok_ads_offline_events/router/data.ts index 15b5f6674d..c479da741b 100644 --- a/test/integrations/destinations/tiktok_ads_offline_events/router/data.ts +++ b/test/integrations/destinations/tiktok_ads_offline_events/router/data.ts @@ -1,8 +1,10 @@ +import { FEATURES } from '../../../../../src/v0/util/tags'; + export const data = [ { name: 'tiktok_ads_offline_events', description: 'Test 0', - feature: 'router', + feature: FEATURES.ROUTER, module: 'destination', version: 'v0', input: { @@ -10,20 +12,30 @@ export const data = [ body: { input: [ { - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, destination: { - Config: { accessToken: 'dummyAccessToken', hashUserProperties: true }, + Config: { + accessToken: 'dummyAccessToken', + hashUserProperties: true, + }, }, message: { event: 'subscribe', - context: { traits: { phone: '1234567890' }, channel: 'web' }, + context: { + traits: { + phone: '1234567890', + }, + channel: 'web', + }, properties: { eventSetId: '7181537436256731137', eventId: '1616318632825_352', order_id: 'abc_xyz', shop_id: '123abc', currency: 'USD', - value: 46, + value: 46.0, price: 8, quantity: 2, content_type: 'product1234', @@ -37,14 +49,22 @@ export const data = [ }, }, { - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, destination: { - Config: { accessToken: 'dummyAccessToken', hashUserProperties: true }, + Config: { + accessToken: 'dummyAccessToken', + hashUserProperties: true, + }, }, message: { event: 'subscribe', context: { - traits: { phone: '1234567890', email: 'random@mail.com' }, + traits: { + phone: '1234567890', + email: 'random@mail.com', + }, channel: 'web', }, properties: { @@ -91,7 +111,10 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://business-api.tiktok.com/open_api/v1.3/offline/batch/', - headers: { 'Access-Token': 'dummyAccessToken', 'Content-Type': 'application/json' }, + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, params: {}, body: { JSON: { @@ -126,7 +149,7 @@ export const data = [ ], event_channel: 'web', currency: 'USD', - value: 46, + value: 46.0, }, }, { @@ -176,11 +199,18 @@ export const data = [ files: {}, }, destination: { - Config: { accessToken: 'dummyAccessToken', hashUserProperties: true }, + Config: { + accessToken: 'dummyAccessToken', + hashUserProperties: true, + }, }, metadata: [ - { jobId: 1, userId: 'u1' }, - { jobId: 2, userId: 'u1' }, + { + jobId: 1, + }, + { + jobId: 2, + }, ], statusCode: 200, }, @@ -192,7 +222,7 @@ export const data = [ { name: 'tiktok_ads_offline_events', description: 'Test 1', - feature: 'router', + feature: FEATURES.ROUTER, module: 'destination', version: 'v0', input: { @@ -200,18 +230,28 @@ export const data = [ body: { input: [ { - metadata: { jobId: 3, userId: 'u1' }, + metadata: { + jobId: 3, + }, destination: { - Config: { accessToken: 'dummyAccessToken', hashUserProperties: true }, + Config: { + accessToken: 'dummyAccessToken', + hashUserProperties: true, + }, }, message: { event: 'subscribe', - context: { traits: { phone: '1234567890' }, channel: 'web' }, + context: { + traits: { + phone: '1234567890', + }, + channel: 'web', + }, properties: { eventSetId: '6071537445256731123', eventId: '1616318632825_352', currency: 'USD', - value: 46, + value: 46.0, price: 8, content_type: 'product1234', }, @@ -237,7 +277,10 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://business-api.tiktok.com/open_api/v1.3/offline/batch/', - headers: { 'Access-Token': 'dummyAccessToken', 'Content-Type': 'application/json' }, + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, params: {}, body: { JSON: { @@ -258,10 +301,15 @@ export const data = [ }, }, properties: { - contents: [{ price: 8, content_type: 'product1234' }], + contents: [ + { + price: 8, + content_type: 'product1234', + }, + ], event_channel: 'web', currency: 'USD', - value: 46, + value: 46.0, }, }, ], @@ -273,9 +321,16 @@ export const data = [ files: {}, }, destination: { - Config: { accessToken: 'dummyAccessToken', hashUserProperties: true }, + Config: { + accessToken: 'dummyAccessToken', + hashUserProperties: true, + }, }, - metadata: [{ jobId: 3, userId: 'u1' }], + metadata: [ + { + jobId: 3, + }, + ], statusCode: 200, }, ], @@ -286,7 +341,7 @@ export const data = [ { name: 'tiktok_ads_offline_events', description: 'Test 2', - feature: 'router', + feature: FEATURES.ROUTER, module: 'destination', version: 'v0', input: { @@ -294,13 +349,26 @@ export const data = [ body: { input: [ { - metadata: { jobId: 4, userId: 'u1' }, + metadata: { + jobId: 4, + }, destination: { - Config: { accessToken: 'dummyAccessToken', hashUserProperties: true }, + Config: { + accessToken: 'dummyAccessToken', + hashUserProperties: true, + }, }, message: { - context: { traits: { phone: '1234567890' }, channel: 'web' }, - properties: { eventSetId: '2345676543', eventId: '1616318632825_352' }, + context: { + traits: { + phone: '1234567890', + }, + channel: 'web', + }, + properties: { + eventSetId: '2345676543', + eventId: '1616318632825_352', + }, type: 'track', userId: 'eventIdn01', timestamp: '2023-01-03', @@ -318,11 +386,18 @@ export const data = [ output: [ { destination: { - Config: { accessToken: 'dummyAccessToken', hashUserProperties: true }, + Config: { + accessToken: 'dummyAccessToken', + hashUserProperties: true, + }, }, batched: false, error: 'Event name is required', - metadata: [{ jobId: 4, userId: 'u1' }], + metadata: [ + { + jobId: 4, + }, + ], statTags: { errorCategory: 'dataValidation', errorType: 'instrumentation', diff --git a/test/integrations/destinations/tiktok_audience/processor/data.ts b/test/integrations/destinations/tiktok_audience/processor/data.ts index 0395ff48e0..a715aa2f72 100644 --- a/test/integrations/destinations/tiktok_audience/processor/data.ts +++ b/test/integrations/destinations/tiktok_audience/processor/data.ts @@ -1,746 +1,854 @@ export const data = [ - { - name: 'tiktok_audience', - description: 'Test 1: Containing SHA256 traits only', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - userId: 'user 1', - type: 'audiencelist', - properties: { - listData: { - add: [ + { + "name": "tiktok_audience", + "description": "Test 1: Containing SHA256 traits only", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ { - EMAIL_SHA256: 'alex@email.com', - }, - { - EMAIL_SHA256: 'amy@abc.com', - }, - { - EMAIL_SHA256: 'van@abc.com', - }, - ], - remove: [ - { - EMAIL_SHA256: 'alex@email.com', - }, + "message": { + "userId": "user 1", + "type": "audiencelist", + "properties": { + "listData": { + "add": [ + { + "EMAIL_SHA256": "alex@email.com" + }, + { + "EMAIL_SHA256": "amy@abc.com" + }, + { + "EMAIL_SHA256": "van@abc.com" + } + ], + "remove": [ + { + "EMAIL_SHA256": "alex@email.com" + }, + { + "EMAIL_SHA256": "amy@abc.com" + }, + { + "EMAIL_SHA256": "van@abc.com" + } + ] + } + }, + "context": { + "ip": "14.5.67.21", + "library": { + "name": "http" + }, + "externalId": [ + { + "type": "TIKTOK_AUDIENCE-23856594064540489", + "identifierType": "EMAIL_SHA256" + } + ], + "destinationFields": "EMAIL_SHA256" + }, + "timestamp": "2020-02-02T00:23:09.544Z" + }, + "metadata": { + "jobId": 1, + "secret": { + "accessToken": "dummyAccessToken", + "advertiserIds": [ + "dummyAdverTiserID" + ] + } + }, + "destination": { + "DestinationDefinition": { + "Config": { + "cdkV2Enabled": true + } + }, + "Config": { + "isHashRequired": true, + "registerDeviceOrBrowserApiKey": true, + "apiKey": "intercomApiKey", + "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", + "collectContext": false + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ { - EMAIL_SHA256: 'amy@abc.com', + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://business-api.tiktok.com/open_api/v1.3/segment/mapping/", + "headers": { + "Access-Token": "dummyAccessToken", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "batch_data": [ + [ + { + "id": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b", + "audience_ids": [ + "23856594064540489" + ] + } + ], + [ + { + "id": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579", + "audience_ids": [ + "23856594064540489" + ] + } + ], + [ + { + "id": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c", + "audience_ids": [ + "23856594064540489" + ] + } + ] + ], + "id_schema": [ + "EMAIL_SHA256" + ], + "advertiser_ids": [ + "dummyAdverTiserID" + ], + "action": "add" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "metadata": { + "jobId": 1, + "secret": { + "accessToken": "dummyAccessToken", + "advertiserIds": [ + "dummyAdverTiserID" + ] + } + }, + "statusCode": 200 }, { - EMAIL_SHA256: 'van@abc.com', - }, - ], - }, - }, - context: { - ip: '14.5.67.21', - library: { - name: 'http', - }, - externalId: [ - { - type: 'TIKTOK_AUDIENCE-23856594064540489', - identifierType: 'EMAIL_SHA256', - }, - ], - destinationFields: 'EMAIL_SHA256', - }, - timestamp: '2020-02-02T00:23:09.544Z', - }, - metadata: { - jobId: 1, - secret: { - accessToken: 'dummyAccessToken', - advertiserIds: ['dummyAdverTiserID'], - }, - }, - destination: { - DestinationDefinition: { - Config: { - cdkV2Enabled: true, - }, - }, - Config: { - isHashRequired: true, - registerDeviceOrBrowserApiKey: true, - apiKey: 'intercomApiKey', - appId: '9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0', - collectContext: false, - }, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://business-api.tiktok.com/open_api/v1.3/segment/mapping/', - headers: { - 'Access-Token': 'dummyAccessToken', - 'Content-Type': 'application/json', - }, - params: {}, - body: { - JSON: { - batch_data: [ - [ - { - id: 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', - audience_ids: ['23856594064540489'], - }, - ], - [ - { - id: '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', - audience_ids: ['23856594064540489'], - }, - ], - [ - { - id: '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', - audience_ids: ['23856594064540489'], - }, - ], - ], - id_schema: ['EMAIL_SHA256'], - advertiser_ids: ['dummyAdverTiserID'], - action: 'add', - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - metadata: { - jobId: 1, - secret: { - accessToken: 'dummyAccessToken', - advertiserIds: ['dummyAdverTiserID'], - }, - }, - statusCode: 200, - }, - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://business-api.tiktok.com/open_api/v1.3/segment/mapping/', - headers: { - 'Access-Token': 'dummyAccessToken', - 'Content-Type': 'application/json', - }, - params: {}, - body: { - JSON: { - batch_data: [ - [ - { - id: 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', - audience_ids: ['23856594064540489'], - }, - ], - [ - { - id: '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', - audience_ids: ['23856594064540489'], - }, - ], - [ - { - id: '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', - audience_ids: ['23856594064540489'], - }, - ], - ], - id_schema: ['EMAIL_SHA256'], - advertiser_ids: ['dummyAdverTiserID'], - action: 'delete', - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - metadata: { - jobId: 1, - secret: { - accessToken: 'dummyAccessToken', - advertiserIds: ['dummyAdverTiserID'], - }, - }, - statusCode: 200, - }, - ], - }, + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://business-api.tiktok.com/open_api/v1.3/segment/mapping/", + "headers": { + "Access-Token": "dummyAccessToken", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "batch_data": [ + [ + { + "id": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b", + "audience_ids": [ + "23856594064540489" + ] + } + ], + [ + { + "id": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579", + "audience_ids": [ + "23856594064540489" + ] + } + ], + [ + { + "id": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c", + "audience_ids": [ + "23856594064540489" + ] + } + ] + ], + "id_schema": [ + "EMAIL_SHA256" + ], + "advertiser_ids": [ + "dummyAdverTiserID" + ], + "action": "delete" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "metadata": { + "jobId": 1, + "secret": { + "accessToken": "dummyAccessToken", + "advertiserIds": [ + "dummyAdverTiserID" + ] + } + }, + "statusCode": 200 + } + ] + } + } }, - }, - { - name: 'tiktok_audience', - description: 'Test 2: Containing SHA256 and MD5 traits', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - userId: 'user 1', - type: 'audiencelist', - properties: { - listData: { - add: [ - { - EMAIL_SHA256: 'alex@email.com', - AAID_MD5: '1234567', - }, + { + "name": "tiktok_audience", + "description": "Test 2: Containing SHA256 and MD5 traits", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ { - EMAIL_SHA256: 'amy@abc.com', - AAID_MD5: '1234568', - }, + "message": { + "userId": "user 1", + "type": "audiencelist", + "properties": { + "listData": { + "add": [ + { + "EMAIL_SHA256": "alex@email.com", + "AAID_MD5": "1234567" + }, + { + "EMAIL_SHA256": "amy@abc.com", + "AAID_MD5": "1234568" + }, + { + "EMAIL_SHA256": "van@abc.com", + "AAID_MD5": "1234569" + } + ], + "remove": [ + { + "EMAIL_SHA256": "alex@email.com", + "AAID_MD5": "1234570" + }, + { + "EMAIL_SHA256": "amy@abc.com", + "AAID_MD5": "1234571" + }, + { + "EMAIL_SHA256": "van@abc.com", + "AAID_MD5": "1234572" + } + ] + } + }, + "context": { + "ip": "14.5.67.21", + "library": { + "name": "http" + }, + "externalId": [ + { + "type": "TIKTOK_AUDIENCE-23856594064540489", + "identifierType": "EMAIL_SHA256" + } + ], + "destinationFields": "EMAIL_SHA256, AAID_MD5" + }, + "timestamp": "2020-02-02T00:23:09.544Z" + }, + "metadata": { + "jobId": 1, + "secret": { + "accessToken": "dummyAccessToken", + "advertiserIds": [ + "dummyAdverTiserID" + ] + } + }, + "destination": { + "DestinationDefinition": { + "Config": { + "cdkV2Enabled": true + } + }, + "Config": { + "isHashRequired": true, + "registerDeviceOrBrowserApiKey": true, + "apiKey": "intercomApiKey", + "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", + "collectContext": false + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ { - EMAIL_SHA256: 'van@abc.com', - AAID_MD5: '1234569', + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://business-api.tiktok.com/open_api/v1.3/segment/mapping/", + "headers": { + "Access-Token": "dummyAccessToken", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "batch_data": [ + [ + { + "id": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b", + "audience_ids": [ + "23856594064540489" + ] + }, + { + "id": "fcea920f7412b5da7be0cf42b8c93759", + "audience_ids": [ + "23856594064540489" + ] + } + ], + [ + { + "id": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579", + "audience_ids": [ + "23856594064540489" + ] + }, + { + "id": "fe743d8d97aa7dfc6c93ccdc2e749513", + "audience_ids": [ + "23856594064540489" + ] + } + ], + [ + { + "id": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c", + "audience_ids": [ + "23856594064540489" + ] + }, + { + "id": "e36a2f90240e9e84483504fd4a704452", + "audience_ids": [ + "23856594064540489" + ] + } + ] + ], + "id_schema": [ + "EMAIL_SHA256", + "AAID_MD5" + ], + "advertiser_ids": [ + "dummyAdverTiserID" + ], + "action": "add" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "metadata": { + "jobId": 1, + "secret": { + "accessToken": "dummyAccessToken", + "advertiserIds": [ + "dummyAdverTiserID" + ] + } + }, + "statusCode": 200 }, - ], - remove: [ { - EMAIL_SHA256: 'alex@email.com', - AAID_MD5: '1234570', - }, - { - EMAIL_SHA256: 'amy@abc.com', - AAID_MD5: '1234571', - }, - { - EMAIL_SHA256: 'van@abc.com', - AAID_MD5: '1234572', - }, - ], - }, - }, - context: { - ip: '14.5.67.21', - library: { - name: 'http', - }, - externalId: [ - { - type: 'TIKTOK_AUDIENCE-23856594064540489', - identifierType: 'EMAIL_SHA256', - }, - ], - destinationFields: 'EMAIL_SHA256, AAID_MD5', - }, - timestamp: '2020-02-02T00:23:09.544Z', - }, - metadata: { - jobId: 1, - secret: { - accessToken: 'dummyAccessToken', - advertiserIds: ['dummyAdverTiserID'], - }, - }, - destination: { - DestinationDefinition: { - Config: { - cdkV2Enabled: true, - }, - }, - Config: { - isHashRequired: true, - registerDeviceOrBrowserApiKey: true, - apiKey: 'intercomApiKey', - appId: '9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0', - collectContext: false, - }, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://business-api.tiktok.com/open_api/v1.3/segment/mapping/', - headers: { - 'Access-Token': 'dummyAccessToken', - 'Content-Type': 'application/json', - }, - params: {}, - body: { - JSON: { - batch_data: [ - [ - { - id: 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', - audience_ids: ['23856594064540489'], - }, - { - id: 'fcea920f7412b5da7be0cf42b8c93759', - audience_ids: ['23856594064540489'], - }, - ], - [ - { - id: '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', - audience_ids: ['23856594064540489'], - }, - { - id: 'fe743d8d97aa7dfc6c93ccdc2e749513', - audience_ids: ['23856594064540489'], - }, - ], - [ - { - id: '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', - audience_ids: ['23856594064540489'], - }, - { - id: 'e36a2f90240e9e84483504fd4a704452', - audience_ids: ['23856594064540489'], - }, - ], - ], - id_schema: ['EMAIL_SHA256', 'AAID_MD5'], - advertiser_ids: ['dummyAdverTiserID'], - action: 'add', - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - metadata: { - jobId: 1, - secret: { - accessToken: 'dummyAccessToken', - advertiserIds: ['dummyAdverTiserID'], - }, - }, - statusCode: 200, - }, - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://business-api.tiktok.com/open_api/v1.3/segment/mapping/', - headers: { - 'Access-Token': 'dummyAccessToken', - 'Content-Type': 'application/json', - }, - params: {}, - body: { - JSON: { - batch_data: [ - [ - { - id: 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', - audience_ids: ['23856594064540489'], - }, - { - id: 'c1abd65fea29d573ddef1bce925e3276', - audience_ids: ['23856594064540489'], - }, - ], - [ - { - id: '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', - audience_ids: ['23856594064540489'], - }, - { - id: '7298110702a080dfc6903f13333eb04a', - audience_ids: ['23856594064540489'], - }, - ], - [ - { - id: '2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c', - audience_ids: ['23856594064540489'], - }, - { - id: 'd9cb68b1fd3b9d32abc5f4cab8b42b68', - audience_ids: ['23856594064540489'], - }, - ], - ], - id_schema: ['EMAIL_SHA256', 'AAID_MD5'], - advertiser_ids: ['dummyAdverTiserID'], - action: 'delete', - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - metadata: { - jobId: 1, - secret: { - accessToken: 'dummyAccessToken', - advertiserIds: ['dummyAdverTiserID'], - }, - }, - statusCode: 200, - }, - ], - }, + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://business-api.tiktok.com/open_api/v1.3/segment/mapping/", + "headers": { + "Access-Token": "dummyAccessToken", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "batch_data": [ + [ + { + "id": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b", + "audience_ids": [ + "23856594064540489" + ] + }, + { + "id": "c1abd65fea29d573ddef1bce925e3276", + "audience_ids": [ + "23856594064540489" + ] + } + ], + [ + { + "id": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579", + "audience_ids": [ + "23856594064540489" + ] + }, + { + "id": "7298110702a080dfc6903f13333eb04a", + "audience_ids": [ + "23856594064540489" + ] + } + ], + [ + { + "id": "2048acfa84a01121060ca2fc8a673a76d427176dc37224d4408c21973bd90e5c", + "audience_ids": [ + "23856594064540489" + ] + }, + { + "id": "d9cb68b1fd3b9d32abc5f4cab8b42b68", + "audience_ids": [ + "23856594064540489" + ] + } + ] + ], + "id_schema": [ + "EMAIL_SHA256", + "AAID_MD5" + ], + "advertiser_ids": [ + "dummyAdverTiserID" + ], + "action": "delete" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "metadata": { + "jobId": 1, + "secret": { + "accessToken": "dummyAccessToken", + "advertiserIds": [ + "dummyAdverTiserID" + ] + } + }, + "statusCode": 200 + } + ] + } + } }, - }, - { - name: 'tiktok_audience', - description: 'Test 3: Containing all possible traits', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - userId: 'user 1', - type: 'audiencelist', - properties: { - listData: { - add: [ + { + "name": "tiktok_audience", + "description": "Test 3: Containing all possible traits", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ { - EMAIL_SHA256: 'alex@email.com', - PHONE_SHA256: '+129988776655', - IDFA_SHA256: '1234lkasfjdalj12321', - AAID_SHA256: '000999OOOQQQQ', - AAID_MD5: '000999OOOQQQQ', - IDFA_MD5: '1234lkasfjdalj12321', - }, + "message": { + "userId": "user 1", + "type": "audiencelist", + "properties": { + "listData": { + "add": [ + { + "EMAIL_SHA256": "alex@email.com", + "PHONE_SHA256": "+129988776655", + "IDFA_SHA256": "1234lkasfjdalj12321", + "AAID_SHA256": "000999OOOQQQQ", + "AAID_MD5": "000999OOOQQQQ", + "IDFA_MD5": "1234lkasfjdalj12321" + }, + { + "EMAIL_SHA256": "amy@abc.com", + "PHONE_SHA256": "+129988776677", + "IDFA_SHA256": "1234lkasfjdalj114455", + "AAID_SHA256": "000999OOOPPPP", + "AAID_MD5": "000999OOOPPPP", + "IDFA_MD5": "1234lkasfjdalj114455" + } + ] + } + }, + "context": { + "ip": "14.5.67.21", + "library": { + "name": "http" + }, + "externalId": [ + { + "type": "TIKTOK_AUDIENCE-23856594064540489", + "identifierType": "EMAIL_SHA256" + } + ], + "destinationFields": "EMAIL_SHA256, PHONE_SHA256, IDFA_SHA256, AAID_SHA256, AAID_MD, IDFA_MD5" + }, + "timestamp": "2020-02-02T00:23:09.544Z" + }, + "metadata": { + "jobId": 1, + "secret": { + "accessToken": "dummyAccessToken", + "advertiserIds": [ + "dummyAdverTiserID" + ] + } + }, + "destination": { + "DestinationDefinition": { + "Config": { + "cdkV2Enabled": true + } + }, + "Config": { + "isHashRequired": true, + "registerDeviceOrBrowserApiKey": true, + "apiKey": "intercomApiKey", + "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", + "collectContext": false + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ { - EMAIL_SHA256: 'amy@abc.com', - PHONE_SHA256: '+129988776677', - IDFA_SHA256: '1234lkasfjdalj114455', - AAID_SHA256: '000999OOOPPPP', - AAID_MD5: '000999OOOPPPP', - IDFA_MD5: '1234lkasfjdalj114455', - }, - ], - }, - }, - context: { - ip: '14.5.67.21', - library: { - name: 'http', - }, - externalId: [ - { - type: 'TIKTOK_AUDIENCE-23856594064540489', - identifierType: 'EMAIL_SHA256', - }, - ], - destinationFields: - 'EMAIL_SHA256, PHONE_SHA256, IDFA_SHA256, AAID_SHA256, AAID_MD, IDFA_MD5', - }, - timestamp: '2020-02-02T00:23:09.544Z', - }, - metadata: { - jobId: 1, - secret: { - accessToken: 'dummyAccessToken', - advertiserIds: ['dummyAdverTiserID'], - }, - }, - destination: { - DestinationDefinition: { - Config: { - cdkV2Enabled: true, - }, - }, - Config: { - isHashRequired: true, - registerDeviceOrBrowserApiKey: true, - apiKey: 'intercomApiKey', - appId: '9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0', - collectContext: false, - }, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://business-api.tiktok.com/open_api/v1.3/segment/mapping/', - headers: { - 'Access-Token': 'dummyAccessToken', - 'Content-Type': 'application/json', - }, - params: {}, - body: { - JSON: { - batch_data: [ - [ - { - id: 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', - audience_ids: ['23856594064540489'], - }, - { - id: '31e78a3bf9ce2b43316f64fe883a531d6266938091e94e2f2480272481163dee', - audience_ids: ['23856594064540489'], - }, - { - id: '0259f595f7172c8dd692a5c37b4d296939555f862aae8adb964391bdb65006ab', - audience_ids: ['23856594064540489'], - }, - { - id: 'b06fbe7a29f33576a792ba3df3c9bf838cd26ea88cf574285fa60dc0234a8485', - audience_ids: ['23856594064540489'], - }, - {}, - { - id: '32ee3d063320815a13e0058c2498ff76', - audience_ids: ['23856594064540489'], - }, - ], - [ - { - id: '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', - audience_ids: ['23856594064540489'], - }, - { - id: 'fb40adc7debbf40e7b45b0a4a91886785dff1a28809276f95f1c44f7045f9b4d', - audience_ids: ['23856594064540489'], - }, - { - id: 'e6bbdf34c5f3472f31b2923a26811560a599233f3dea4c9971595c3bb7b1e8dc', - audience_ids: ['23856594064540489'], - }, - { - id: '661125f7d337811256c5b55996b22c89047804dcec494db72659e4be71e03091', - audience_ids: ['23856594064540489'], - }, - {}, - { - id: '94162773066d6ae88b2658dc58ca2317', - audience_ids: ['23856594064540489'], - }, - ], - ], - id_schema: [ - 'EMAIL_SHA256', - 'PHONE_SHA256', - 'IDFA_SHA256', - 'AAID_SHA256', - 'AAID_MD', - 'IDFA_MD5', - ], - advertiser_ids: ['dummyAdverTiserID'], - action: 'add', - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - metadata: { - jobId: 1, - secret: { - accessToken: 'dummyAccessToken', - advertiserIds: ['dummyAdverTiserID'], - }, - }, - statusCode: 200, - }, - ], - }, + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://business-api.tiktok.com/open_api/v1.3/segment/mapping/", + "headers": { + "Access-Token": "dummyAccessToken", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "batch_data": [ + [ + { + "id": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b", + "audience_ids": [ + "23856594064540489" + ] + }, + { + "id": "31e78a3bf9ce2b43316f64fe883a531d6266938091e94e2f2480272481163dee", + "audience_ids": [ + "23856594064540489" + ] + }, + { + "id": "0259f595f7172c8dd692a5c37b4d296939555f862aae8adb964391bdb65006ab", + "audience_ids": [ + "23856594064540489" + ] + }, + { + "id": "b06fbe7a29f33576a792ba3df3c9bf838cd26ea88cf574285fa60dc0234a8485", + "audience_ids": [ + "23856594064540489" + ] + }, + {}, + { + "id": "32ee3d063320815a13e0058c2498ff76", + "audience_ids": [ + "23856594064540489" + ] + } + ], + [ + { + "id": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579", + "audience_ids": [ + "23856594064540489" + ] + }, + { + "id": "fb40adc7debbf40e7b45b0a4a91886785dff1a28809276f95f1c44f7045f9b4d", + "audience_ids": [ + "23856594064540489" + ] + }, + { + "id": "e6bbdf34c5f3472f31b2923a26811560a599233f3dea4c9971595c3bb7b1e8dc", + "audience_ids": [ + "23856594064540489" + ] + }, + { + "id": "661125f7d337811256c5b55996b22c89047804dcec494db72659e4be71e03091", + "audience_ids": [ + "23856594064540489" + ] + }, + {}, + { + "id": "94162773066d6ae88b2658dc58ca2317", + "audience_ids": [ + "23856594064540489" + ] + } + ] + ], + "id_schema": [ + "EMAIL_SHA256", + "PHONE_SHA256", + "IDFA_SHA256", + "AAID_SHA256", + "AAID_MD", + "IDFA_MD5" + ], + "advertiser_ids": [ + "dummyAdverTiserID" + ], + "action": "add" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "metadata": { + "jobId": 1, + "secret": { + "accessToken": "dummyAccessToken", + "advertiserIds": [ + "dummyAdverTiserID" + ] + } + }, + "statusCode": 200 + } + ] + } + } }, - }, - { - name: 'tiktok_audience', - description: 'Test 4: Considering some null values', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - message: { - userId: 'user 1', - type: 'audiencelist', - properties: { - listData: { - add: [ + { + "name": "tiktok_audience", + "description": "Test 4: Considering some null values", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ { - EMAIL_SHA256: 'alex@email.com', - PHONE_SHA256: '+129988776655', - AAID_MD5: '000999OOOQQQQ', - IDFA_MD5: '1234lkasfjdalj12321', - }, + "message": { + "userId": "user 1", + "type": "audiencelist", + "properties": { + "listData": { + "add": [ + { + "EMAIL_SHA256": "alex@email.com", + "PHONE_SHA256": "+129988776655", + "AAID_MD5": "000999OOOQQQQ", + "IDFA_MD5": "1234lkasfjdalj12321" + }, + { + "EMAIL_SHA256": "amy@abc.com", + "AAID_SHA256": "000999OOOPPPP", + "AAID_MD5": "000999OOOPPPP", + "IDFA_MD5": "1234lkasfjdalj114455" + } + ] + } + }, + "context": { + "ip": "14.5.67.21", + "library": { + "name": "http" + }, + "externalId": [ + { + "type": "TIKTOK_AUDIENCE-23856594064540489", + "identifierType": "EMAIL_SHA256" + } + ], + "destinationFields": "EMAIL_SHA256, PHONE_SHA256, IDFA_SHA256, AAID_SHA256, AAID_MD, IDFA_MD5" + }, + "timestamp": "2020-02-02T00:23:09.544Z" + }, + "metadata": { + "jobId": 1, + "secret": { + "accessToken": "dummyAccessToken", + "advertiserIds": [ + "dummyAdverTiserID" + ] + } + }, + "destination": { + "DestinationDefinition": { + "Config": { + "cdkV2Enabled": true + } + }, + "Config": { + "isHashRequired": true, + "registerDeviceOrBrowserApiKey": true, + "apiKey": "intercomApiKey", + "appId": "9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0", + "collectContext": false + } + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ { - EMAIL_SHA256: 'amy@abc.com', - AAID_SHA256: '000999OOOPPPP', - AAID_MD5: '000999OOOPPPP', - IDFA_MD5: '1234lkasfjdalj114455', - }, - ], - }, - }, - context: { - ip: '14.5.67.21', - library: { - name: 'http', - }, - externalId: [ - { - type: 'TIKTOK_AUDIENCE-23856594064540489', - identifierType: 'EMAIL_SHA256', - }, - ], - destinationFields: - 'EMAIL_SHA256, PHONE_SHA256, IDFA_SHA256, AAID_SHA256, AAID_MD, IDFA_MD5', - }, - timestamp: '2020-02-02T00:23:09.544Z', - }, - metadata: { - jobId: 1, - secret: { - accessToken: 'dummyAccessToken', - advertiserIds: ['dummyAdverTiserID'], - }, - }, - destination: { - DestinationDefinition: { - Config: { - cdkV2Enabled: true, - }, - }, - Config: { - isHashRequired: true, - registerDeviceOrBrowserApiKey: true, - apiKey: 'intercomApiKey', - appId: '9e9cdea1-78fa-4829-a9b2-5d7f7e96d1a0', - collectContext: false, - }, - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://business-api.tiktok.com/open_api/v1.3/segment/mapping/', - headers: { - 'Access-Token': 'dummyAccessToken', - 'Content-Type': 'application/json', - }, - params: {}, - body: { - JSON: { - batch_data: [ - [ - { - id: 'ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b', - audience_ids: ['23856594064540489'], - }, - { - id: '31e78a3bf9ce2b43316f64fe883a531d6266938091e94e2f2480272481163dee', - audience_ids: ['23856594064540489'], - }, - {}, - {}, - {}, - { - id: '32ee3d063320815a13e0058c2498ff76', - audience_ids: ['23856594064540489'], - }, - ], - [ - { - id: '49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579', - audience_ids: ['23856594064540489'], - }, - {}, - {}, - { - id: '661125f7d337811256c5b55996b22c89047804dcec494db72659e4be71e03091', - audience_ids: ['23856594064540489'], - }, - {}, - { - id: '94162773066d6ae88b2658dc58ca2317', - audience_ids: ['23856594064540489'], - }, - ], - ], - id_schema: [ - 'EMAIL_SHA256', - 'PHONE_SHA256', - 'IDFA_SHA256', - 'AAID_SHA256', - 'AAID_MD', - 'IDFA_MD5', - ], - advertiser_ids: ['dummyAdverTiserID'], - action: 'add', - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - metadata: { - jobId: 1, - secret: { - accessToken: 'dummyAccessToken', - advertiserIds: ['dummyAdverTiserID'], - }, - }, - statusCode: 200, - }, - ], - }, - }, - }, -]; + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://business-api.tiktok.com/open_api/v1.3/segment/mapping/", + "headers": { + "Access-Token": "dummyAccessToken", + "Content-Type": "application/json" + }, + "params": {}, + "body": { + "JSON": { + "batch_data": [ + [ + { + "id": "ac0f1baec38a9ef3cfcb56db981df7d9bab2568c7f53ef3776d1c059ec58e72b", + "audience_ids": [ + "23856594064540489" + ] + }, + { + "id": "31e78a3bf9ce2b43316f64fe883a531d6266938091e94e2f2480272481163dee", + "audience_ids": [ + "23856594064540489" + ] + }, + {}, + {}, + {}, + { + "id": "32ee3d063320815a13e0058c2498ff76", + "audience_ids": [ + "23856594064540489" + ] + } + ], + [ + { + "id": "49eaeca26c878f268ad33af8cfa8194ca5b8b8e448b1c775bf9153a2de734579", + "audience_ids": [ + "23856594064540489" + ] + }, + {}, + {}, + { + "id": "661125f7d337811256c5b55996b22c89047804dcec494db72659e4be71e03091", + "audience_ids": [ + "23856594064540489" + ] + }, + {}, + { + "id": "94162773066d6ae88b2658dc58ca2317", + "audience_ids": [ + "23856594064540489" + ] + } + ] + ], + "id_schema": [ + "EMAIL_SHA256", + "PHONE_SHA256", + "IDFA_SHA256", + "AAID_SHA256", + "AAID_MD", + "IDFA_MD5" + ], + "advertiser_ids": [ + "dummyAdverTiserID" + ], + "action": "add" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "metadata": { + "jobId": 1, + "secret": { + "accessToken": "dummyAccessToken", + "advertiserIds": [ + "dummyAdverTiserID" + ] + } + }, + "statusCode": 200 + } + ] + } + } + } +] \ No newline at end of file diff --git a/test/integrations/destinations/tiktok_audience/router/data.ts b/test/integrations/destinations/tiktok_audience/router/data.ts index 71e7038269..c8a8b93d30 100644 --- a/test/integrations/destinations/tiktok_audience/router/data.ts +++ b/test/integrations/destinations/tiktok_audience/router/data.ts @@ -16,22 +16,39 @@ export const data = [ properties: { listData: { add: [ - { EMAIL_SHA256: 'alex@email.com' }, - { EMAIL_SHA256: 'amy@abc.com' }, - { EMAIL_SHA256: 'van@abc.com' }, + { + EMAIL_SHA256: 'alex@email.com', + }, + { + EMAIL_SHA256: 'amy@abc.com', + }, + { + EMAIL_SHA256: 'van@abc.com', + }, ], remove: [ - { EMAIL_SHA256: 'alex@email.com' }, - { EMAIL_SHA256: 'amy@abc.com' }, - { EMAIL_SHA256: 'van@abc.com' }, + { + EMAIL_SHA256: 'alex@email.com', + }, + { + EMAIL_SHA256: 'amy@abc.com', + }, + { + EMAIL_SHA256: 'van@abc.com', + }, ], }, }, context: { ip: '14.5.67.21', - library: { name: 'http' }, + library: { + name: 'http', + }, externalId: [ - { type: 'TIKTOK_AUDIENCE-23856594064540489', identifierType: 'EMAIL_SHA256' }, + { + type: 'TIKTOK_AUDIENCE-23856594064540489', + identifierType: 'EMAIL_SHA256', + }, ], destinationFields: 'EMAIL_SHA256', }, @@ -39,11 +56,17 @@ export const data = [ }, metadata: { jobId: 1, - secret: { accessToken: 'dummyAccessToken', advertiserIds: ['dummyAdverTiserID'] }, - userId: 'u1', + secret: { + accessToken: 'dummyAccessToken', + advertiserIds: ['dummyAdverTiserID'], + }, }, destination: { - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, Config: { isHashRequired: true, registerDeviceOrBrowserApiKey: true, @@ -60,22 +83,45 @@ export const data = [ properties: { listData: { add: [ - { EMAIL_SHA256: 'alex@email.com', AAID_MD5: '1234567' }, - { EMAIL_SHA256: 'amy@abc.com', AAID_MD5: '1234568' }, - { EMAIL_SHA256: 'van@abc.com', AAID_MD5: '1234569' }, + { + EMAIL_SHA256: 'alex@email.com', + AAID_MD5: '1234567', + }, + { + EMAIL_SHA256: 'amy@abc.com', + AAID_MD5: '1234568', + }, + { + EMAIL_SHA256: 'van@abc.com', + AAID_MD5: '1234569', + }, ], remove: [ - { EMAIL_SHA256: 'alex@email.com', AAID_MD5: '1234570' }, - { EMAIL_SHA256: 'amy@abc.com', AAID_MD5: '1234571' }, - { EMAIL_SHA256: 'van@abc.com', AAID_MD5: '1234572' }, + { + EMAIL_SHA256: 'alex@email.com', + AAID_MD5: '1234570', + }, + { + EMAIL_SHA256: 'amy@abc.com', + AAID_MD5: '1234571', + }, + { + EMAIL_SHA256: 'van@abc.com', + AAID_MD5: '1234572', + }, ], }, }, context: { ip: '14.5.67.21', - library: { name: 'http' }, + library: { + name: 'http', + }, externalId: [ - { type: 'TIKTOK_AUDIENCE-23856594064540489', identifierType: 'EMAIL_SHA256' }, + { + type: 'TIKTOK_AUDIENCE-23856594064540489', + identifierType: 'EMAIL_SHA256', + }, ], destinationFields: 'EMAIL_SHA256, AAID_MD5', }, @@ -83,11 +129,17 @@ export const data = [ }, metadata: { jobId: 2, - secret: { accessToken: 'dummyAccessToken', advertiserIds: ['dummyAdverTiserID'] }, - userId: 'u1', + secret: { + accessToken: 'dummyAccessToken', + advertiserIds: ['dummyAdverTiserID'], + }, }, destination: { - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, Config: { isHashRequired: true, registerDeviceOrBrowserApiKey: true, @@ -125,9 +177,14 @@ export const data = [ }, context: { ip: '14.5.67.21', - library: { name: 'http' }, + library: { + name: 'http', + }, externalId: [ - { type: 'TIKTOK_AUDIENCE-23856594064540489', identifierType: 'EMAIL_SHA256' }, + { + type: 'TIKTOK_AUDIENCE-23856594064540489', + identifierType: 'EMAIL_SHA256', + }, ], destinationFields: 'EMAIL_SHA256, PHONE_SHA256, IDFA_SHA256, AAID_SHA256, AAID_MD, IDFA_MD5', @@ -136,11 +193,17 @@ export const data = [ }, metadata: { jobId: 3, - secret: { accessToken: 'dummyAccessToken', advertiserIds: ['dummyAdverTiserID'] }, - userId: 'u1', + secret: { + accessToken: 'dummyAccessToken', + advertiserIds: ['dummyAdverTiserID'], + }, }, destination: { - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, Config: { isHashRequired: true, registerDeviceOrBrowserApiKey: true, @@ -174,9 +237,14 @@ export const data = [ }, context: { ip: '14.5.67.21', - library: { name: 'http' }, + library: { + name: 'http', + }, externalId: [ - { type: 'TIKTOK_AUDIENCE-23856594064540489', identifierType: 'EMAIL_SHA256' }, + { + type: 'TIKTOK_AUDIENCE-23856594064540489', + identifierType: 'EMAIL_SHA256', + }, ], destinationFields: 'EMAIL_SHA256, PHONE_SHA256, IDFA_SHA256, AAID_SHA256, AAID_MD, IDFA_MD5', @@ -185,11 +253,17 @@ export const data = [ }, metadata: { jobId: 4, - secret: { accessToken: 'dummyAccessToken', advertiserIds: ['dummyAdverTiserID'] }, - userId: 'u1', + secret: { + accessToken: 'dummyAccessToken', + advertiserIds: ['dummyAdverTiserID'], + }, }, destination: { - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, Config: { isHashRequired: true, registerDeviceOrBrowserApiKey: true, @@ -222,9 +296,14 @@ export const data = [ }, context: { ip: '14.5.67.21', - library: { name: 'http' }, + library: { + name: 'http', + }, externalId: [ - { type: 'TIKTOK_AUDIENCE-23856594064540489', identifierType: 'EMAIL_SHA256' }, + { + type: 'TIKTOK_AUDIENCE-23856594064540489', + identifierType: 'EMAIL_SHA256', + }, ], destinationFields: 'EMAIL_SHA256, PHONE_SHA256, IDFA_SHA256, AAID_SHA256, AAID_MD, IDFA_MD5', @@ -233,11 +312,17 @@ export const data = [ }, metadata: { jobId: 1524545, - secret: { accessToken: 'dummyAccessToken', advertiserIds: ['dummyAdverTiserID'] }, - userId: 'u1', + secret: { + accessToken: 'dummyAccessToken', + advertiserIds: ['dummyAdverTiserID'], + }, }, destination: { - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, Config: { isHashRequired: true, registerDeviceOrBrowserApiKey: true, @@ -262,7 +347,11 @@ export const data = [ error: 'message Type is not present. Aborting message.', batched: false, destination: { - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, Config: { isHashRequired: true, registerDeviceOrBrowserApiKey: true, @@ -274,8 +363,10 @@ export const data = [ metadata: [ { jobId: 1524545, - secret: { accessToken: 'dummyAccessToken', advertiserIds: ['dummyAdverTiserID'] }, - userId: 'u1', + secret: { + accessToken: 'dummyAccessToken', + advertiserIds: ['dummyAdverTiserID'], + }, }, ], statTags: { @@ -377,7 +468,11 @@ export const data = [ ], batched: true, destination: { - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, Config: { isHashRequired: true, registerDeviceOrBrowserApiKey: true, @@ -389,8 +484,10 @@ export const data = [ metadata: [ { jobId: 1, - secret: { accessToken: 'dummyAccessToken', advertiserIds: ['dummyAdverTiserID'] }, - userId: 'u1', + secret: { + accessToken: 'dummyAccessToken', + advertiserIds: ['dummyAdverTiserID'], + }, }, ], statusCode: 200, @@ -508,7 +605,11 @@ export const data = [ ], batched: true, destination: { - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, Config: { isHashRequired: true, registerDeviceOrBrowserApiKey: true, @@ -520,8 +621,10 @@ export const data = [ metadata: [ { jobId: 2, - secret: { accessToken: 'dummyAccessToken', advertiserIds: ['dummyAdverTiserID'] }, - userId: 'u1', + secret: { + accessToken: 'dummyAccessToken', + advertiserIds: ['dummyAdverTiserID'], + }, }, ], statusCode: 200, @@ -532,7 +635,10 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://business-api.tiktok.com/open_api/v1.3/segment/mapping/', - headers: { 'Access-Token': 'dummyAccessToken', 'Content-Type': 'application/json' }, + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, params: {}, body: { JSON: { @@ -603,7 +709,11 @@ export const data = [ }, batched: true, destination: { - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, Config: { isHashRequired: true, registerDeviceOrBrowserApiKey: true, @@ -615,8 +725,10 @@ export const data = [ metadata: [ { jobId: 3, - secret: { accessToken: 'dummyAccessToken', advertiserIds: ['dummyAdverTiserID'] }, - userId: 'u1', + secret: { + accessToken: 'dummyAccessToken', + advertiserIds: ['dummyAdverTiserID'], + }, }, ], statusCode: 200, @@ -627,7 +739,10 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://business-api.tiktok.com/open_api/v1.3/segment/mapping/', - headers: { 'Access-Token': 'dummyAccessToken', 'Content-Type': 'application/json' }, + headers: { + 'Access-Token': 'dummyAccessToken', + 'Content-Type': 'application/json', + }, params: {}, body: { JSON: { @@ -686,7 +801,11 @@ export const data = [ }, batched: true, destination: { - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, Config: { isHashRequired: true, registerDeviceOrBrowserApiKey: true, @@ -698,8 +817,10 @@ export const data = [ metadata: [ { jobId: 4, - secret: { accessToken: 'dummyAccessToken', advertiserIds: ['dummyAdverTiserID'] }, - userId: 'u1', + secret: { + accessToken: 'dummyAccessToken', + advertiserIds: ['dummyAdverTiserID'], + }, }, ], statusCode: 200, diff --git a/test/integrations/destinations/trengo/router/data.ts b/test/integrations/destinations/trengo/router/data.ts index f7b5022036..eeefb053a8 100644 --- a/test/integrations/destinations/trengo/router/data.ts +++ b/test/integrations/destinations/trengo/router/data.ts @@ -27,25 +27,49 @@ export const data = [ name: 'generic_x86', type: 'android', }, - library: { name: 'com.rudderstack.android.sdk.core', version: '1.0.1-beta.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 }, + 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' }, + 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 }, + integrations: { + All: true, + }, messageId: 'id1', - properties: { name: 'Test Product', phone: '9830311521' }, + properties: { + name: 'Test Product', + phone: '9830311521', + }, originalTimestamp: '2020-12-17T21:00:59.176Z', type: 'track', sentAt: '2020-03-12T09:05:03.421Z', }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, destination: { Config: { apiToken: 'trengo_integration_test_api_token', @@ -53,12 +77,29 @@ export const data = [ channelIdentifier: 'phone', enableDedup: true, eventTemplateMap: [ - { from: 'Product Purchased', to: '{{event}} from Rudderstack' }, - { from: 'checkedOut', to: 'Total cart value {{value}} shipped' }, - { from: 'Order Completed', to: 'Completed Order' }, - { from: 'Stress Test' }, - { from: 'Stress test2', to: '' }, - { from: 'Stress test3', to: '{event} Stress test' }, + { + from: 'Product Purchased', + to: '{{event}} from Rudderstack', + }, + { + from: 'checkedOut', + to: 'Total cart value {{value}} shipped', + }, + { + from: 'Order Completed', + to: 'Completed Order', + }, + { + from: 'Stress Test', + }, + { + from: 'Stress test2', + to: '', + }, + { + from: 'Stress test3', + to: '{event} Stress test', + }, ], }, secretConfig: {}, @@ -129,14 +170,21 @@ export const data = [ }, params: {}, body: { - JSON: { contact_id: 90002431001, channel_id: 'trengo_phone_channel' }, + JSON: { + contact_id: 90002431001, + channel_id: 'trengo_phone_channel', + }, XML: {}, JSON_ARRAY: {}, FORM: {}, }, files: {}, }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { @@ -146,12 +194,29 @@ export const data = [ channelIdentifier: 'phone', enableDedup: true, eventTemplateMap: [ - { from: 'Product Purchased', to: '{{event}} from Rudderstack' }, - { from: 'checkedOut', to: 'Total cart value {{value}} shipped' }, - { from: 'Order Completed', to: 'Completed Order' }, - { from: 'Stress Test' }, - { from: 'Stress test2', to: '' }, - { from: 'Stress test3', to: '{event} Stress test' }, + { + from: 'Product Purchased', + to: '{{event}} from Rudderstack', + }, + { + from: 'checkedOut', + to: 'Total cart value {{value}} shipped', + }, + { + from: 'Order Completed', + to: 'Completed Order', + }, + { + from: 'Stress Test', + }, + { + from: 'Stress test2', + to: '', + }, + { + from: 'Stress test3', + to: '{event} Stress test', + }, ], }, secretConfig: {}, @@ -218,7 +283,10 @@ export const data = [ userId: 'randomUserId', type: 'identify', context: { - traits: { name: 'Jimothy Halpert', email: 'j@d.com' }, + traits: { + name: 'Jimothy Halpert', + email: 'j@d.com', + }, ip: '14.5.67.21', app: { build: '1', @@ -233,16 +301,33 @@ export const data = [ name: 'generic_x86', type: 'android', }, - library: { name: 'com.rudderstack.android.sdk.core', version: '0.1.4' }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '0.1.4', + }, locale: 'en-US', - network: { carrier: 'Android', bluetooth: false, cellular: true, wifi: true }, - os: { name: 'Android', version: '9' }, - screen: { density: 420, height: 1794, width: 1080 }, + network: { + carrier: 'Android', + bluetooth: false, + cellular: true, + wifi: true, + }, + os: { + name: 'Android', + version: '9', + }, + screen: { + density: 420, + height: 1794, + width: 1080, + }, timezone: 'Asia/Kolkata', }, timestamp: '2020-02-02T00:23:09.544Z', }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, destination: { Config: { apiToken: 'trengo_integration_test_api_token', @@ -250,12 +335,29 @@ export const data = [ channelIdentifier: 'email', enableDedup: true, eventTemplateMap: [ - { from: 'Product Purchased', to: '{{event}} from Rudderstack' }, - { from: 'checkedOut', to: 'Total cart value {{value}} shipped' }, - { from: 'Order Completed', to: 'Completed Order' }, - { from: 'Stress Test' }, - { from: 'Stress test2', to: '' }, - { from: 'Stress test3', to: '{event} Stress test' }, + { + from: 'Product Purchased', + to: '{{event}} from Rudderstack', + }, + { + from: 'checkedOut', + to: 'Total cart value {{value}} shipped', + }, + { + from: 'Order Completed', + to: 'Completed Order', + }, + { + from: 'Stress Test', + }, + { + from: 'Stress test2', + to: '', + }, + { + from: 'Stress test3', + to: '{event} Stress test', + }, ], }, secretConfig: {}, @@ -337,7 +439,11 @@ export const data = [ }, files: {}, }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { @@ -347,12 +453,29 @@ export const data = [ channelIdentifier: 'email', enableDedup: true, eventTemplateMap: [ - { from: 'Product Purchased', to: '{{event}} from Rudderstack' }, - { from: 'checkedOut', to: 'Total cart value {{value}} shipped' }, - { from: 'Order Completed', to: 'Completed Order' }, - { from: 'Stress Test' }, - { from: 'Stress test2', to: '' }, - { from: 'Stress test3', to: '{event} Stress test' }, + { + from: 'Product Purchased', + to: '{{event}} from Rudderstack', + }, + { + from: 'checkedOut', + to: 'Total cart value {{value}} shipped', + }, + { + from: 'Order Completed', + to: 'Completed Order', + }, + { + from: 'Stress Test', + }, + { + from: 'Stress test2', + to: '', + }, + { + from: 'Stress test3', + to: '{event} Stress test', + }, ], }, secretConfig: {}, diff --git a/test/integrations/destinations/user/router/data.ts b/test/integrations/destinations/user/router/data.ts index acdb5c953e..30bcdf2688 100644 --- a/test/integrations/destinations/user/router/data.ts +++ b/test/integrations/destinations/user/router/data.ts @@ -16,7 +16,9 @@ export const data = [ 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 }, + integrations: { + All: true, + }, userId: 'user@123', groupId: 'group@795', messageId: '022bb90c-bbac-11e4-8dfc-aa07a5b093db', @@ -37,7 +39,9 @@ export const data = [ }, type: 'group', }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, destination: { Config: { apiKey: 'dummyApiKey', @@ -73,7 +77,10 @@ export const data = [ body: { XML: {}, FORM: {}, - JSON: { user_id: 52, user_custom_id: 'user@123' }, + JSON: { + user_id: 52, + user_custom_id: 'user@123', + }, JSON_ARRAY: {}, }, type: 'REST', @@ -88,7 +95,11 @@ export const data = [ version: '1', endpoint: 'https://commander.user.com/api/public/companies/21/add_member/', }, - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [ + { + jobId: 1, + }, + ], batched: false, statusCode: 200, destination: { @@ -143,10 +154,19 @@ export const data = [ useroccupation: 'mechanical engineer', }, }, - traits: { googleUrl: 'www.google.com' }, - integrations: { All: true, user: { lookup: 'email' } }, + traits: { + googleUrl: 'www.google.com', + }, + integrations: { + All: true, + user: { + lookup: 'email', + }, + }, + }, + metadata: { + jobId: 2, }, - metadata: { jobId: 2, userId: 'u1' }, destination: { Config: { apiKey: 'dummyApiKey', @@ -209,7 +229,11 @@ export const data = [ version: '1', endpoint: 'https://commander.user.com/api/public/users/59/', }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { diff --git a/test/integrations/destinations/vero/processor/data.ts b/test/integrations/destinations/vero/processor/data.ts index cf210f38be..7834f0a541 100644 --- a/test/integrations/destinations/vero/processor/data.ts +++ b/test/integrations/destinations/vero/processor/data.ts @@ -1,808 +1,818 @@ export const data = [ - { - name: 'vero', - description: 'Test 0', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - authToken: 'testAuthToken', - }, - }, - message: { - context: { - traits: { - homwTown: 'kanpur', - age: '24', - }, - }, - type: 'Identify', - userId: 'yash001', - originalTimestamp: '2019-10-14T09:03:17.562Z', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://api.getvero.com/api/v2/users/track', - headers: {}, - params: {}, - body: { - JSON: { - id: 'yash001', - data: { - homwTown: 'kanpur', - age: '24', - }, - auth_token: 'testAuthToken', - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'vero', - description: 'Test 1', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - authToken: 'testAuthToken', - }, - }, - message: { - context: { - traits: { - email: 'user1001@tech.com', - }, - }, - type: 'Identify', - userId: 'user1001', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://api.getvero.com/api/v2/users/track', - headers: {}, - params: {}, - body: { - JSON: { - id: 'user1001', - email: 'user1001@tech.com', - data: {}, - auth_token: 'testAuthToken', - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'vero', - description: 'Test 2', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - authToken: 'testAuthToken', - }, - }, - message: { - context: { - traits: { - email: 'user1002@tech.com', - }, - }, - type: 'Identify', - anonymousId: 'b4ffheww8eisndbdjgdewifewfgerwibderv', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://api.getvero.com/api/v2/users/track', - headers: {}, - params: {}, - body: { - JSON: { - id: 'b4ffheww8eisndbdjgdewifewfgerwibderv', - email: 'user1002@tech.com', - data: {}, - auth_token: 'testAuthToken', - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'vero', - description: 'Test 3', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - authToken: 'testAuthToken', - }, - }, - message: { - context: { - traits: { - address: 'Caravela Beach Goa', - homwTown: 'Mawsynram', - email: 'user1005@tech.com', - }, - }, - integrations: { - vero: { - tags: { - add: ['a', 'b'], - }, - }, - }, - type: 'Identify', - userId: 'fprediruser001', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://api.getvero.com/api/v2/users/track', - headers: {}, - params: {}, - body: { - JSON: { - id: 'fprediruser001', - email: 'user1005@tech.com', - data: { - address: 'Caravela Beach Goa', - homwTown: 'Mawsynram', - }, - auth_token: 'testAuthToken', - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - { - output: { - version: '1', - type: 'REST', - method: 'PUT', - endpoint: 'https://api.getvero.com/api/v2/users/tags/edit', - headers: {}, - params: {}, - body: { - JSON: { - id: 'fprediruser001', - auth_token: 'testAuthToken', - add: ['a', 'b'], - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'vero', - description: 'Test 4', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - authToken: 'testAuthToken', - }, - }, - message: { - event: 'Random event with nonexisting userId and email', - properties: { - movieWatched: 3, - gamesPlayed: 4, - email: 'eventIdn01@sample.com', - }, - type: 'track', - userId: 'eventIdn01', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://api.getvero.com/api/v2/events/track', - headers: {}, - params: {}, - body: { - JSON: { - identity: { - id: 'eventIdn01', - email: 'eventIdn01@sample.com', - }, - event_name: 'Random event with nonexisting userId and email', - data: { - movieWatched: 3, - gamesPlayed: 4, - email: 'eventIdn01@sample.com', - }, - auth_token: 'testAuthToken', - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'vero', - description: 'Test 5', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - authToken: 'testAuthToken', - }, - }, - message: { - event: 'Random event with existing userId and some tags removed', - properties: { - movieWatched: 3, - gamesPlayed: 4, - email: 'eventIdn01@sample.com', - }, - integrations: { - Vero: { - tags: { - remove: ['a'], - }, - }, - }, - type: 'track', - userId: 'fprediruser001', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://api.getvero.com/api/v2/events/track', - headers: {}, - params: {}, - body: { - JSON: { - identity: { - id: 'fprediruser001', - email: 'eventIdn01@sample.com', - }, - event_name: 'Random event with existing userId and some tags removed', - data: { - movieWatched: 3, - gamesPlayed: 4, - email: 'eventIdn01@sample.com', - }, - auth_token: 'testAuthToken', - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - { - output: { - version: '1', - type: 'REST', - method: 'PUT', - endpoint: 'https://api.getvero.com/api/v2/users/tags/edit', - headers: {}, - params: {}, - body: { - JSON: { - id: 'fprediruser001', - auth_token: 'testAuthToken', - remove: ['a'], - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'vero', - description: 'Test 6', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - authToken: 'testAuthToken', - }, - }, - message: { - type: 'alias', - userId: 'sample101', - previousId: 'newsamplel01', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'PUT', - endpoint: 'https://api.getvero.com/api/v2/users/reidentify', - headers: {}, - params: {}, - body: { - JSON: { - new_id: 'sample101', - id: 'newsamplel01', - auth_token: 'testAuthToken', - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'vero', - description: 'Test 7', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - authToken: 'testAuthToken', - }, - }, - message: { - context: { - traits: { - email: 'user1001@tech.com', - }, - os: { - name: 'android', - }, - device: { - token: 'qwertyuioiuytrewwertyu', - name: 'Mi', - }, - }, - type: 'Identify', - userId: 'user1001', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://api.getvero.com/api/v2/users/track', - headers: {}, - params: {}, - body: { - JSON: { - id: 'user1001', - email: 'user1001@tech.com', - data: {}, - channels: { - platform: 'android', - address: 'qwertyuioiuytrewwertyu', - device: 'Mi', - type: 'push', - }, - auth_token: 'testAuthToken', - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'vero', - description: 'Test 8', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - authToken: 'testAuthToken', - }, - }, - message: { - context: { - traits: { - email: 'user1001@tech.com', - }, - device: { - token: 'qwertyuioiuytrewwertyu', - name: 'Mi', - }, - }, - type: 'Identify', - userId: 'user1001', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://api.getvero.com/api/v2/users/track', - headers: {}, - params: {}, - body: { - JSON: { - id: 'user1001', - email: 'user1001@tech.com', - data: {}, - auth_token: 'testAuthToken', - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'vero', - description: 'Test 9', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - authToken: 'testAuthToken', - }, - }, - message: { - event: 'unsubscribe', - type: 'track', - userId: 'eventIdn01', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://api.getvero.com/api/v2/users/unsubscribe', - headers: {}, - params: {}, - body: { - JSON: { - id: 'eventIdn01', - auth_token: 'testAuthToken', - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'vero', - description: 'Test 10', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - authToken: 'testAuthToken', - }, - }, - message: { - name: 'Rudderstack', - properties: { - title: 'rudderstack', - path: '/', - }, - type: 'page', - userId: 'eventIdn01', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://api.getvero.com/api/v2/events/track', - headers: {}, - params: {}, - body: { - JSON: { - identity: { - id: 'eventIdn01', - }, - event_name: 'Viewed Rudderstack Page', - data: { - title: 'rudderstack', - path: '/', - }, - auth_token: 'testAuthToken', - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: '', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'vero', - description: 'Test 11', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - authToken: 'testAuthToken', - }, - }, - message: { - groupId: '1234', - traits: { - name: 'MyGroup', - industry: 'IT', - employees: 450, - plan: 'basic', - }, - type: 'group', - userId: 'eventIdn01', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - statusCode: 400, - error: 'Event type group is not supported', - statTags: { - errorCategory: 'dataValidation', - errorType: 'instrumentation', - destType: 'VERO', - module: 'destination', - implementation: 'native', - feature: 'processor', - }, - }, - ], - }, - }, - }, -]; + { + "name": "vero", + "description": "Test 0", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "authToken": "testAuthToken" + } + }, + "message": { + "context": { + "traits": { + "homwTown": "kanpur", + "age": "24" + } + }, + "type": "Identify", + "userId": "yash001", + "originalTimestamp": "2019-10-14T09:03:17.562Z" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.getvero.com/api/v2/users/track", + "headers": {}, + "params": {}, + "body": { + "JSON": { + "id": "yash001", + "data": { + "homwTown": "kanpur", + "age": "24" + }, + "auth_token": "testAuthToken" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "vero", + "description": "Test 1", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "authToken": "testAuthToken" + } + }, + "message": { + "context": { + "traits": { + "email": "user1001@tech.com" + } + }, + "type": "Identify", + "userId": "user1001" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.getvero.com/api/v2/users/track", + "headers": {}, + "params": {}, + "body": { + "JSON": { + "id": "user1001", + "email": "user1001@tech.com", + "data": {}, + "auth_token": "testAuthToken" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "vero", + "description": "Test 2", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "authToken": "testAuthToken" + } + }, + "message": { + "context": { + "traits": { + "email": "user1002@tech.com" + } + }, + "type": "Identify", + "anonymousId": "b4ffheww8eisndbdjgdewifewfgerwibderv" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.getvero.com/api/v2/users/track", + "headers": {}, + "params": {}, + "body": { + "JSON": { + "id": "b4ffheww8eisndbdjgdewifewfgerwibderv", + "email": "user1002@tech.com", + "data": {}, + "auth_token": "testAuthToken" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "vero", + "description": "Test 3", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "authToken": "testAuthToken" + } + }, + "message": { + "context": { + "traits": { + "address": "Caravela Beach Goa", + "homwTown": "Mawsynram", + "email": "user1005@tech.com" + } + }, + "integrations": { + "vero": { + "tags": { + "add": [ + "a", + "b" + ] + } + } + }, + "type": "Identify", + "userId": "fprediruser001" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.getvero.com/api/v2/users/track", + "headers": {}, + "params": {}, + "body": { + "JSON": { + "id": "fprediruser001", + "email": "user1005@tech.com", + "data": { + "address": "Caravela Beach Goa", + "homwTown": "Mawsynram" + }, + "auth_token": "testAuthToken" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + }, + { + "output": { + "version": "1", + "type": "REST", + "method": "PUT", + "endpoint": "https://api.getvero.com/api/v2/users/tags/edit", + "headers": {}, + "params": {}, + "body": { + "JSON": { + "id": "fprediruser001", + "auth_token": "testAuthToken", + "add": [ + "a", + "b" + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "vero", + "description": "Test 4", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "authToken": "testAuthToken" + } + }, + "message": { + "event": "Random event with nonexisting userId and email", + "properties": { + "movieWatched": 3, + "gamesPlayed": 4, + "email": "eventIdn01@sample.com" + }, + "type": "track", + "userId": "eventIdn01" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.getvero.com/api/v2/events/track", + "headers": {}, + "params": {}, + "body": { + "JSON": { + "identity": { + "id": "eventIdn01", + "email": "eventIdn01@sample.com" + }, + "event_name": "Random event with nonexisting userId and email", + "data": { + "movieWatched": 3, + "gamesPlayed": 4, + "email": "eventIdn01@sample.com" + }, + "auth_token": "testAuthToken" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "vero", + "description": "Test 5", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "authToken": "testAuthToken" + } + }, + "message": { + "event": "Random event with existing userId and some tags removed", + "properties": { + "movieWatched": 3, + "gamesPlayed": 4, + "email": "eventIdn01@sample.com" + }, + "integrations": { + "Vero": { + "tags": { + "remove": [ + "a" + ] + } + } + }, + "type": "track", + "userId": "fprediruser001" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.getvero.com/api/v2/events/track", + "headers": {}, + "params": {}, + "body": { + "JSON": { + "identity": { + "id": "fprediruser001", + "email": "eventIdn01@sample.com" + }, + "event_name": "Random event with existing userId and some tags removed", + "data": { + "movieWatched": 3, + "gamesPlayed": 4, + "email": "eventIdn01@sample.com" + }, + "auth_token": "testAuthToken" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + }, + { + "output": { + "version": "1", + "type": "REST", + "method": "PUT", + "endpoint": "https://api.getvero.com/api/v2/users/tags/edit", + "headers": {}, + "params": {}, + "body": { + "JSON": { + "id": "fprediruser001", + "auth_token": "testAuthToken", + "remove": [ + "a" + ] + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "vero", + "description": "Test 6", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "authToken": "testAuthToken" + } + }, + "message": { + "type": "alias", + "userId": "sample101", + "previousId": "newsamplel01" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "PUT", + "endpoint": "https://api.getvero.com/api/v2/users/reidentify", + "headers": {}, + "params": {}, + "body": { + "JSON": { + "new_id": "sample101", + "id": "newsamplel01", + "auth_token": "testAuthToken" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "vero", + "description": "Test 7", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "authToken": "testAuthToken" + } + }, + "message": { + "context": { + "traits": { + "email": "user1001@tech.com" + }, + "os": { + "name": "android" + }, + "device": { + "token": "qwertyuioiuytrewwertyu", + "name": "Mi" + } + }, + "type": "Identify", + "userId": "user1001" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.getvero.com/api/v2/users/track", + "headers": {}, + "params": {}, + "body": { + "JSON": { + "id": "user1001", + "email": "user1001@tech.com", + "data": {}, + "channels": { + "platform": "android", + "address": "qwertyuioiuytrewwertyu", + "device": "Mi", + "type": "push" + }, + "auth_token": "testAuthToken" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "vero", + "description": "Test 8", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "authToken": "testAuthToken" + } + }, + "message": { + "context": { + "traits": { + "email": "user1001@tech.com" + }, + "device": { + "token": "qwertyuioiuytrewwertyu", + "name": "Mi" + } + }, + "type": "Identify", + "userId": "user1001" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.getvero.com/api/v2/users/track", + "headers": {}, + "params": {}, + "body": { + "JSON": { + "id": "user1001", + "email": "user1001@tech.com", + "data": {}, + "auth_token": "testAuthToken" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "vero", + "description": "Test 9", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "authToken": "testAuthToken" + } + }, + "message": { + "event": "unsubscribe", + "type": "track", + "userId": "eventIdn01" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.getvero.com/api/v2/users/unsubscribe", + "headers": {}, + "params": {}, + "body": { + "JSON": { + "id": "eventIdn01", + "auth_token": "testAuthToken" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "vero", + "description": "Test 10", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "authToken": "testAuthToken" + } + }, + "message": { + "name": "Rudderstack", + "properties": { + "title": "rudderstack", + "path": "/" + }, + "type": "page", + "userId": "eventIdn01" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "output": { + "version": "1", + "type": "REST", + "method": "POST", + "endpoint": "https://api.getvero.com/api/v2/events/track", + "headers": {}, + "params": {}, + "body": { + "JSON": { + "identity": { + "id": "eventIdn01" + }, + "event_name": "Viewed Rudderstack Page", + "data": { + "title": "rudderstack", + "path": "/" + }, + "auth_token": "testAuthToken" + }, + "JSON_ARRAY": {}, + "XML": {}, + "FORM": {} + }, + "files": {}, + "userId": "" + }, + "statusCode": 200 + } + ] + } + } + }, + { + "name": "vero", + "description": "Test 11", + "feature": "processor", + "module": "destination", + "version": "v0", + "input": { + "request": { + "body": [ + { + "destination": { + "Config": { + "authToken": "testAuthToken" + } + }, + "message": { + "groupId": "1234", + "traits": { + "name": "MyGroup", + "industry": "IT", + "employees": 450, + "plan": "basic" + }, + "type": "group", + "userId": "eventIdn01" + } + } + ] + } + }, + "output": { + "response": { + "status": 200, + "body": [ + { + "statusCode": 400, + "error": "Event type group is not supported", + "statTags": { + "errorCategory": "dataValidation", + "errorType": "instrumentation", + "destType": "VERO", + "module": "destination", + "implementation": "native", + "feature": "processor" + } + } + ] + } + } + } +] \ No newline at end of file diff --git a/test/integrations/destinations/vero/router/data.ts b/test/integrations/destinations/vero/router/data.ts index ca23f22feb..17aba359d1 100644 --- a/test/integrations/destinations/vero/router/data.ts +++ b/test/integrations/destinations/vero/router/data.ts @@ -1,8 +1,10 @@ +import { FEATURES } from '../../../../../src/v0/util/tags'; + export const data = [ { name: 'vero', description: 'Test 0', - feature: 'router', + feature: FEATURES.ROUTER, module: 'destination', version: 'v0', input: { @@ -10,10 +12,20 @@ export const data = [ body: { input: [ { - destination: { Config: { authToken: 'testAuthToken' } }, - metadata: { jobId: 1, userId: 'u1' }, + destination: { + Config: { + authToken: 'testAuthToken', + }, + }, + metadata: { + jobId: 1, + }, message: { - context: { traits: { email: 'user001@tech.com' } }, + context: { + traits: { + email: 'user001@tech.com', + }, + }, type: 'Identify', userId: 'user001', }, @@ -53,8 +65,16 @@ export const data = [ files: {}, }, ], - destination: { Config: { authToken: 'testAuthToken' } }, - metadata: [{ jobId: 1, userId: 'u1' }], + destination: { + Config: { + authToken: 'testAuthToken', + }, + }, + metadata: [ + { + jobId: 1, + }, + ], statusCode: 200, }, ], @@ -65,7 +85,7 @@ export const data = [ { name: 'vero', description: 'Test 1', - feature: 'router', + feature: FEATURES.ROUTER, module: 'destination', version: 'v0', input: { @@ -73,10 +93,20 @@ export const data = [ body: { input: [ { - destination: { Config: { authToken: 'testAuthToken' } }, - metadata: { jobId: 2, userId: 'u1' }, + destination: { + Config: { + authToken: 'testAuthToken', + }, + }, + metadata: { + jobId: 2, + }, message: { - context: { traits: { email: 'user002@tech.com' } }, + context: { + traits: { + email: 'user002@tech.com', + }, + }, type: 'Identify', anonymousId: 'b4ffheww8eisndbdjgdewifewfgerwibderv', }, @@ -116,8 +146,16 @@ export const data = [ files: {}, }, ], - destination: { Config: { authToken: 'testAuthToken' } }, - metadata: [{ jobId: 2, userId: 'u1' }], + destination: { + Config: { + authToken: 'testAuthToken', + }, + }, + metadata: [ + { + jobId: 2, + }, + ], statusCode: 200, }, ], @@ -128,7 +166,7 @@ export const data = [ { name: 'vero', description: 'Test 2', - feature: 'router', + feature: FEATURES.ROUTER, module: 'destination', version: 'v0', input: { @@ -136,8 +174,14 @@ export const data = [ body: { input: [ { - destination: { Config: { authToken: 'testAuthToken' } }, - metadata: { jobId: 3, userId: 'u1' }, + destination: { + Config: { + authToken: 'testAuthToken', + }, + }, + metadata: { + jobId: 3, + }, message: { context: { traits: { @@ -146,7 +190,13 @@ export const data = [ email: 'user005@tech.com', }, }, - integrations: { vero: { tags: { add: ['a', 'b'] } } }, + integrations: { + vero: { + tags: { + add: ['a', 'b'], + }, + }, + }, type: 'Identify', userId: 'fprediruser001', }, @@ -176,7 +226,10 @@ export const data = [ JSON: { id: 'fprediruser001', email: 'user005@tech.com', - data: { address: 'Caravela Beach Goa', homwTown: 'Mawsynram' }, + data: { + address: 'Caravela Beach Goa', + homwTown: 'Mawsynram', + }, auth_token: 'testAuthToken', }, JSON_ARRAY: {}, @@ -193,7 +246,11 @@ export const data = [ headers: {}, params: {}, body: { - JSON: { auth_token: 'testAuthToken', id: 'fprediruser001', add: ['a', 'b'] }, + JSON: { + auth_token: 'testAuthToken', + id: 'fprediruser001', + add: ['a', 'b'], + }, JSON_ARRAY: {}, XML: {}, FORM: {}, @@ -201,8 +258,16 @@ export const data = [ files: {}, }, ], - destination: { Config: { authToken: 'testAuthToken' } }, - metadata: [{ jobId: 3, userId: 'u1' }], + destination: { + Config: { + authToken: 'testAuthToken', + }, + }, + metadata: [ + { + jobId: 3, + }, + ], statusCode: 200, }, ], @@ -213,7 +278,7 @@ export const data = [ { name: 'vero', description: 'Test 3', - feature: 'router', + feature: FEATURES.ROUTER, module: 'destination', version: 'v0', input: { @@ -221,11 +286,21 @@ export const data = [ body: { input: [ { - destination: { Config: { authToken: 'testAuthToken' } }, - metadata: { jobId: 4, userId: 'u1' }, + destination: { + Config: { + authToken: 'testAuthToken', + }, + }, + metadata: { + jobId: 4, + }, message: { event: 'Random event with nonexisting userId and email', - properties: { movieWatched: 3, gamesPlayed: 4, email: 'eventIdn02@sample.com' }, + properties: { + movieWatched: 3, + gamesPlayed: 4, + email: 'eventIdn02@sample.com', + }, type: 'track', userId: 'eventIdn01', }, @@ -253,9 +328,16 @@ export const data = [ params: {}, body: { JSON: { - identity: { id: 'eventIdn01', email: 'eventIdn02@sample.com' }, + identity: { + id: 'eventIdn01', + email: 'eventIdn02@sample.com', + }, event_name: 'Random event with nonexisting userId and email', - data: { movieWatched: 3, gamesPlayed: 4, email: 'eventIdn02@sample.com' }, + data: { + movieWatched: 3, + gamesPlayed: 4, + email: 'eventIdn02@sample.com', + }, auth_token: 'testAuthToken', }, JSON_ARRAY: {}, @@ -265,8 +347,16 @@ export const data = [ files: {}, }, ], - destination: { Config: { authToken: 'testAuthToken' } }, - metadata: [{ jobId: 4, userId: 'u1' }], + destination: { + Config: { + authToken: 'testAuthToken', + }, + }, + metadata: [ + { + jobId: 4, + }, + ], statusCode: 200, }, ], diff --git a/test/integrations/destinations/webhook/router/data.ts b/test/integrations/destinations/webhook/router/data.ts index a082eb12f1..291fc5ffba 100644 --- a/test/integrations/destinations/webhook/router/data.ts +++ b/test/integrations/destinations/webhook/router/data.ts @@ -19,15 +19,25 @@ export const data = [ model: 'Redmi 6', name: 'xiaomi', }, - network: { carrier: 'Banglalink' }, - os: { name: 'android', version: '8.1.0' }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, traits: { - address: { city: 'Dhaka', country: 'Bangladesh' }, + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', }, }, event: 'spin_result', - integrations: { All: true }, + integrations: { + All: true, + }, message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', properties: { additional_bet_index: 0, @@ -90,16 +100,28 @@ export const data = [ versionSessionCount: 2, }, }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, destination: { Config: { webhookUrl: 'http://6b0e6a60.ngrok.io', headers: [ - { from: '', to: '' }, - { from: 'test2', to: 'value2' }, + { + from: '', + to: '', + }, + { + from: 'test2', + to: 'value2', + }, ], }, - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, }, }, { @@ -112,15 +134,25 @@ export const data = [ model: 'Redmi 6', name: 'xiaomi', }, - network: { carrier: 'Banglalink' }, - os: { name: 'android', version: '8.1.0' }, + network: { + carrier: 'Banglalink', + }, + os: { + name: 'android', + version: '8.1.0', + }, traits: { - address: { city: 'Dhaka', country: 'Bangladesh' }, + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', }, }, event: 'spin_result', - integrations: { All: true }, + integrations: { + All: true, + }, message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', properties: { additional_bet_index: 0, @@ -183,10 +215,18 @@ export const data = [ versionSessionCount: 2, }, }, - metadata: { jobId: 3, userId: 'u1' }, + metadata: { + jobId: 2, + }, destination: { - Config: { webhookUrl: 'https://6b0e6a60.ngrok.io/n' }, - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + Config: { + webhookUrl: 'https://6b0e6a60.ngrok.io/n', + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, }, }, ], @@ -227,7 +267,9 @@ export const data = [ versionSessionCount: 2, game_name: 'FireEagleSlots', }, - integrations: { All: true }, + integrations: { + All: true, + }, event: 'spin_result', message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', @@ -240,10 +282,18 @@ export const data = [ }, traits: { anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - address: { city: 'Dhaka', country: 'Bangladesh' }, + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, + }, + os: { + version: '8.1.0', + name: 'android', + }, + network: { + carrier: 'Banglalink', }, - os: { version: '8.1.0', name: 'android' }, - network: { carrier: 'Banglalink' }, }, type: 'track', properties: { @@ -290,24 +340,41 @@ export const data = [ files: {}, endpoint: 'http://6b0e6a60.ngrok.io', userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - headers: { 'content-type': 'application/json', test2: 'value2' }, + headers: { + 'content-type': 'application/json', + test2: 'value2', + }, version: '1', params: {}, type: 'REST', method: 'POST', }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { Config: { webhookUrl: 'http://6b0e6a60.ngrok.io', headers: [ - { from: '', to: '' }, - { from: 'test2', to: 'value2' }, + { + from: '', + to: '', + }, + { + from: 'test2', + to: 'value2', + }, ], }, - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, }, }, { @@ -337,7 +404,9 @@ export const data = [ versionSessionCount: 2, game_name: 'FireEagleSlots', }, - integrations: { All: true }, + integrations: { + All: true, + }, event: 'spin_result', message_id: 'a80f82be-9bdc-4a9f-b2a5-15621ee41df8', anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', @@ -350,10 +419,18 @@ export const data = [ }, traits: { anonymousId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - address: { city: 'Dhaka', country: 'Bangladesh' }, + address: { + city: 'Dhaka', + country: 'Bangladesh', + }, + }, + os: { + version: '8.1.0', + name: 'android', + }, + network: { + carrier: 'Banglalink', }, - os: { version: '8.1.0', name: 'android' }, - network: { carrier: 'Banglalink' }, }, type: 'track', properties: { @@ -400,18 +477,30 @@ export const data = [ files: {}, endpoint: 'https://6b0e6a60.ngrok.io/n', userId: 'c82cbdff-e5be-4009-ac78-cdeea09ab4b1', - headers: { 'content-type': 'application/json' }, + headers: { + 'content-type': 'application/json', + }, version: '1', params: {}, type: 'REST', method: 'POST', }, - metadata: [{ jobId: 3, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { - Config: { webhookUrl: 'https://6b0e6a60.ngrok.io/n' }, - DestinationDefinition: { Config: { cdkV2Enabled: true } }, + Config: { + webhookUrl: 'https://6b0e6a60.ngrok.io/n', + }, + DestinationDefinition: { + Config: { + cdkV2Enabled: true, + }, + }, }, }, ], diff --git a/test/integrations/destinations/woopra/router/data.ts b/test/integrations/destinations/woopra/router/data.ts index 941f69c2fe..5a3b20bea6 100644 --- a/test/integrations/destinations/woopra/router/data.ts +++ b/test/integrations/destinations/woopra/router/data.ts @@ -13,15 +13,30 @@ export const data = [ message: { anonymousId: '21e13f4bc7ceddad', context: { - app: { build: '4', name: 'RuddCDN' }, - device: { id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', name: 'generic_x86_arm' }, - os: { name: 'Android', version: '9' }, + app: { + build: '4', + name: 'RuddCDN', + }, + device: { + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + name: 'generic_x86_arm', + }, + os: { + name: 'Android', + version: '9', + }, timezone: 'Asia/Kolkata', - traits: { anonymousId: '21e13f4bc7ceddad' }, + traits: { + anonymousId: '21e13f4bc7ceddad', + }, userAgent: 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', }, - integrations: { woopra: { projectName: 'abc.com' } }, + integrations: { + woopra: { + projectName: 'abc.com', + }, + }, messageId: '1601322811899-d9c7dd00-50dc-4364-95c8-e89423eb3cfb', originalTimestamp: '2020-09-28T19:53:31.900Z', traits: { @@ -37,8 +52,14 @@ export const data = [ timestamp: '2020-09-29T14:50:29.907+05:30', type: 'identify', }, - destination: { Config: { projectName: 'int.com' } }, - metadata: { jobId: 1, userId: 'u1' }, + destination: { + Config: { + projectName: 'int.com', + }, + }, + metadata: { + jobId: 1, + }, }, ], destType: 'woopra', @@ -53,7 +74,12 @@ export const data = [ output: [ { batchedRequest: { - body: { XML: {}, FORM: {}, JSON: {}, JSON_ARRAY: {} }, + body: { + XML: {}, + FORM: {}, + JSON: {}, + JSON_ARRAY: {}, + }, type: 'REST', files: {}, method: 'GET', @@ -74,8 +100,16 @@ export const data = [ version: '1', endpoint: 'https://www.woopra.com/track/identify', }, - destination: { Config: { projectName: 'int.com' } }, - metadata: [{ jobId: 1, userId: 'u1' }], + destination: { + Config: { + projectName: 'int.com', + }, + }, + metadata: [ + { + jobId: 1, + }, + ], batched: false, statusCode: 200, }, @@ -99,26 +133,49 @@ export const data = [ anonymousId: '21e13f4bc7ceddad', channel: 'mobile', context: { - app: { build: '4', name: 'RuddCDN' }, - device: { id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', name: 'generic_x86_arm' }, - library: { name: 'com.rudderstack.android.sdk.core', version: '1.0.6' }, - os: { name: 'Android', version: '9' }, + app: { + build: '4', + name: 'RuddCDN', + }, + device: { + id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', + name: 'generic_x86_arm', + }, + library: { + name: 'com.rudderstack.android.sdk.core', + version: '1.0.6', + }, + os: { + name: 'Android', + version: '9', + }, timezone: 'Asia/Kolkata', userAgent: 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', }, event: 'First Investment', - integrations: { woopra: 'int.com' }, + integrations: { + woopra: 'int.com', + }, messageId: '1601322811899-d9c7dd00-50dc-4364-95c8-e89423eb3cfb', originalTimestamp: '2020-09-28T19:53:31.900Z', - properties: { currency: 'EUR', revenue: 20.37566 }, + properties: { + currency: 'EUR', + revenue: 20.37566, + }, receivedAt: '2020-09-29T14:50:43.005+05:30', sentAt: '2020-09-28T19:53:44.998Z', timestamp: '2020-09-29T14:50:29.907+05:30', type: 'track', }, - destination: { Config: { projectName: 'int.com' } }, - metadata: { jobId: 2, userId: 'u1' }, + destination: { + Config: { + projectName: 'int.com', + }, + }, + metadata: { + jobId: 2, + }, }, ], destType: 'woopra', @@ -133,7 +190,12 @@ export const data = [ output: [ { batchedRequest: { - body: { XML: {}, FORM: {}, JSON: {}, JSON_ARRAY: {} }, + body: { + XML: {}, + FORM: {}, + JSON: {}, + JSON_ARRAY: {}, + }, type: 'REST', files: {}, method: 'GET', @@ -151,8 +213,16 @@ export const data = [ version: '1', endpoint: 'https://www.woopra.com/track/ce', }, - destination: { Config: { projectName: 'int.com' } }, - metadata: [{ jobId: 2, userId: 'u1' }], + destination: { + Config: { + projectName: 'int.com', + }, + }, + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, }, @@ -176,11 +246,19 @@ export const data = [ anonymousId: '21e13f4bc7ceddad', channel: 'mobile', event: 'First Investment', - integrations: { woopra: 'int.com' }, + integrations: { + woopra: 'int.com', + }, type: 'group', }, - destination: { Config: { projectName: 'int.com' } }, - metadata: { jobId: 3, userId: 'u1' }, + destination: { + Config: { + projectName: 'int.com', + }, + }, + metadata: { + jobId: 3, + }, }, ], destType: 'woopra', @@ -194,8 +272,16 @@ export const data = [ body: { output: [ { - destination: { Config: { projectName: 'int.com' } }, - metadata: [{ jobId: 3, userId: 'u1' }], + destination: { + Config: { + projectName: 'int.com', + }, + }, + metadata: [ + { + jobId: 3, + }, + ], statTags: { errorCategory: 'dataValidation', implementation: 'native', diff --git a/test/integrations/destinations/wootric/network.ts b/test/integrations/destinations/wootric/network.ts index 1b51cc700c..2407efa62b 100644 --- a/test/integrations/destinations/wootric/network.ts +++ b/test/integrations/destinations/wootric/network.ts @@ -1,182 +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/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/dummyId2?lookup_by_external_id=true', - method: 'GET', + { + 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 + } + }, + }, }, - httpRes: { - status: 200, + { + 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/12345', - method: 'GET', + { + 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, + }, }, - httpRes: { - 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/oauth/token?account_token=NPS-dummyToken12', - method: 'POST', + { + httpReq: { + url: 'https://api.wootric.com/v1/end_users/dummyId2?lookup_by_external_id=true', + method: 'GET' + }, + httpRes: { + status: 200, + }, }, - httpRes: { - data: { - error: 'Not found', - status: 404, - }, + { + 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 index ae747e982d..cdff2f1079 100644 --- a/test/integrations/destinations/wootric/processor/data.ts +++ b/test/integrations/destinations/wootric/processor/data.ts @@ -1,1852 +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, - }, - ], - }, - }, - }, -]; + { + "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 index 9af28f4f48..724ba176f2 100644 --- a/test/integrations/destinations/wootric/router/data.ts +++ b/test/integrations/destinations/wootric/router/data.ts @@ -1,1403 +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, userId: 'u1' }, - 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, userId: 'u1' }, - 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, userId: 'u1' }, - 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, userId: 'u1' }, - 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, userId: 'u1' }, - 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, userId: 'u1' }, - 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, userId: 'u1' }, - 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, userId: 'u1' }, - 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, userId: 'u1' }, - 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, userId: 'u1' }, - 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, userId: 'u1' }, - 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, userId: 'u1' }, - 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, userId: 'u1' }, - 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, userId: 'u1' }, - 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, userId: 'u1' }, - 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, userId: 'u1' }], - 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, userId: 'u1' }], - 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, userId: 'u1' }], - 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, userId: 'u1' }], - 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, userId: 'u1' }], - 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, userId: 'u1' }], - 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: {}, + { + name: 'wootric', + description: 'Succesfull Idenitfy Call', + feature: 'router', + module: 'destination', + version: 'v0', + input: { + request: { body: { - JSON: {}, - JSON_ARRAY: {}, - XML: {}, - FORM: { phone_number: '+19777777778', last_surveyed: '1642685961' }, - }, - files: {}, - }, - metadata: [{ jobId: 8, userId: 'u1' }], - 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, userId: 'u1' }], - batched: false, - statusCode: 200, - destination: { - ID: '2D7TqLto9tnkBuR1ciMrbiA4cbG', - Config: { - username: 'wootricfakeuser@example.com', - password: 'password@123', - accountToken: 'NPS-dummyToken', + 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', }, - }, - }, - { - 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, userId: 'u1' }], - batched: false, - statusCode: 200, - destination: { - ID: '2D7TqLto9tnkBuR1ciMrbiA4cbG', - Config: { - username: 'wootricfakeuser@example.com', - password: 'password@123', - accountToken: 'NPS-dummyToken', - }, - }, - }, - { - metadata: [{ jobId: 11, userId: 'u1' }], - 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, userId: 'u1' }], - 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: {}, + }, + output: { + response: { + status: 200, body: { - JSON: {}, - JSON_ARRAY: {}, - XML: {}, - FORM: { - origin_url: 'http://127.0.0.1:7307/Testing/App_for_LaunchDarkly/ourSdk.html', - }, - }, - files: {}, - }, - metadata: [{ jobId: 13, userId: 'u1' }], - 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, userId: 'u1' }], - 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, userId: 'u1' }], - 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, userId: 'u1' }], - destination: { - Config: { - username: 'wootricfakeuser@example.com', - password: 'password@123', - accountToken: 'NPS-dummyToken', + 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" + } + } + ], }, - 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', - }, }, - ], }, - }, - }, - }, + } ]; diff --git a/test/integrations/destinations/yahoo_dsp/router/data.ts b/test/integrations/destinations/yahoo_dsp/router/data.ts index 34bed6330c..59c71b300c 100644 --- a/test/integrations/destinations/yahoo_dsp/router/data.ts +++ b/test/integrations/destinations/yahoo_dsp/router/data.ts @@ -1,3 +1,5 @@ +import { mockFns } from '../processor/data'; + export const data = [ { name: 'yahoo_dsp', @@ -21,7 +23,9 @@ export const data = [ }, ID: 'iwehr83843', }, - metadata: { jobId: 1, userId: 'u1' }, + metadata: { + jobId: 1, + }, message: { userId: 'user 1', type: 'audiencelist', @@ -71,7 +75,12 @@ export const data = [ }, enablePartialFailure: true, }, - context: { ip: '14.5.67.21', library: { name: 'http' } }, + context: { + ip: '14.5.67.21', + library: { + name: 'http', + }, + }, timestamp: '2020-02-02T00:23:09.544Z', }, }, @@ -114,7 +123,11 @@ export const data = [ }, files: {}, }, - metadata: [{ jobId: 1, userId: 'u1' }], + metadata: [ + { + jobId: 1, + }, + ], batched: false, statusCode: 200, destination: { @@ -133,5 +146,6 @@ export const data = [ }, }, }, + mockFns, }, ]; diff --git a/test/integrations/destinations/zendesk/router/data.ts b/test/integrations/destinations/zendesk/router/data.ts index 4e7aacd1d1..d99ca6df03 100644 --- a/test/integrations/destinations/zendesk/router/data.ts +++ b/test/integrations/destinations/zendesk/router/data.ts @@ -30,7 +30,9 @@ export const data = [ Name: 'zendesk', Transformations: [], }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, message: { anonymousId: '297b0750-934b-4411-b66c-9b418cdbc0c9', channel: 'web', @@ -42,15 +44,28 @@ export const data = [ version: '1.1.0-beta.2', }, ip: '0.0.0.0', - library: { name: 'RudderLabs JavaScript SDK', version: '1.1.0-beta.2' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.0-beta.2', + }, locale: 'en-GB', - os: { name: '', version: '' }, - screen: { density: 2 }, - traits: { email: 'example124@email.com', name: 'abcd124' }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + email: 'example124@email.com', + name: 'abcd124', + }, userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36', }, - integrations: { All: true }, + integrations: { + All: true, + }, messageId: '0bab70e8-bf2f-449a-a19b-ca6e3bfed9b7', originalTimestamp: '2020-03-23T18:27:28.98Z', receivedAt: '2020-03-23T23:57:29.022+05:30', @@ -93,7 +108,9 @@ export const data = [ email: 'example124@email.com', name: 'abcd124', external_id: 'abcd-124', - user_fields: { id: 'abcd-124' }, + user_fields: { + id: 'abcd-124', + }, verified: true, }, }, @@ -105,7 +122,11 @@ export const data = [ userId: '297b0750-934b-4411-b66c-9b418cdbc0c9', }, ], - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { @@ -165,7 +186,9 @@ export const data = [ Name: 'zendesk', Transformations: [], }, - metadata: { jobId: 2, userId: 'u1' }, + metadata: { + jobId: 2, + }, message: { anonymousId: '297b0750-934b-4411-b66c-9b418cdbc0c9', channel: 'web', @@ -177,16 +200,29 @@ export const data = [ version: '1.1.0-beta.2', }, ip: '0.0.0.0', - library: { name: 'RudderLabs JavaScript SDK', version: '1.1.0-beta.2' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.0-beta.2', + }, locale: 'en-GB', - os: { name: '', version: '' }, - screen: { density: 2 }, - traits: { email: 'example124@email.com', name: 'abcd124' }, + os: { + name: '', + version: '', + }, + screen: { + density: 2, + }, + traits: { + email: 'example124@email.com', + name: 'abcd124', + }, userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36', }, groupId: 'group-124', - integrations: { All: true }, + integrations: { + All: true, + }, messageId: '2d54ba80-ce5f-4bcb-b1d7-7587e7a865fc', originalTimestamp: '2020-03-23T18:27:28.983Z', receivedAt: '2020-03-23T23:57:29.022+05:30', @@ -241,7 +277,11 @@ export const data = [ files: {}, userId: '297b0750-934b-4411-b66c-9b418cdbc0c9', }, - metadata: [{ jobId: 2, userId: 'u1' }], + metadata: [ + { + jobId: 2, + }, + ], batched: false, statusCode: 200, destination: { @@ -300,7 +340,9 @@ export const data = [ Name: 'zendesk', Transformations: [], }, - metadata: { jobId: 3, userId: 'u1' }, + metadata: { + jobId: 3, + }, message: { anonymousId: '223b5f40-9543-4456-a7aa-945c43048185', channel: 'web', @@ -351,7 +393,11 @@ export const data = [ module: 'destination', }, statusCode: 400, - metadata: [{ jobId: 3, userId: 'u1' }], + metadata: [ + { + jobId: 3, + }, + ], batched: false, destination: { Config: {