From 05f47908c336b0d152547c0dd0423551aae5f563 Mon Sep 17 00:00:00 2001 From: Vinay Teki Date: Mon, 17 Feb 2025 13:14:07 +0530 Subject: [PATCH] chore: modify all test cases to use v2 spec --- test/integrations/sources/appcenter/data.ts | 179 +- test/integrations/sources/appsflyer/data.ts | 1985 +++++++++-------- test/integrations/sources/auth0/data.ts | 1315 ++++++----- test/integrations/sources/braze/data.ts | 792 +++---- test/integrations/sources/canny/data.ts | 1422 ++++++------ test/integrations/sources/close_crm/data.ts | 333 ++- test/integrations/sources/cordial/data.ts | 523 ++--- test/integrations/sources/customerio/data.ts | 731 +++--- test/integrations/sources/formsort/data.ts | 58 +- test/integrations/sources/gainsightpx/data.ts | 1759 ++++++++------- test/integrations/sources/iterable/data.ts | 1225 +++++----- test/integrations/sources/mailjet/data.ts | 233 +- test/integrations/sources/mailmodo/data.ts | 330 ++- test/integrations/sources/moengage/data.ts | 625 +++--- test/integrations/sources/monday/data.ts | 244 +- test/integrations/sources/olark/data.ts | 239 +- test/integrations/sources/ortto/data.ts | 332 ++- test/integrations/sources/pagerduty/data.ts | 511 +++-- test/integrations/sources/pipedream/data.ts | 193 +- test/integrations/sources/refiner/data.ts | 424 ++-- test/integrations/sources/revenuecat/data.ts | 312 ++- test/integrations/sources/satismeter/data.ts | 376 ++-- test/integrations/sources/segment/data.ts | 180 +- test/integrations/sources/signl4/data.ts | 280 ++- test/integrations/sources/slack/data.ts | 229 +- 25 files changed, 7817 insertions(+), 7013 deletions(-) diff --git a/test/integrations/sources/appcenter/data.ts b/test/integrations/sources/appcenter/data.ts index 0342b622d2a..79f1b8ef7b4 100644 --- a/test/integrations/sources/appcenter/data.ts +++ b/test/integrations/sources/appcenter/data.ts @@ -5,14 +5,19 @@ export const data = [ name: 'appcenter', description: 'test-0', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - text: 'Hello from your abc-test app in App Center!', - sent_at: '2023-01-02T07: 53: 28.3117824Z', - url: 'https://appcenter.ms/users/abc-rudderstack.com/apps/abc-test', + request: { + body: JSON.stringify({ + text: 'Hello from your abc-test app in App Center!', + sent_at: '2023-01-02T07: 53: 28.3117824Z', + url: 'https://appcenter.ms/users/abc-rudderstack.com/apps/abc-test', + }), + }, + source: {}, }, ], method: 'POST', @@ -39,26 +44,31 @@ export const data = [ name: 'appcenter', description: 'test-1', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - app_name: 'MSAppCenterTesting', - branch: 'master', - build_status: 'Succeeded', - build_id: '1', - build_link: - 'https://appcenter.ms/users/venkat-rudderstack.com/apps/MSAppCenterTesting/build/branches/master/builds/1', - build_reason: 'manual', - finish_time: '2021-03-02T16:41:29.891411Z', - icon_link: null, - notification_settings_link: - 'https://appcenter.ms/users/venkat-rudderstack.com/apps/MSAppCenterTesting/settings/notifications', - os: 'Android', - start_time: '2021-03-02T16:34:13.9184874Z', - source_version: '7ed5c7b279316f19e9a0c45bb0fb49c0655471af', - sent_at: '2021-03-02T16:41:55.8819564Z', + request: { + body: JSON.stringify({ + app_name: 'MSAppCenterTesting', + branch: 'master', + build_status: 'Succeeded', + build_id: '1', + build_link: + 'https://appcenter.ms/users/venkat-rudderstack.com/apps/MSAppCenterTesting/build/branches/master/builds/1', + build_reason: 'manual', + finish_time: '2021-03-02T16:41:29.891411Z', + icon_link: null, + notification_settings_link: + 'https://appcenter.ms/users/venkat-rudderstack.com/apps/MSAppCenterTesting/settings/notifications', + os: 'Android', + start_time: '2021-03-02T16:34:13.9184874Z', + source_version: '7ed5c7b279316f19e9a0c45bb0fb49c0655471af', + sent_at: '2021-03-02T16:41:55.8819564Z', + }), + }, + source: {}, }, ], method: 'POST', @@ -117,26 +127,31 @@ export const data = [ name: 'appcenter', description: 'test-2', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - app_name: 'MSAppCenterTesting', - branch: 'master', - build_status: 'Broken', - build_id: '2', - build_link: - 'https://appcenter.ms/users/venkat-rudderstack.com/apps/MSAppCenterTesting/build/branches/master/builds/2', - build_reason: 'automatic', - finish_time: '2021-03-02T16:52:04.2587506Z', - icon_link: null, - notification_settings_link: - 'https://appcenter.ms/users/venkat-rudderstack.com/apps/MSAppCenterTesting/settings/notifications', - os: 'Android', - start_time: '2021-03-02T16:50:52.2584107Z', - source_version: '0624e1e3e48eaf2371c37316208ff83bdd5c123b', - sent_at: '2021-03-02T16:52:35.8848052Z', + request: { + body: JSON.stringify({ + app_name: 'MSAppCenterTesting', + branch: 'master', + build_status: 'Broken', + build_id: '2', + build_link: + 'https://appcenter.ms/users/venkat-rudderstack.com/apps/MSAppCenterTesting/build/branches/master/builds/2', + build_reason: 'automatic', + finish_time: '2021-03-02T16:52:04.2587506Z', + icon_link: null, + notification_settings_link: + 'https://appcenter.ms/users/venkat-rudderstack.com/apps/MSAppCenterTesting/settings/notifications', + os: 'Android', + start_time: '2021-03-02T16:50:52.2584107Z', + source_version: '0624e1e3e48eaf2371c37316208ff83bdd5c123b', + sent_at: '2021-03-02T16:52:35.8848052Z', + }), + }, + source: {}, }, ], method: 'POST', @@ -195,34 +210,39 @@ export const data = [ name: 'appcenter', description: 'test-3', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - app_name: 'MSAppCenterTesting', - app_display_name: 'MSAppCenterTesting', - release_id: '1', - platform: 'Android', - uploaded_at: '2021-03-02T17:49:35.463Z', - fingerprint: '9cbdc86d96c5359d2af3972fdda46624', - release_notes: 'Degraded to 4.0.0', - version: '1614707021', - short_version: '1.0', - min_os: '7.1', - mandatory_update: true, - size: 2919106, - provisioning_profile_name: null, - provisioning_profile_type: null, - bundle_identifier: 'tech.desusai.msappcentertesting', - install_link: - 'https://install.appcenter.ms/users/venkat-rudderstack.com/apps/MSAppCenterTesting/releases/1?source=email', - icon_link: - 'https://appcenter-filemanagement-distrib2ede6f06e.azureedge.net/dbbd3d57-9c09-448b-9782-0d57200f7c9b/ic_launcher.png?sv=2019-02-02&sr=c&sig=BNzQcMcvTbwf4fv59ByGiYXsr%2BA9PYDFyGJCqsE2RO0%3D&se=2021-03-09T17%3A49%3A35Z&sp=r', - distribution_group_id: '00000000-0000-0000-0000-000000000000', - installable: true, - sent_at: '2021-03-02T17:49:37.127635Z', - app_id: 'ce8b5280-4605-4c1c-8c48-bd54c8fdda31', + request: { + body: JSON.stringify({ + app_name: 'MSAppCenterTesting', + app_display_name: 'MSAppCenterTesting', + release_id: '1', + platform: 'Android', + uploaded_at: '2021-03-02T17:49:35.463Z', + fingerprint: '9cbdc86d96c5359d2af3972fdda46624', + release_notes: 'Degraded to 4.0.0', + version: '1614707021', + short_version: '1.0', + min_os: '7.1', + mandatory_update: true, + size: 2919106, + provisioning_profile_name: null, + provisioning_profile_type: null, + bundle_identifier: 'tech.desusai.msappcentertesting', + install_link: + 'https://install.appcenter.ms/users/venkat-rudderstack.com/apps/MSAppCenterTesting/releases/1?source=email', + icon_link: + 'https://appcenter-filemanagement-distrib2ede6f06e.azureedge.net/dbbd3d57-9c09-448b-9782-0d57200f7c9b/ic_launcher.png?sv=2019-02-02&sr=c&sig=BNzQcMcvTbwf4fv59ByGiYXsr%2BA9PYDFyGJCqsE2RO0%3D&se=2021-03-09T17%3A49%3A35Z&sp=r', + distribution_group_id: '00000000-0000-0000-0000-000000000000', + installable: true, + sent_at: '2021-03-02T17:49:37.127635Z', + app_id: 'ce8b5280-4605-4c1c-8c48-bd54c8fdda31', + }), + }, + source: {}, }, ], method: 'POST', @@ -292,27 +312,32 @@ export const data = [ name: 'appcenter', description: 'test-4', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - id: '1139624368u', - name: 'tech.desusai.msappcentertesting.MainActivity$1.onClick (MainActivity.java:25)', - reason: 'java.lang.ArithmeticException: divide by zero', - file_name: null, - line_number: null, - url: 'https://appcenter.ms/users/venkat-rudderstack.com/apps/MSAppCenterTesting/crashes/errors/1139624368u', - app_display_name: 'MSAppCenterTesting', - app_platform: 'Java', - app_version: '1.0(1)', - stack_trace: [ - 'tech.desusai.msappcentertesting.MainActivity$1.onClick (MainActivity.java:25);', - ], - affected_users: 0, - crash_count: 0, - sent_at: '2021-03-02T18:14:33.9713246Z', - app_id: 'ce8b5280-4605-4c1c-8c48-bd54c8fdda31', + request: { + body: JSON.stringify({ + id: '1139624368u', + name: 'tech.desusai.msappcentertesting.MainActivity$1.onClick (MainActivity.java:25)', + reason: 'java.lang.ArithmeticException: divide by zero', + file_name: null, + line_number: null, + url: 'https://appcenter.ms/users/venkat-rudderstack.com/apps/MSAppCenterTesting/crashes/errors/1139624368u', + app_display_name: 'MSAppCenterTesting', + app_platform: 'Java', + app_version: '1.0(1)', + stack_trace: [ + 'tech.desusai.msappcentertesting.MainActivity$1.onClick (MainActivity.java:25);', + ], + affected_users: 0, + crash_count: 0, + sent_at: '2021-03-02T18:14:33.9713246Z', + app_id: 'ce8b5280-4605-4c1c-8c48-bd54c8fdda31', + }), + }, + source: {}, }, ], method: 'POST', diff --git a/test/integrations/sources/appsflyer/data.ts b/test/integrations/sources/appsflyer/data.ts index c0e0bcc94fa..7f84fc0577f 100644 --- a/test/integrations/sources/appsflyer/data.ts +++ b/test/integrations/sources/appsflyer/data.ts @@ -9,123 +9,128 @@ export const data = [ name: 'appsflyer', description: 'test-0', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - idfv: '868049A3-4B2F-4A11-9B00-CFFC362XXXXX', - device_category: 'phone', - af_sub1: null, - customer_user_id: 'hi.from@appsflyer.example.com', - is_lat: null, - contributor_2_af_prt: null, - bundle_id: 'com.appsflyer.AppsFlyer', - gp_broadcast_referrer: '', - contributor_2_touch_time: null, - contributor_3_touch_type: null, - event_source: 'SDK', - af_cost_value: null, - contributor_1_match_type: null, - app_version: '1.4.1', - contributor_3_af_prt: null, - custom_data: null, - contributor_2_touch_type: null, - gp_install_begin: null, - city: 'Khu Pho Binh Hoa', - amazon_aid: null, - gp_referrer: null, - af_cost_model: null, - af_c_id: null, - attributed_touch_time_selected_timezone: null, - selected_currency: 'USD', - app_name: 'AppsFlyer', - install_time_selected_timezone: '2019-01-20 04:51:16.000+0000', - postal_code: '823941', - wifi: true, - install_time: '2019-01-20 04:51:16.000', - operator: null, - attributed_touch_type: null, - af_attribution_lookback: null, - campaign_type: null, - keyword_match_type: null, - af_adset_id: null, - device_download_time_selected_timezone: '2019-01-20 04:51:16.000+0000', - contributor_2_media_source: null, - conversion_type: null, - contributor_2_match_type: null, - api_version: '2.0', - attributed_touch_time: null, - revenue_in_selected_currency: null, - is_retargeting: false, - country_code: 'VN', - gp_click_time: null, - contributor_1_af_prt: null, - match_type: null, - appsflyer_id: '1547985076649-5309999', - dma: 'None', - http_referrer: null, - af_sub5: null, - af_prt: null, - event_revenue_currency: 'USD', - store_reinstall: null, - install_app_store: null, - media_source: 'organic', - deeplink_url: null, - campaign: null, - af_keywords: null, - region: 'AS', - cost_in_selected_currency: null, - event_value: '{}', - ip: '1.1.1.1', - oaid: null, - event_time: '2020-01-15 14:57:24.898', - is_receipt_validated: null, - contributor_1_campaign: null, - af_sub4: null, - imei: null, - contributor_3_campaign: null, - event_revenue_usd: null, - af_sub2: null, - original_url: null, - contributor_2_campaign: null, - android_id: null, - contributor_3_media_source: null, - af_adset: null, - af_ad: null, - state: '57', - network_account_id: null, - device_type: 'iPhoneXR', - idfa: 'A7071198-3848-40A5-B3D0-94578D9BZZZZ', - retargeting_conversion_type: null, - af_channel: null, - af_cost_currency: null, - contributor_1_media_source: null, - keyword_id: null, - device_download_time: '2019-01-20 04:51:16.000', - contributor_1_touch_type: null, - af_reengagement_window: null, - af_siteid: null, - language: 'en-US', - app_id: 'id1217828636', - contributor_1_touch_time: null, - event_revenue: null, - af_ad_type: null, - carrier: null, - event_name: 'My Apps', - af_sub_siteid: null, - advertising_id: null, - os_version: '12.3.1', - platform: 'ios', - af_sub3: null, - contributor_3_match_type: null, - selected_timezone: 'UTC', - af_ad_id: null, - contributor_3_touch_time: null, - user_agent: 'AppsFlyer/1 CFNetwork/978.0.7 Darwin/18.6.0', - is_primary_attribution: true, - sdk_version: 'v4.10.0', - event_time_selected_timezone: '2020-01-15 14:57:24.898+0000', + request: { + body: JSON.stringify({ + idfv: '868049A3-4B2F-4A11-9B00-CFFC362XXXXX', + device_category: 'phone', + af_sub1: null, + customer_user_id: 'hi.from@appsflyer.example.com', + is_lat: null, + contributor_2_af_prt: null, + bundle_id: 'com.appsflyer.AppsFlyer', + gp_broadcast_referrer: '', + contributor_2_touch_time: null, + contributor_3_touch_type: null, + event_source: 'SDK', + af_cost_value: null, + contributor_1_match_type: null, + app_version: '1.4.1', + contributor_3_af_prt: null, + custom_data: null, + contributor_2_touch_type: null, + gp_install_begin: null, + city: 'Khu Pho Binh Hoa', + amazon_aid: null, + gp_referrer: null, + af_cost_model: null, + af_c_id: null, + attributed_touch_time_selected_timezone: null, + selected_currency: 'USD', + app_name: 'AppsFlyer', + install_time_selected_timezone: '2019-01-20 04:51:16.000+0000', + postal_code: '823941', + wifi: true, + install_time: '2019-01-20 04:51:16.000', + operator: null, + attributed_touch_type: null, + af_attribution_lookback: null, + campaign_type: null, + keyword_match_type: null, + af_adset_id: null, + device_download_time_selected_timezone: '2019-01-20 04:51:16.000+0000', + contributor_2_media_source: null, + conversion_type: null, + contributor_2_match_type: null, + api_version: '2.0', + attributed_touch_time: null, + revenue_in_selected_currency: null, + is_retargeting: false, + country_code: 'VN', + gp_click_time: null, + contributor_1_af_prt: null, + match_type: null, + appsflyer_id: '1547985076649-5309999', + dma: 'None', + http_referrer: null, + af_sub5: null, + af_prt: null, + event_revenue_currency: 'USD', + store_reinstall: null, + install_app_store: null, + media_source: 'organic', + deeplink_url: null, + campaign: null, + af_keywords: null, + region: 'AS', + cost_in_selected_currency: null, + event_value: '{}', + ip: '1.1.1.1', + oaid: null, + event_time: '2020-01-15 14:57:24.898', + is_receipt_validated: null, + contributor_1_campaign: null, + af_sub4: null, + imei: null, + contributor_3_campaign: null, + event_revenue_usd: null, + af_sub2: null, + original_url: null, + contributor_2_campaign: null, + android_id: null, + contributor_3_media_source: null, + af_adset: null, + af_ad: null, + state: '57', + network_account_id: null, + device_type: 'iPhoneXR', + idfa: 'A7071198-3848-40A5-B3D0-94578D9BZZZZ', + retargeting_conversion_type: null, + af_channel: null, + af_cost_currency: null, + contributor_1_media_source: null, + keyword_id: null, + device_download_time: '2019-01-20 04:51:16.000', + contributor_1_touch_type: null, + af_reengagement_window: null, + af_siteid: null, + language: 'en-US', + app_id: 'id1217828636', + contributor_1_touch_time: null, + event_revenue: null, + af_ad_type: null, + carrier: null, + event_name: 'My Apps', + af_sub_siteid: null, + advertising_id: null, + os_version: '12.3.1', + platform: 'ios', + af_sub3: null, + contributor_3_match_type: null, + selected_timezone: 'UTC', + af_ad_id: null, + contributor_3_touch_time: null, + user_agent: 'AppsFlyer/1 CFNetwork/978.0.7 Darwin/18.6.0', + is_primary_attribution: true, + sdk_version: 'v4.10.0', + event_time_selected_timezone: '2020-01-15 14:57:24.898+0000', + }), + }, + source: {}, }, ], method: 'POST', @@ -160,10 +165,19 @@ export const data = [ network: { wifi: true }, os: { name: 'ios', version: '12.3.1' }, traits: { - address: { city: 'Khu Pho Binh Hoa', zip: '823941', country: 'VN' }, + address: { + city: 'Khu Pho Binh Hoa', + zip: '823941', + country: 'VN', + }, userId: 'hi.from@appsflyer.example.com', }, - externalId: [{ type: 'appsflyerExternalId', value: '1547985076649-5309999' }], + externalId: [ + { + type: 'appsflyerExternalId', + value: '1547985076649-5309999', + }, + ], }, integrations: { AF: false }, properties: { @@ -267,7 +281,13 @@ export const data = [ timestamp: '2020-01-15 14:57:24.898', originalTimestamp: '2020-01-15 14:57:24.898', platform: 'ios', - traits: { address: { city: 'Khu Pho Binh Hoa', zip: '823941', country: 'VN' } }, + traits: { + address: { + city: 'Khu Pho Binh Hoa', + zip: '823941', + country: 'VN', + }, + }, anonymousId: '97fcd7b2-cc24-47d7-b776-057b7b199513', }, ], @@ -281,123 +301,128 @@ export const data = [ name: 'appsflyer', description: 'test-1', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - idfv: '868049A3-4B2F-4A11-9B00-CFFC362XXXXX', - device_category: 'phone', - af_sub1: null, - customer_user_id: 'hi.from@appsflyer.example.com', - is_lat: null, - contributor_2_af_prt: null, - bundle_id: 'com.appsflyer.AppsFlyer', - gp_broadcast_referrer: '', - contributor_2_touch_time: null, - contributor_3_touch_type: null, - event_source: 'SDK', - af_cost_value: null, - contributor_1_match_type: null, - app_version: '1.4.1', - contributor_3_af_prt: null, - custom_data: null, - contributor_2_touch_type: null, - gp_install_begin: null, - city: 'Khu Pho Binh Hoa', - amazon_aid: null, - gp_referrer: null, - af_cost_model: null, - af_c_id: null, - attributed_touch_time_selected_timezone: null, - selected_currency: 'USD', - app_name: 'AppsFlyer', - install_time_selected_timezone: '2019-01-20 04:51:16.000+0000', - postal_code: '823941', - wifi: true, - install_time: '2019-01-20 04:51:16.000', - operator: null, - attributed_touch_type: null, - af_attribution_lookback: null, - campaign_type: null, - keyword_match_type: null, - af_adset_id: null, - device_download_time_selected_timezone: '2019-01-20 04:51:16.000+0000', - contributor_2_media_source: null, - conversion_type: null, - contributor_2_match_type: null, - api_version: '2.0', - attributed_touch_time: null, - revenue_in_selected_currency: null, - is_retargeting: false, - country_code: 'VN', - gp_click_time: null, - contributor_1_af_prt: null, - match_type: null, - appsflyer_id: '1547985076649-5309999', - dma: 'None', - http_referrer: null, - af_sub5: null, - af_prt: null, - event_revenue_currency: 'USD', - store_reinstall: null, - install_app_store: null, - media_source: 'organic', - deeplink_url: null, - campaign: null, - af_keywords: null, - region: 'AS', - cost_in_selected_currency: null, - event_value: '{}', - ip: '1.1.1.1', - oaid: null, - event_time: '2020-01-15 14:57:24.898', - is_receipt_validated: null, - contributor_1_campaign: null, - af_sub4: null, - imei: null, - contributor_3_campaign: null, - event_revenue_usd: null, - af_sub2: null, - original_url: null, - contributor_2_campaign: null, - android_id: 'A7071198-3848-40A5-B3D0-94578D9BZZZZ', - contributor_3_media_source: null, - af_adset: null, - af_ad: null, - state: '57', - network_account_id: null, - device_type: 'Nokia 5.3', - idfa: null, - retargeting_conversion_type: null, - af_channel: null, - af_cost_currency: null, - contributor_1_media_source: null, - keyword_id: null, - device_download_time: '2019-01-20 04:51:16.000', - contributor_1_touch_type: null, - af_reengagement_window: null, - af_siteid: null, - language: 'en-US', - app_id: 'id1217828636', - contributor_1_touch_time: null, - event_revenue: null, - af_ad_type: null, - carrier: null, - event_name: 'My Apps', - af_sub_siteid: null, - advertising_id: null, - os_version: '12.3.1', - platform: 'android', - af_sub3: null, - contributor_3_match_type: null, - selected_timezone: 'UTC', - af_ad_id: null, - contributor_3_touch_time: null, - user_agent: 'AppsFlyer/1 CFNetwork/978.0.7 Darwin/18.6.0', - is_primary_attribution: true, - sdk_version: 'v4.10.0', - event_time_selected_timezone: '2020-01-15 14:57:24.898+0000', + request: { + body: JSON.stringify({ + idfv: '868049A3-4B2F-4A11-9B00-CFFC362XXXXX', + device_category: 'phone', + af_sub1: null, + customer_user_id: 'hi.from@appsflyer.example.com', + is_lat: null, + contributor_2_af_prt: null, + bundle_id: 'com.appsflyer.AppsFlyer', + gp_broadcast_referrer: '', + contributor_2_touch_time: null, + contributor_3_touch_type: null, + event_source: 'SDK', + af_cost_value: null, + contributor_1_match_type: null, + app_version: '1.4.1', + contributor_3_af_prt: null, + custom_data: null, + contributor_2_touch_type: null, + gp_install_begin: null, + city: 'Khu Pho Binh Hoa', + amazon_aid: null, + gp_referrer: null, + af_cost_model: null, + af_c_id: null, + attributed_touch_time_selected_timezone: null, + selected_currency: 'USD', + app_name: 'AppsFlyer', + install_time_selected_timezone: '2019-01-20 04:51:16.000+0000', + postal_code: '823941', + wifi: true, + install_time: '2019-01-20 04:51:16.000', + operator: null, + attributed_touch_type: null, + af_attribution_lookback: null, + campaign_type: null, + keyword_match_type: null, + af_adset_id: null, + device_download_time_selected_timezone: '2019-01-20 04:51:16.000+0000', + contributor_2_media_source: null, + conversion_type: null, + contributor_2_match_type: null, + api_version: '2.0', + attributed_touch_time: null, + revenue_in_selected_currency: null, + is_retargeting: false, + country_code: 'VN', + gp_click_time: null, + contributor_1_af_prt: null, + match_type: null, + appsflyer_id: '1547985076649-5309999', + dma: 'None', + http_referrer: null, + af_sub5: null, + af_prt: null, + event_revenue_currency: 'USD', + store_reinstall: null, + install_app_store: null, + media_source: 'organic', + deeplink_url: null, + campaign: null, + af_keywords: null, + region: 'AS', + cost_in_selected_currency: null, + event_value: '{}', + ip: '1.1.1.1', + oaid: null, + event_time: '2020-01-15 14:57:24.898', + is_receipt_validated: null, + contributor_1_campaign: null, + af_sub4: null, + imei: null, + contributor_3_campaign: null, + event_revenue_usd: null, + af_sub2: null, + original_url: null, + contributor_2_campaign: null, + android_id: 'A7071198-3848-40A5-B3D0-94578D9BZZZZ', + contributor_3_media_source: null, + af_adset: null, + af_ad: null, + state: '57', + network_account_id: null, + device_type: 'Nokia 5.3', + idfa: null, + retargeting_conversion_type: null, + af_channel: null, + af_cost_currency: null, + contributor_1_media_source: null, + keyword_id: null, + device_download_time: '2019-01-20 04:51:16.000', + contributor_1_touch_type: null, + af_reengagement_window: null, + af_siteid: null, + language: 'en-US', + app_id: 'id1217828636', + contributor_1_touch_time: null, + event_revenue: null, + af_ad_type: null, + carrier: null, + event_name: 'My Apps', + af_sub_siteid: null, + advertising_id: null, + os_version: '12.3.1', + platform: 'android', + af_sub3: null, + contributor_3_match_type: null, + selected_timezone: 'UTC', + af_ad_id: null, + contributor_3_touch_time: null, + user_agent: 'AppsFlyer/1 CFNetwork/978.0.7 Darwin/18.6.0', + is_primary_attribution: true, + sdk_version: 'v4.10.0', + event_time_selected_timezone: '2020-01-15 14:57:24.898+0000', + }), + }, + source: {}, }, ], method: 'POST', @@ -432,10 +457,19 @@ export const data = [ network: { wifi: true }, os: { name: 'android', version: '12.3.1' }, traits: { - address: { city: 'Khu Pho Binh Hoa', zip: '823941', country: 'VN' }, + address: { + city: 'Khu Pho Binh Hoa', + zip: '823941', + country: 'VN', + }, userId: 'hi.from@appsflyer.example.com', }, - externalId: [{ type: 'appsflyerExternalId', value: '1547985076649-5309999' }], + externalId: [ + { + type: 'appsflyerExternalId', + value: '1547985076649-5309999', + }, + ], }, integrations: { AF: false }, properties: { @@ -539,7 +573,13 @@ export const data = [ timestamp: '2020-01-15 14:57:24.898', originalTimestamp: '2020-01-15 14:57:24.898', platform: 'android', - traits: { address: { city: 'Khu Pho Binh Hoa', zip: '823941', country: 'VN' } }, + traits: { + address: { + city: 'Khu Pho Binh Hoa', + zip: '823941', + country: 'VN', + }, + }, anonymousId: '97fcd7b2-cc24-47d7-b776-057b7b199513', }, ], @@ -553,122 +593,127 @@ export const data = [ name: 'appsflyer', description: 'test-2', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - idfv: '868049A3-4B2F-4A11-9B00-CFFC362XXXXX', - device_category: 'phone', - af_sub1: null, - customer_user_id: 'hi.from@appsflyer.example.com', - is_lat: null, - contributor_2_af_prt: null, - bundle_id: 'com.appsflyer.AppsFlyer', - gp_broadcast_referrer: '', - contributor_2_touch_time: null, - contributor_3_touch_type: null, - event_source: 'SDK', - af_cost_value: null, - contributor_1_match_type: null, - app_version: '1.4.1', - contributor_3_af_prt: null, - custom_data: null, - contributor_2_touch_type: null, - gp_install_begin: null, - city: 'Khu Pho Binh Hoa', - amazon_aid: null, - gp_referrer: null, - af_cost_model: null, - af_c_id: null, - attributed_touch_time_selected_timezone: null, - selected_currency: 'USD', - app_name: 'AppsFlyer', - install_time_selected_timezone: '2019-01-20 04:51:16.000+0000', - postal_code: '823941', - wifi: true, - install_time: '2019-01-20 04:51:16.000', - operator: null, - attributed_touch_type: null, - af_attribution_lookback: null, - campaign_type: null, - keyword_match_type: null, - af_adset_id: null, - device_download_time_selected_timezone: '2019-01-20 04:51:16.000+0000', - contributor_2_media_source: null, - conversion_type: null, - contributor_2_match_type: null, - api_version: '2.0', - attributed_touch_time: null, - revenue_in_selected_currency: null, - is_retargeting: false, - country_code: 'VN', - gp_click_time: null, - contributor_1_af_prt: null, - match_type: null, - appsflyer_id: '1547985076649-5309999', - dma: 'None', - http_referrer: null, - af_sub5: null, - af_prt: null, - event_revenue_currency: 'USD', - store_reinstall: null, - install_app_store: null, - media_source: 'organic', - deeplink_url: null, - campaign: null, - af_keywords: null, - region: 'AS', - cost_in_selected_currency: null, - event_value: '{}', - ip: '1.1.1.1', - oaid: null, - event_time: '2020-01-15 14:57:24.898', - is_receipt_validated: null, - contributor_1_campaign: null, - af_sub4: null, - imei: null, - contributor_3_campaign: null, - event_revenue_usd: null, - af_sub2: null, - original_url: null, - contributor_2_campaign: null, - android_id: null, - contributor_3_media_source: null, - af_adset: null, - af_ad: null, - state: '57', - network_account_id: null, - device_type: 'iPhoneXR', - idfa: 'A7071198-3848-40A5-B3D0-94578D9BZZZZ', - retargeting_conversion_type: null, - af_channel: null, - af_cost_currency: null, - contributor_1_media_source: null, - keyword_id: null, - device_download_time: '2019-01-20 04:51:16.000', - contributor_1_touch_type: null, - af_reengagement_window: null, - af_siteid: null, - language: 'en-US', - app_id: 'id1217828636', - contributor_1_touch_time: null, - event_revenue: null, - af_ad_type: null, - carrier: null, - af_sub_siteid: null, - advertising_id: null, - os_version: '12.3.1', - platform: 'ios', - af_sub3: null, - contributor_3_match_type: null, - selected_timezone: 'UTC', - af_ad_id: null, - contributor_3_touch_time: null, - user_agent: 'AppsFlyer/1 CFNetwork/978.0.7 Darwin/18.6.0', - is_primary_attribution: true, - sdk_version: 'v4.10.0', - event_time_selected_timezone: '2020-01-15 14:57:24.898+0000', + request: { + body: JSON.stringify({ + idfv: '868049A3-4B2F-4A11-9B00-CFFC362XXXXX', + device_category: 'phone', + af_sub1: null, + customer_user_id: 'hi.from@appsflyer.example.com', + is_lat: null, + contributor_2_af_prt: null, + bundle_id: 'com.appsflyer.AppsFlyer', + gp_broadcast_referrer: '', + contributor_2_touch_time: null, + contributor_3_touch_type: null, + event_source: 'SDK', + af_cost_value: null, + contributor_1_match_type: null, + app_version: '1.4.1', + contributor_3_af_prt: null, + custom_data: null, + contributor_2_touch_type: null, + gp_install_begin: null, + city: 'Khu Pho Binh Hoa', + amazon_aid: null, + gp_referrer: null, + af_cost_model: null, + af_c_id: null, + attributed_touch_time_selected_timezone: null, + selected_currency: 'USD', + app_name: 'AppsFlyer', + install_time_selected_timezone: '2019-01-20 04:51:16.000+0000', + postal_code: '823941', + wifi: true, + install_time: '2019-01-20 04:51:16.000', + operator: null, + attributed_touch_type: null, + af_attribution_lookback: null, + campaign_type: null, + keyword_match_type: null, + af_adset_id: null, + device_download_time_selected_timezone: '2019-01-20 04:51:16.000+0000', + contributor_2_media_source: null, + conversion_type: null, + contributor_2_match_type: null, + api_version: '2.0', + attributed_touch_time: null, + revenue_in_selected_currency: null, + is_retargeting: false, + country_code: 'VN', + gp_click_time: null, + contributor_1_af_prt: null, + match_type: null, + appsflyer_id: '1547985076649-5309999', + dma: 'None', + http_referrer: null, + af_sub5: null, + af_prt: null, + event_revenue_currency: 'USD', + store_reinstall: null, + install_app_store: null, + media_source: 'organic', + deeplink_url: null, + campaign: null, + af_keywords: null, + region: 'AS', + cost_in_selected_currency: null, + event_value: '{}', + ip: '1.1.1.1', + oaid: null, + event_time: '2020-01-15 14:57:24.898', + is_receipt_validated: null, + contributor_1_campaign: null, + af_sub4: null, + imei: null, + contributor_3_campaign: null, + event_revenue_usd: null, + af_sub2: null, + original_url: null, + contributor_2_campaign: null, + android_id: null, + contributor_3_media_source: null, + af_adset: null, + af_ad: null, + state: '57', + network_account_id: null, + device_type: 'iPhoneXR', + idfa: 'A7071198-3848-40A5-B3D0-94578D9BZZZZ', + retargeting_conversion_type: null, + af_channel: null, + af_cost_currency: null, + contributor_1_media_source: null, + keyword_id: null, + device_download_time: '2019-01-20 04:51:16.000', + contributor_1_touch_type: null, + af_reengagement_window: null, + af_siteid: null, + language: 'en-US', + app_id: 'id1217828636', + contributor_1_touch_time: null, + event_revenue: null, + af_ad_type: null, + carrier: null, + af_sub_siteid: null, + advertising_id: null, + os_version: '12.3.1', + platform: 'ios', + af_sub3: null, + contributor_3_match_type: null, + selected_timezone: 'UTC', + af_ad_id: null, + contributor_3_touch_time: null, + user_agent: 'AppsFlyer/1 CFNetwork/978.0.7 Darwin/18.6.0', + is_primary_attribution: true, + sdk_version: 'v4.10.0', + event_time_selected_timezone: '2020-01-15 14:57:24.898+0000', + }), + }, + source: {}, }, ], method: 'POST', @@ -700,122 +745,127 @@ export const data = [ name: 'appsflyer', description: 'test-3', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - idfv: '868049A3-4B2F-4A11-9B00-CFFC362XXXXX', - device_category: 'phone', - af_sub1: null, - is_lat: null, - contributor_2_af_prt: null, - bundle_id: 'com.appsflyer.AppsFlyer', - gp_broadcast_referrer: '', - contributor_2_touch_time: null, - contributor_3_touch_type: null, - event_source: 'SDK', - af_cost_value: null, - contributor_1_match_type: null, - app_version: '1.4.1', - contributor_3_af_prt: null, - custom_data: null, - contributor_2_touch_type: null, - gp_install_begin: null, - city: 'Khu Pho Binh Hoa', - amazon_aid: null, - gp_referrer: null, - af_cost_model: null, - af_c_id: null, - attributed_touch_time_selected_timezone: null, - selected_currency: 'USD', - app_name: 'AppsFlyer', - install_time_selected_timezone: '2019-01-20 04:51:16.000+0000', - postal_code: '823941', - wifi: true, - install_time: '2019-01-20 04:51:16.000', - operator: null, - attributed_touch_type: null, - af_attribution_lookback: null, - campaign_type: null, - keyword_match_type: null, - af_adset_id: null, - device_download_time_selected_timezone: '2019-01-20 04:51:16.000+0000', - contributor_2_media_source: null, - conversion_type: null, - contributor_2_match_type: null, - api_version: '2.0', - attributed_touch_time: null, - revenue_in_selected_currency: null, - is_retargeting: false, - country_code: 'VN', - gp_click_time: null, - contributor_1_af_prt: null, - match_type: null, - appsflyer_id: '1547985076649-5309999', - dma: 'None', - http_referrer: null, - af_sub5: null, - af_prt: null, - event_revenue_currency: 'USD', - store_reinstall: null, - install_app_store: null, - media_source: 'organic', - deeplink_url: null, - campaign: null, - af_keywords: null, - region: 'AS', - cost_in_selected_currency: null, - event_value: '{}', - ip: '1.1.1.1', - oaid: null, - event_time: '2020-01-15 14:57:24.898', - is_receipt_validated: null, - contributor_1_campaign: null, - af_sub4: null, - imei: null, - contributor_3_campaign: null, - event_revenue_usd: null, - af_sub2: null, - original_url: null, - contributor_2_campaign: null, - android_id: null, - contributor_3_media_source: null, - af_adset: null, - af_ad: null, - state: '57', - network_account_id: null, - device_type: 'iPhoneXR', - idfa: 'A7071198-3848-40A5-B3D0-94578D9BZZZZ', - retargeting_conversion_type: null, - af_channel: null, - af_cost_currency: null, - contributor_1_media_source: null, - keyword_id: null, - device_download_time: '2019-01-20 04:51:16.000', - contributor_1_touch_type: null, - af_reengagement_window: null, - af_siteid: null, - language: 'en-US', - app_id: 'id1217828636', - contributor_1_touch_time: null, - event_revenue: null, - af_ad_type: null, - carrier: null, - event_name: 'My Apps', - af_sub_siteid: null, - advertising_id: null, - os_version: '12.3.1', - platform: 'ios', - af_sub3: null, - contributor_3_match_type: null, - selected_timezone: 'UTC', - af_ad_id: null, - contributor_3_touch_time: null, - user_agent: 'AppsFlyer/1 CFNetwork/978.0.7 Darwin/18.6.0', - is_primary_attribution: true, - sdk_version: 'v4.10.0', - event_time_selected_timezone: '2020-01-15 14:57:24.898+0000', + request: { + body: JSON.stringify({ + idfv: '868049A3-4B2F-4A11-9B00-CFFC362XXXXX', + device_category: 'phone', + af_sub1: null, + is_lat: null, + contributor_2_af_prt: null, + bundle_id: 'com.appsflyer.AppsFlyer', + gp_broadcast_referrer: '', + contributor_2_touch_time: null, + contributor_3_touch_type: null, + event_source: 'SDK', + af_cost_value: null, + contributor_1_match_type: null, + app_version: '1.4.1', + contributor_3_af_prt: null, + custom_data: null, + contributor_2_touch_type: null, + gp_install_begin: null, + city: 'Khu Pho Binh Hoa', + amazon_aid: null, + gp_referrer: null, + af_cost_model: null, + af_c_id: null, + attributed_touch_time_selected_timezone: null, + selected_currency: 'USD', + app_name: 'AppsFlyer', + install_time_selected_timezone: '2019-01-20 04:51:16.000+0000', + postal_code: '823941', + wifi: true, + install_time: '2019-01-20 04:51:16.000', + operator: null, + attributed_touch_type: null, + af_attribution_lookback: null, + campaign_type: null, + keyword_match_type: null, + af_adset_id: null, + device_download_time_selected_timezone: '2019-01-20 04:51:16.000+0000', + contributor_2_media_source: null, + conversion_type: null, + contributor_2_match_type: null, + api_version: '2.0', + attributed_touch_time: null, + revenue_in_selected_currency: null, + is_retargeting: false, + country_code: 'VN', + gp_click_time: null, + contributor_1_af_prt: null, + match_type: null, + appsflyer_id: '1547985076649-5309999', + dma: 'None', + http_referrer: null, + af_sub5: null, + af_prt: null, + event_revenue_currency: 'USD', + store_reinstall: null, + install_app_store: null, + media_source: 'organic', + deeplink_url: null, + campaign: null, + af_keywords: null, + region: 'AS', + cost_in_selected_currency: null, + event_value: '{}', + ip: '1.1.1.1', + oaid: null, + event_time: '2020-01-15 14:57:24.898', + is_receipt_validated: null, + contributor_1_campaign: null, + af_sub4: null, + imei: null, + contributor_3_campaign: null, + event_revenue_usd: null, + af_sub2: null, + original_url: null, + contributor_2_campaign: null, + android_id: null, + contributor_3_media_source: null, + af_adset: null, + af_ad: null, + state: '57', + network_account_id: null, + device_type: 'iPhoneXR', + idfa: 'A7071198-3848-40A5-B3D0-94578D9BZZZZ', + retargeting_conversion_type: null, + af_channel: null, + af_cost_currency: null, + contributor_1_media_source: null, + keyword_id: null, + device_download_time: '2019-01-20 04:51:16.000', + contributor_1_touch_type: null, + af_reengagement_window: null, + af_siteid: null, + language: 'en-US', + app_id: 'id1217828636', + contributor_1_touch_time: null, + event_revenue: null, + af_ad_type: null, + carrier: null, + event_name: 'My Apps', + af_sub_siteid: null, + advertising_id: null, + os_version: '12.3.1', + platform: 'ios', + af_sub3: null, + contributor_3_match_type: null, + selected_timezone: 'UTC', + af_ad_id: null, + contributor_3_touch_time: null, + user_agent: 'AppsFlyer/1 CFNetwork/978.0.7 Darwin/18.6.0', + is_primary_attribution: true, + sdk_version: 'v4.10.0', + event_time_selected_timezone: '2020-01-15 14:57:24.898+0000', + }), + }, + source: {}, }, ], method: 'POST', @@ -849,8 +899,19 @@ export const data = [ }, network: { wifi: true }, os: { name: 'ios', version: '12.3.1' }, - traits: { address: { city: 'Khu Pho Binh Hoa', zip: '823941', country: 'VN' } }, - externalId: [{ type: 'appsflyerExternalId', value: '1547985076649-5309999' }], + traits: { + address: { + city: 'Khu Pho Binh Hoa', + zip: '823941', + country: 'VN', + }, + }, + externalId: [ + { + type: 'appsflyerExternalId', + value: '1547985076649-5309999', + }, + ], }, integrations: { AF: false }, type: 'track', @@ -953,7 +1014,13 @@ export const data = [ timestamp: '2020-01-15 14:57:24.898', originalTimestamp: '2020-01-15 14:57:24.898', platform: 'ios', - traits: { address: { city: 'Khu Pho Binh Hoa', zip: '823941', country: 'VN' } }, + traits: { + address: { + city: 'Khu Pho Binh Hoa', + zip: '823941', + country: 'VN', + }, + }, anonymousId: '97fcd7b2-cc24-47d7-b776-057b7b199513', }, ], @@ -967,122 +1034,127 @@ export const data = [ name: 'appsflyer', description: 'test-4', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - idfv: '868049A3-4B2F-4A11-9B00-CFFC362XXXXX', - device_category: 'phone', - af_sub1: null, - customer_user_id: 'hi.from@appsflyer.example.com', - is_lat: null, - contributor_2_af_prt: null, - bundle_id: 'com.appsflyer.AppsFlyer', - gp_broadcast_referrer: '', - contributor_2_touch_time: null, - contributor_3_touch_type: null, - event_source: 'SDK', - af_cost_value: null, - contributor_1_match_type: null, - app_version: '1.4.1', - contributor_3_af_prt: null, - custom_data: null, - contributor_2_touch_type: null, - gp_install_begin: null, - city: 'Khu Pho Binh Hoa', - amazon_aid: null, - gp_referrer: null, - af_cost_model: null, - af_c_id: null, - attributed_touch_time_selected_timezone: null, - selected_currency: 'USD', - app_name: 'AppsFlyer', - install_time_selected_timezone: '2019-01-20 04:51:16.000+0000', - postal_code: '823941', - wifi: true, - install_time: '2019-01-20 04:51:16.000', - operator: null, - attributed_touch_type: null, - af_attribution_lookback: null, - campaign_type: null, - keyword_match_type: null, - af_adset_id: null, - device_download_time_selected_timezone: '2019-01-20 04:51:16.000+0000', - contributor_2_media_source: null, - conversion_type: null, - contributor_2_match_type: null, - api_version: '2.0', - attributed_touch_time: null, - revenue_in_selected_currency: null, - is_retargeting: false, - country_code: 'VN', - gp_click_time: null, - contributor_1_af_prt: null, - match_type: null, - appsflyer_id: '1547985076649-5309999', - dma: 'None', - http_referrer: null, - af_sub5: null, - af_prt: null, - event_revenue_currency: 'USD', - store_reinstall: null, - install_app_store: null, - media_source: 'organic', - deeplink_url: null, - campaign: null, - af_keywords: null, - region: 'AS', - cost_in_selected_currency: null, - event_value: '{}', - ip: '1.1.1.1', - oaid: null, - event_time: '2020-01-15 14:57:24.898', - is_receipt_validated: null, - contributor_1_campaign: null, - af_sub4: null, - imei: null, - contributor_3_campaign: null, - event_revenue_usd: null, - af_sub2: null, - original_url: null, - contributor_2_campaign: null, - android_id: null, - contributor_3_media_source: null, - af_adset: null, - af_ad: null, - state: '57', - network_account_id: null, - idfa: 'A7071198-3848-40A5-B3D0-94578D9BZZZZ', - retargeting_conversion_type: null, - af_channel: null, - af_cost_currency: null, - contributor_1_media_source: null, - keyword_id: null, - device_download_time: '2019-01-20 04:51:16.000', - contributor_1_touch_type: null, - af_reengagement_window: null, - af_siteid: null, - language: 'en-US', - app_id: 'id1217828636', - contributor_1_touch_time: null, - event_revenue: null, - af_ad_type: null, - carrier: null, - event_name: 'My Apps', - af_sub_siteid: null, - advertising_id: null, - os_version: '12.3.1', - platform: 'ios', - af_sub3: null, - contributor_3_match_type: null, - selected_timezone: 'UTC', - af_ad_id: null, - contributor_3_touch_time: null, - user_agent: 'AppsFlyer/1 CFNetwork/978.0.7 Darwin/18.6.0', - is_primary_attribution: true, - sdk_version: 'v4.10.0', - event_time_selected_timezone: '2020-01-15 14:57:24.898+0000', + request: { + body: JSON.stringify({ + idfv: '868049A3-4B2F-4A11-9B00-CFFC362XXXXX', + device_category: 'phone', + af_sub1: null, + customer_user_id: 'hi.from@appsflyer.example.com', + is_lat: null, + contributor_2_af_prt: null, + bundle_id: 'com.appsflyer.AppsFlyer', + gp_broadcast_referrer: '', + contributor_2_touch_time: null, + contributor_3_touch_type: null, + event_source: 'SDK', + af_cost_value: null, + contributor_1_match_type: null, + app_version: '1.4.1', + contributor_3_af_prt: null, + custom_data: null, + contributor_2_touch_type: null, + gp_install_begin: null, + city: 'Khu Pho Binh Hoa', + amazon_aid: null, + gp_referrer: null, + af_cost_model: null, + af_c_id: null, + attributed_touch_time_selected_timezone: null, + selected_currency: 'USD', + app_name: 'AppsFlyer', + install_time_selected_timezone: '2019-01-20 04:51:16.000+0000', + postal_code: '823941', + wifi: true, + install_time: '2019-01-20 04:51:16.000', + operator: null, + attributed_touch_type: null, + af_attribution_lookback: null, + campaign_type: null, + keyword_match_type: null, + af_adset_id: null, + device_download_time_selected_timezone: '2019-01-20 04:51:16.000+0000', + contributor_2_media_source: null, + conversion_type: null, + contributor_2_match_type: null, + api_version: '2.0', + attributed_touch_time: null, + revenue_in_selected_currency: null, + is_retargeting: false, + country_code: 'VN', + gp_click_time: null, + contributor_1_af_prt: null, + match_type: null, + appsflyer_id: '1547985076649-5309999', + dma: 'None', + http_referrer: null, + af_sub5: null, + af_prt: null, + event_revenue_currency: 'USD', + store_reinstall: null, + install_app_store: null, + media_source: 'organic', + deeplink_url: null, + campaign: null, + af_keywords: null, + region: 'AS', + cost_in_selected_currency: null, + event_value: '{}', + ip: '1.1.1.1', + oaid: null, + event_time: '2020-01-15 14:57:24.898', + is_receipt_validated: null, + contributor_1_campaign: null, + af_sub4: null, + imei: null, + contributor_3_campaign: null, + event_revenue_usd: null, + af_sub2: null, + original_url: null, + contributor_2_campaign: null, + android_id: null, + contributor_3_media_source: null, + af_adset: null, + af_ad: null, + state: '57', + network_account_id: null, + idfa: 'A7071198-3848-40A5-B3D0-94578D9BZZZZ', + retargeting_conversion_type: null, + af_channel: null, + af_cost_currency: null, + contributor_1_media_source: null, + keyword_id: null, + device_download_time: '2019-01-20 04:51:16.000', + contributor_1_touch_type: null, + af_reengagement_window: null, + af_siteid: null, + language: 'en-US', + app_id: 'id1217828636', + contributor_1_touch_time: null, + event_revenue: null, + af_ad_type: null, + carrier: null, + event_name: 'My Apps', + af_sub_siteid: null, + advertising_id: null, + os_version: '12.3.1', + platform: 'ios', + af_sub3: null, + contributor_3_match_type: null, + selected_timezone: 'UTC', + af_ad_id: null, + contributor_3_touch_time: null, + user_agent: 'AppsFlyer/1 CFNetwork/978.0.7 Darwin/18.6.0', + is_primary_attribution: true, + sdk_version: 'v4.10.0', + event_time_selected_timezone: '2020-01-15 14:57:24.898+0000', + }), + }, + source: {}, }, ], method: 'POST', @@ -1116,10 +1188,19 @@ export const data = [ network: { wifi: true }, os: { name: 'ios', version: '12.3.1' }, traits: { - address: { city: 'Khu Pho Binh Hoa', zip: '823941', country: 'VN' }, + address: { + city: 'Khu Pho Binh Hoa', + zip: '823941', + country: 'VN', + }, userId: 'hi.from@appsflyer.example.com', }, - externalId: [{ type: 'appsflyerExternalId', value: '1547985076649-5309999' }], + externalId: [ + { + type: 'appsflyerExternalId', + value: '1547985076649-5309999', + }, + ], }, integrations: { AF: false }, properties: { @@ -1223,7 +1304,13 @@ export const data = [ timestamp: '2020-01-15 14:57:24.898', originalTimestamp: '2020-01-15 14:57:24.898', platform: 'ios', - traits: { address: { city: 'Khu Pho Binh Hoa', zip: '823941', country: 'VN' } }, + traits: { + address: { + city: 'Khu Pho Binh Hoa', + zip: '823941', + country: 'VN', + }, + }, anonymousId: '97fcd7b2-cc24-47d7-b776-057b7b199513', }, ], @@ -1237,122 +1324,127 @@ export const data = [ name: 'appsflyer', description: 'test-5', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - idfv: '868049A3-4B2F-4A11-9B00-CFFC362XXXXX', - device_category: 'phone', - af_sub1: null, - customer_user_id: 'hi.from@appsflyer.example.com', - is_lat: null, - contributor_2_af_prt: null, - bundle_id: 'com.appsflyer.AppsFlyer', - gp_broadcast_referrer: '', - contributor_2_touch_time: null, - contributor_3_touch_type: null, - event_source: 'SDK', - af_cost_value: null, - contributor_1_match_type: null, - app_version: '1.4.1', - contributor_3_af_prt: null, - custom_data: null, - contributor_2_touch_type: null, - gp_install_begin: null, - city: 'Khu Pho Binh Hoa', - amazon_aid: null, - gp_referrer: null, - af_cost_model: null, - af_c_id: null, - attributed_touch_time_selected_timezone: null, - selected_currency: 'USD', - app_name: 'AppsFlyer', - install_time_selected_timezone: '2019-01-20 04:51:16.000+0000', - postal_code: '823941', - wifi: true, - install_time: '2019-01-20 04:51:16.000', - operator: null, - attributed_touch_type: null, - af_attribution_lookback: null, - campaign_type: null, - keyword_match_type: null, - af_adset_id: null, - device_download_time_selected_timezone: '2019-01-20 04:51:16.000+0000', - contributor_2_media_source: null, - conversion_type: null, - contributor_2_match_type: null, - api_version: '2.0', - attributed_touch_time: null, - revenue_in_selected_currency: null, - is_retargeting: false, - country_code: 'VN', - gp_click_time: null, - contributor_1_af_prt: null, - match_type: null, - appsflyer_id: '1547985076649-5309999', - dma: 'None', - http_referrer: null, - af_sub5: null, - af_prt: null, - event_revenue_currency: 'USD', - store_reinstall: null, - install_app_store: null, - media_source: 'organic', - deeplink_url: null, - campaign: null, - af_keywords: null, - region: 'AS', - cost_in_selected_currency: null, - event_value: '{}', - ip: '1.1.1.1', - oaid: null, - event_time: '2020-01-15 14:57:24.898', - is_receipt_validated: null, - contributor_1_campaign: null, - af_sub4: null, - imei: null, - contributor_3_campaign: null, - event_revenue_usd: null, - af_sub2: null, - original_url: null, - contributor_2_campaign: null, - android_id: null, - contributor_3_media_source: null, - af_adset: null, - af_ad: null, - state: '57', - network_account_id: null, - idfa: 'A7071198-3848-40A5-B3D0-94578D9BZZZZ', - retargeting_conversion_type: null, - af_channel: null, - af_cost_currency: null, - contributor_1_media_source: null, - keyword_id: null, - device_download_time: '2019-01-20 04:51:16.000', - contributor_1_touch_type: null, - af_reengagement_window: null, - af_siteid: null, - language: 'en-US', - app_id: 'id1217828636', - contributor_1_touch_time: null, - event_revenue: null, - af_ad_type: null, - carrier: null, - event_name: 'My Apps', - af_sub_siteid: null, - advertising_id: null, - os_version: '12.3.1', - platform: 'watchos', - af_sub3: null, - contributor_3_match_type: null, - selected_timezone: 'UTC', - af_ad_id: null, - contributor_3_touch_time: null, - user_agent: 'AppsFlyer/1 CFNetwork/978.0.7 Darwin/18.6.0', - is_primary_attribution: true, - sdk_version: 'v4.10.0', - event_time_selected_timezone: '2020-01-15 14:57:24.898+0000', + request: { + body: JSON.stringify({ + idfv: '868049A3-4B2F-4A11-9B00-CFFC362XXXXX', + device_category: 'phone', + af_sub1: null, + customer_user_id: 'hi.from@appsflyer.example.com', + is_lat: null, + contributor_2_af_prt: null, + bundle_id: 'com.appsflyer.AppsFlyer', + gp_broadcast_referrer: '', + contributor_2_touch_time: null, + contributor_3_touch_type: null, + event_source: 'SDK', + af_cost_value: null, + contributor_1_match_type: null, + app_version: '1.4.1', + contributor_3_af_prt: null, + custom_data: null, + contributor_2_touch_type: null, + gp_install_begin: null, + city: 'Khu Pho Binh Hoa', + amazon_aid: null, + gp_referrer: null, + af_cost_model: null, + af_c_id: null, + attributed_touch_time_selected_timezone: null, + selected_currency: 'USD', + app_name: 'AppsFlyer', + install_time_selected_timezone: '2019-01-20 04:51:16.000+0000', + postal_code: '823941', + wifi: true, + install_time: '2019-01-20 04:51:16.000', + operator: null, + attributed_touch_type: null, + af_attribution_lookback: null, + campaign_type: null, + keyword_match_type: null, + af_adset_id: null, + device_download_time_selected_timezone: '2019-01-20 04:51:16.000+0000', + contributor_2_media_source: null, + conversion_type: null, + contributor_2_match_type: null, + api_version: '2.0', + attributed_touch_time: null, + revenue_in_selected_currency: null, + is_retargeting: false, + country_code: 'VN', + gp_click_time: null, + contributor_1_af_prt: null, + match_type: null, + appsflyer_id: '1547985076649-5309999', + dma: 'None', + http_referrer: null, + af_sub5: null, + af_prt: null, + event_revenue_currency: 'USD', + store_reinstall: null, + install_app_store: null, + media_source: 'organic', + deeplink_url: null, + campaign: null, + af_keywords: null, + region: 'AS', + cost_in_selected_currency: null, + event_value: '{}', + ip: '1.1.1.1', + oaid: null, + event_time: '2020-01-15 14:57:24.898', + is_receipt_validated: null, + contributor_1_campaign: null, + af_sub4: null, + imei: null, + contributor_3_campaign: null, + event_revenue_usd: null, + af_sub2: null, + original_url: null, + contributor_2_campaign: null, + android_id: null, + contributor_3_media_source: null, + af_adset: null, + af_ad: null, + state: '57', + network_account_id: null, + idfa: 'A7071198-3848-40A5-B3D0-94578D9BZZZZ', + retargeting_conversion_type: null, + af_channel: null, + af_cost_currency: null, + contributor_1_media_source: null, + keyword_id: null, + device_download_time: '2019-01-20 04:51:16.000', + contributor_1_touch_type: null, + af_reengagement_window: null, + af_siteid: null, + language: 'en-US', + app_id: 'id1217828636', + contributor_1_touch_time: null, + event_revenue: null, + af_ad_type: null, + carrier: null, + event_name: 'My Apps', + af_sub_siteid: null, + advertising_id: null, + os_version: '12.3.1', + platform: 'watchos', + af_sub3: null, + contributor_3_match_type: null, + selected_timezone: 'UTC', + af_ad_id: null, + contributor_3_touch_time: null, + user_agent: 'AppsFlyer/1 CFNetwork/978.0.7 Darwin/18.6.0', + is_primary_attribution: true, + sdk_version: 'v4.10.0', + event_time_selected_timezone: '2020-01-15 14:57:24.898+0000', + }), + }, + source: {}, }, ], method: 'POST', @@ -1386,10 +1478,19 @@ export const data = [ network: { wifi: true }, os: { name: 'watchos', version: '12.3.1' }, traits: { - address: { city: 'Khu Pho Binh Hoa', zip: '823941', country: 'VN' }, + address: { + city: 'Khu Pho Binh Hoa', + zip: '823941', + country: 'VN', + }, userId: 'hi.from@appsflyer.example.com', }, - externalId: [{ type: 'appsflyerExternalId', value: '1547985076649-5309999' }], + externalId: [ + { + type: 'appsflyerExternalId', + value: '1547985076649-5309999', + }, + ], }, integrations: { AF: false }, properties: { @@ -1493,7 +1594,13 @@ export const data = [ timestamp: '2020-01-15 14:57:24.898', originalTimestamp: '2020-01-15 14:57:24.898', platform: 'watchos', - traits: { address: { city: 'Khu Pho Binh Hoa', zip: '823941', country: 'VN' } }, + traits: { + address: { + city: 'Khu Pho Binh Hoa', + zip: '823941', + country: 'VN', + }, + }, anonymousId: '97fcd7b2-cc24-47d7-b776-057b7b199513', }, ], @@ -1507,122 +1614,127 @@ export const data = [ name: 'appsflyer', description: 'test-6', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - idfv: '868049A3-4B2F-4A11-9B00-CFFC362XXXXX', - device_category: 'phone', - af_sub1: null, - customer_user_id: 'hi.from@appsflyer.example.com', - is_lat: null, - contributor_2_af_prt: null, - bundle_id: 'com.appsflyer.AppsFlyer', - gp_broadcast_referrer: '', - contributor_2_touch_time: null, - contributor_3_touch_type: null, - event_source: 'SDK', - af_cost_value: null, - contributor_1_match_type: null, - app_version: '1.4.1', - contributor_3_af_prt: null, - custom_data: null, - contributor_2_touch_type: null, - gp_install_begin: null, - city: 'Khu Pho Binh Hoa', - amazon_aid: null, - gp_referrer: null, - af_cost_model: null, - af_c_id: null, - attributed_touch_time_selected_timezone: null, - selected_currency: 'USD', - app_name: 'AppsFlyer', - install_time_selected_timezone: '2019-01-20 04:51:16.000+0000', - postal_code: '823941', - wifi: true, - install_time: '2019-01-20 04:51:16.000', - operator: null, - attributed_touch_type: null, - af_attribution_lookback: null, - campaign_type: null, - keyword_match_type: null, - af_adset_id: null, - device_download_time_selected_timezone: '2019-01-20 04:51:16.000+0000', - contributor_2_media_source: null, - conversion_type: null, - contributor_2_match_type: null, - api_version: '2.0', - attributed_touch_time: null, - revenue_in_selected_currency: null, - is_retargeting: false, - country_code: 'VN', - gp_click_time: null, - contributor_1_af_prt: null, - match_type: null, - appsflyer_id: '1547985076649-5309999', - dma: 'None', - http_referrer: null, - af_sub5: null, - af_prt: null, - event_revenue_currency: 'USD', - store_reinstall: null, - install_app_store: null, - media_source: 'organic', - deeplink_url: null, - campaign: null, - af_keywords: null, - region: 'AS', - cost_in_selected_currency: null, - event_value: '{}', - ip: '1.1.1.1', - oaid: null, - event_time: '2020-01-15 14:57:24.898', - is_receipt_validated: null, - contributor_1_campaign: null, - af_sub4: null, - imei: null, - contributor_3_campaign: null, - event_revenue_usd: null, - af_sub2: null, - original_url: null, - contributor_2_campaign: null, - android_id: null, - contributor_3_media_source: null, - af_adset: null, - af_ad: null, - state: '57', - network_account_id: null, - idfa: 'A7071198-3848-40A5-B3D0-94578D9BZZZZ', - retargeting_conversion_type: null, - af_channel: null, - af_cost_currency: null, - contributor_1_media_source: null, - keyword_id: null, - device_download_time: '2019-01-20 04:51:16.000', - contributor_1_touch_type: null, - af_reengagement_window: null, - af_siteid: null, - language: 'en-US', - app_id: 'id1217828636', - contributor_1_touch_time: null, - event_revenue: null, - af_ad_type: null, - carrier: null, - event_name: 'My Apps', - af_sub_siteid: null, - advertising_id: null, - os_version: '12.3.1', - platform: 'ipados', - af_sub3: null, - contributor_3_match_type: null, - selected_timezone: 'UTC', - af_ad_id: null, - contributor_3_touch_time: null, - user_agent: 'AppsFlyer/1 CFNetwork/978.0.7 Darwin/18.6.0', - is_primary_attribution: true, - sdk_version: 'v4.10.0', - event_time_selected_timezone: '2020-01-15 14:57:24.898+0000', + request: { + body: JSON.stringify({ + idfv: '868049A3-4B2F-4A11-9B00-CFFC362XXXXX', + device_category: 'phone', + af_sub1: null, + customer_user_id: 'hi.from@appsflyer.example.com', + is_lat: null, + contributor_2_af_prt: null, + bundle_id: 'com.appsflyer.AppsFlyer', + gp_broadcast_referrer: '', + contributor_2_touch_time: null, + contributor_3_touch_type: null, + event_source: 'SDK', + af_cost_value: null, + contributor_1_match_type: null, + app_version: '1.4.1', + contributor_3_af_prt: null, + custom_data: null, + contributor_2_touch_type: null, + gp_install_begin: null, + city: 'Khu Pho Binh Hoa', + amazon_aid: null, + gp_referrer: null, + af_cost_model: null, + af_c_id: null, + attributed_touch_time_selected_timezone: null, + selected_currency: 'USD', + app_name: 'AppsFlyer', + install_time_selected_timezone: '2019-01-20 04:51:16.000+0000', + postal_code: '823941', + wifi: true, + install_time: '2019-01-20 04:51:16.000', + operator: null, + attributed_touch_type: null, + af_attribution_lookback: null, + campaign_type: null, + keyword_match_type: null, + af_adset_id: null, + device_download_time_selected_timezone: '2019-01-20 04:51:16.000+0000', + contributor_2_media_source: null, + conversion_type: null, + contributor_2_match_type: null, + api_version: '2.0', + attributed_touch_time: null, + revenue_in_selected_currency: null, + is_retargeting: false, + country_code: 'VN', + gp_click_time: null, + contributor_1_af_prt: null, + match_type: null, + appsflyer_id: '1547985076649-5309999', + dma: 'None', + http_referrer: null, + af_sub5: null, + af_prt: null, + event_revenue_currency: 'USD', + store_reinstall: null, + install_app_store: null, + media_source: 'organic', + deeplink_url: null, + campaign: null, + af_keywords: null, + region: 'AS', + cost_in_selected_currency: null, + event_value: '{}', + ip: '1.1.1.1', + oaid: null, + event_time: '2020-01-15 14:57:24.898', + is_receipt_validated: null, + contributor_1_campaign: null, + af_sub4: null, + imei: null, + contributor_3_campaign: null, + event_revenue_usd: null, + af_sub2: null, + original_url: null, + contributor_2_campaign: null, + android_id: null, + contributor_3_media_source: null, + af_adset: null, + af_ad: null, + state: '57', + network_account_id: null, + idfa: 'A7071198-3848-40A5-B3D0-94578D9BZZZZ', + retargeting_conversion_type: null, + af_channel: null, + af_cost_currency: null, + contributor_1_media_source: null, + keyword_id: null, + device_download_time: '2019-01-20 04:51:16.000', + contributor_1_touch_type: null, + af_reengagement_window: null, + af_siteid: null, + language: 'en-US', + app_id: 'id1217828636', + contributor_1_touch_time: null, + event_revenue: null, + af_ad_type: null, + carrier: null, + event_name: 'My Apps', + af_sub_siteid: null, + advertising_id: null, + os_version: '12.3.1', + platform: 'ipados', + af_sub3: null, + contributor_3_match_type: null, + selected_timezone: 'UTC', + af_ad_id: null, + contributor_3_touch_time: null, + user_agent: 'AppsFlyer/1 CFNetwork/978.0.7 Darwin/18.6.0', + is_primary_attribution: true, + sdk_version: 'v4.10.0', + event_time_selected_timezone: '2020-01-15 14:57:24.898+0000', + }), + }, + source: {}, }, ], method: 'POST', @@ -1656,10 +1768,19 @@ export const data = [ network: { wifi: true }, os: { name: 'ipados', version: '12.3.1' }, traits: { - address: { city: 'Khu Pho Binh Hoa', zip: '823941', country: 'VN' }, + address: { + city: 'Khu Pho Binh Hoa', + zip: '823941', + country: 'VN', + }, userId: 'hi.from@appsflyer.example.com', }, - externalId: [{ type: 'appsflyerExternalId', value: '1547985076649-5309999' }], + externalId: [ + { + type: 'appsflyerExternalId', + value: '1547985076649-5309999', + }, + ], }, integrations: { AF: false }, properties: { @@ -1763,7 +1884,13 @@ export const data = [ timestamp: '2020-01-15 14:57:24.898', originalTimestamp: '2020-01-15 14:57:24.898', platform: 'ipados', - traits: { address: { city: 'Khu Pho Binh Hoa', zip: '823941', country: 'VN' } }, + traits: { + address: { + city: 'Khu Pho Binh Hoa', + zip: '823941', + country: 'VN', + }, + }, anonymousId: '97fcd7b2-cc24-47d7-b776-057b7b199513', }, ], @@ -1777,122 +1904,127 @@ export const data = [ name: 'appsflyer', description: 'test-7', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - idfv: '868049A3-4B2F-4A11-9B00-CFFC362XXXXX', - device_category: 'phone', - af_sub1: null, - customer_user_id: 'hi.from@appsflyer.example.com', - is_lat: null, - contributor_2_af_prt: null, - bundle_id: 'com.appsflyer.AppsFlyer', - gp_broadcast_referrer: '', - contributor_2_touch_time: null, - contributor_3_touch_type: null, - event_source: 'SDK', - af_cost_value: null, - contributor_1_match_type: null, - app_version: '1.4.1', - contributor_3_af_prt: null, - custom_data: null, - contributor_2_touch_type: null, - gp_install_begin: null, - city: 'Khu Pho Binh Hoa', - amazon_aid: null, - gp_referrer: null, - af_cost_model: null, - af_c_id: null, - attributed_touch_time_selected_timezone: null, - selected_currency: 'USD', - app_name: 'AppsFlyer', - install_time_selected_timezone: '2019-01-20 04:51:16.000+0000', - postal_code: '823941', - wifi: true, - install_time: '2019-01-20 04:51:16.000', - operator: null, - attributed_touch_type: null, - af_attribution_lookback: null, - campaign_type: null, - keyword_match_type: null, - af_adset_id: null, - device_download_time_selected_timezone: '2019-01-20 04:51:16.000+0000', - contributor_2_media_source: null, - conversion_type: null, - contributor_2_match_type: null, - api_version: '2.0', - attributed_touch_time: null, - revenue_in_selected_currency: null, - is_retargeting: false, - country_code: 'VN', - gp_click_time: null, - contributor_1_af_prt: null, - match_type: null, - appsflyer_id: '1547985076649-5309999', - dma: 'None', - http_referrer: null, - af_sub5: null, - af_prt: null, - event_revenue_currency: 'USD', - store_reinstall: null, - install_app_store: null, - media_source: 'organic', - deeplink_url: null, - campaign: null, - af_keywords: null, - region: 'AS', - cost_in_selected_currency: null, - event_value: '{}', - ip: '1.1.1.1', - oaid: null, - event_time: '2020-01-15 14:57:24.898', - is_receipt_validated: null, - contributor_1_campaign: null, - af_sub4: null, - imei: null, - contributor_3_campaign: null, - event_revenue_usd: null, - af_sub2: null, - original_url: null, - contributor_2_campaign: null, - android_id: null, - contributor_3_media_source: null, - af_adset: null, - af_ad: null, - state: '57', - network_account_id: null, - idfa: 'A7071198-3848-40A5-B3D0-94578D9BZZZZ', - retargeting_conversion_type: null, - af_channel: null, - af_cost_currency: null, - contributor_1_media_source: null, - keyword_id: null, - device_download_time: '2019-01-20 04:51:16.000', - contributor_1_touch_type: null, - af_reengagement_window: null, - af_siteid: null, - language: 'en-US', - app_id: 'id1217828636', - contributor_1_touch_time: null, - event_revenue: null, - af_ad_type: null, - carrier: null, - event_name: 'My Apps', - af_sub_siteid: null, - advertising_id: null, - os_version: '12.3.1', - platform: 'tvos', - af_sub3: null, - contributor_3_match_type: null, - selected_timezone: 'UTC', - af_ad_id: null, - contributor_3_touch_time: null, - user_agent: 'AppsFlyer/1 CFNetwork/978.0.7 Darwin/18.6.0', - is_primary_attribution: true, - sdk_version: 'v4.10.0', - event_time_selected_timezone: '2020-01-15 14:57:24.898+0000', + request: { + body: JSON.stringify({ + idfv: '868049A3-4B2F-4A11-9B00-CFFC362XXXXX', + device_category: 'phone', + af_sub1: null, + customer_user_id: 'hi.from@appsflyer.example.com', + is_lat: null, + contributor_2_af_prt: null, + bundle_id: 'com.appsflyer.AppsFlyer', + gp_broadcast_referrer: '', + contributor_2_touch_time: null, + contributor_3_touch_type: null, + event_source: 'SDK', + af_cost_value: null, + contributor_1_match_type: null, + app_version: '1.4.1', + contributor_3_af_prt: null, + custom_data: null, + contributor_2_touch_type: null, + gp_install_begin: null, + city: 'Khu Pho Binh Hoa', + amazon_aid: null, + gp_referrer: null, + af_cost_model: null, + af_c_id: null, + attributed_touch_time_selected_timezone: null, + selected_currency: 'USD', + app_name: 'AppsFlyer', + install_time_selected_timezone: '2019-01-20 04:51:16.000+0000', + postal_code: '823941', + wifi: true, + install_time: '2019-01-20 04:51:16.000', + operator: null, + attributed_touch_type: null, + af_attribution_lookback: null, + campaign_type: null, + keyword_match_type: null, + af_adset_id: null, + device_download_time_selected_timezone: '2019-01-20 04:51:16.000+0000', + contributor_2_media_source: null, + conversion_type: null, + contributor_2_match_type: null, + api_version: '2.0', + attributed_touch_time: null, + revenue_in_selected_currency: null, + is_retargeting: false, + country_code: 'VN', + gp_click_time: null, + contributor_1_af_prt: null, + match_type: null, + appsflyer_id: '1547985076649-5309999', + dma: 'None', + http_referrer: null, + af_sub5: null, + af_prt: null, + event_revenue_currency: 'USD', + store_reinstall: null, + install_app_store: null, + media_source: 'organic', + deeplink_url: null, + campaign: null, + af_keywords: null, + region: 'AS', + cost_in_selected_currency: null, + event_value: '{}', + ip: '1.1.1.1', + oaid: null, + event_time: '2020-01-15 14:57:24.898', + is_receipt_validated: null, + contributor_1_campaign: null, + af_sub4: null, + imei: null, + contributor_3_campaign: null, + event_revenue_usd: null, + af_sub2: null, + original_url: null, + contributor_2_campaign: null, + android_id: null, + contributor_3_media_source: null, + af_adset: null, + af_ad: null, + state: '57', + network_account_id: null, + idfa: 'A7071198-3848-40A5-B3D0-94578D9BZZZZ', + retargeting_conversion_type: null, + af_channel: null, + af_cost_currency: null, + contributor_1_media_source: null, + keyword_id: null, + device_download_time: '2019-01-20 04:51:16.000', + contributor_1_touch_type: null, + af_reengagement_window: null, + af_siteid: null, + language: 'en-US', + app_id: 'id1217828636', + contributor_1_touch_time: null, + event_revenue: null, + af_ad_type: null, + carrier: null, + event_name: 'My Apps', + af_sub_siteid: null, + advertising_id: null, + os_version: '12.3.1', + platform: 'tvos', + af_sub3: null, + contributor_3_match_type: null, + selected_timezone: 'UTC', + af_ad_id: null, + contributor_3_touch_time: null, + user_agent: 'AppsFlyer/1 CFNetwork/978.0.7 Darwin/18.6.0', + is_primary_attribution: true, + sdk_version: 'v4.10.0', + event_time_selected_timezone: '2020-01-15 14:57:24.898+0000', + }), + }, + source: {}, }, ], method: 'POST', @@ -1926,10 +2058,19 @@ export const data = [ network: { wifi: true }, os: { name: 'tvos', version: '12.3.1' }, traits: { - address: { city: 'Khu Pho Binh Hoa', zip: '823941', country: 'VN' }, + address: { + city: 'Khu Pho Binh Hoa', + zip: '823941', + country: 'VN', + }, userId: 'hi.from@appsflyer.example.com', }, - externalId: [{ type: 'appsflyerExternalId', value: '1547985076649-5309999' }], + externalId: [ + { + type: 'appsflyerExternalId', + value: '1547985076649-5309999', + }, + ], }, integrations: { AF: false }, properties: { @@ -2033,7 +2174,13 @@ export const data = [ timestamp: '2020-01-15 14:57:24.898', originalTimestamp: '2020-01-15 14:57:24.898', platform: 'tvos', - traits: { address: { city: 'Khu Pho Binh Hoa', zip: '823941', country: 'VN' } }, + traits: { + address: { + city: 'Khu Pho Binh Hoa', + zip: '823941', + country: 'VN', + }, + }, anonymousId: '97fcd7b2-cc24-47d7-b776-057b7b199513', }, ], diff --git a/test/integrations/sources/auth0/data.ts b/test/integrations/sources/auth0/data.ts index b012887bc43..7f675116624 100644 --- a/test/integrations/sources/auth0/data.ts +++ b/test/integrations/sources/auth0/data.ts @@ -9,240 +9,247 @@ export const data = [ name: 'auth0', description: 'successful signup', module: 'source', - version: 'v0', - + version: 'v2', input: { request: { body: [ { - log_id: '90020221031055712103169676686005480714681762668315934738', - data: { - date: '2022-10-31T05:57:06.859Z', - type: 'ss', - description: '', - connection: 'Username-Password-Authentication', - connection_id: 'con_djwCjiwyID0vZy1S', - client_id: 'vQcJNDTxsM1W72eHFonRJdzyOvawlwIt', - client_name: 'All Applications', - ip: '35.166.202.113', - user_agent: 'unknown', - details: { - body: { - email: 'testRudderlabs+21@gmail.com', - tenant: 'dev-cu4jy2zgao6yx15x', - password: 'dummyPassword', - client_id: 'vQcJNDTxsM1W72eHFonRJdzyOvawlwIt', + request: { + body: JSON.stringify({ + log_id: '90020221031055712103169676686005480714681762668315934738', + data: { + date: '2022-10-31T05:57:06.859Z', + type: 'ss', + description: '', connection: 'Username-Password-Authentication', + connection_id: 'con_djwCjiwyID0vZy1S', + client_id: 'vQcJNDTxsM1W72eHFonRJdzyOvawlwIt', + client_name: 'All Applications', + ip: '35.166.202.113', + user_agent: 'unknown', + details: { + body: { + email: 'testRudderlabs+21@gmail.com', + tenant: 'dev-cu4jy2zgao6yx15x', + password: 'dummyPassword', + client_id: 'vQcJNDTxsM1W72eHFonRJdzyOvawlwIt', + connection: 'Username-Password-Authentication', + }, + }, + user_id: 'auth0|dummyPassword', + user_name: 'testRudderlabs+21@gmail.com', + strategy: 'auth0', + strategy_type: 'database', + log_id: '90020221031055712103169676686005480714681762668315934738', }, - }, - user_id: 'auth0|dummyPassword', - user_name: 'testRudderlabs+21@gmail.com', - strategy: 'auth0', - strategy_type: 'database', - log_id: '90020221031055712103169676686005480714681762668315934738', + }), }, + source: {}, }, { - log_id: '90020221031055712103169676686007898566320991926665347090', - data: { - date: '2022-10-31T05:57:06.874Z', - type: 'sapi', - description: 'Create a User', - client_id: 'vQcJNDTxsM1W72eHFonRJdzyOvawlwIt', - client_name: '', - ip: '35.166.202.113', - user_agent: - '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', - details: { - request: { + request: { + body: JSON.stringify({ + log_id: '90020221031055712103169676686007898566320991926665347090', + data: { + date: '2022-10-31T05:57:06.874Z', + type: 'sapi', + description: 'Create a User', + client_id: 'vQcJNDTxsM1W72eHFonRJdzyOvawlwIt', + client_name: '', ip: '35.166.202.113', - auth: { - user: { - name: 'rudder test', - email: 'test@rudderstack.com', - user_id: 'auth0|dummyPassword', - }, - strategy: 'jwt', - credentials: { - jti: '571921bf7833a97efabf08d765a0ec8f', - scopes: [ - 'create:actions', - 'create:actions_log_sessions', - 'create:client_credentials', - 'create:client_grants', - 'create:clients', - 'create:connections', - 'create:custom_domains', - 'create:email_provider', - 'create:email_templates', - 'create:guardian_enrollment_tickets', - 'create:integrations', - 'create:log_streams', - 'create:organization_connections', - 'create:organization_invitations', - 'create:organization_member_roles', - 'create:organization_members', - 'create:organizations', - 'create:requested_scopes', - 'create:resource_servers', - 'create:roles', - 'create:rules', - 'create:shields', - 'create:signing_keys', - 'create:tenant_invitations', - 'create:test_email_dispatch', - 'create:users', - 'delete:actions', - 'delete:anomaly_blocks', - 'delete:branding', - 'delete:client_credentials', - 'delete:client_grants', - 'delete:clients', - 'delete:connections', - 'delete:custom_domains', - 'delete:device_credentials', - 'delete:email_provider', - 'delete:email_templates', - 'delete:grants', - 'delete:guardian_enrollments', - 'delete:integrations', - 'delete:log_streams', - 'delete:organization_connections', - 'delete:organization_invitations', - 'delete:organization_member_roles', - 'delete:organization_members', - 'delete:organizations', - 'delete:owners', - 'delete:requested_scopes', - 'delete:resource_servers', - 'delete:roles', - 'delete:rules', - 'delete:rules_configs', - 'delete:shields', - 'delete:tenant_invitations', - 'delete:tenant_members', - 'delete:tenants', - 'delete:users', - 'read:actions', - 'read:anomaly_blocks', - 'read:attack_protection', - 'read:branding', - 'read:checks', - 'read:client_credentials', - 'read:client_grants', - 'read:client_keys', - 'read:clients', - 'read:connections', - 'read:custom_domains', - 'read:device_credentials', - 'read:email_provider', - 'read:email_templates', - 'read:email_triggers', - 'read:entity_counts', - 'read:grants', - 'read:guardian_factors', - 'read:insights', - 'read:integrations', - 'read:log_streams', - 'read:logs', - 'read:mfa_policies', - 'read:organization_connections', - 'read:organization_invitations', - 'read:organization_member_roles', - 'read:organization_members', - 'read:organizations', - 'read:prompts', - 'read:requested_scopes', - 'read:resource_servers', - 'read:roles', - 'read:rules', - 'read:rules_configs', - 'read:shields', - 'read:signing_keys', - 'read:stats', - 'read:tenant_invitations', - 'read:tenant_members', - 'read:tenant_settings', - 'read:triggers', - 'read:users', - 'run:checks', - 'update:actions', - 'update:attack_protection', - 'update:branding', - 'update:client_credentials', - 'update:client_grants', - 'update:client_keys', - 'update:clients', - 'update:connections', - 'update:custom_domains', - 'update:email_provider', - 'update:email_templates', - 'update:email_triggers', - 'update:guardian_factors', - 'update:integrations', - 'update:log_streams', - 'update:mfa_policies', - 'update:organization_connections', - 'update:organizations', - 'update:prompts', - 'update:requested_scopes', - 'update:resource_servers', - 'update:roles', - 'update:rules', - 'update:rules_configs', - 'update:shields', - 'update:signing_keys', - 'update:tenant_members', - 'update:tenant_settings', - 'update:triggers', - 'update:users', - ], - }, - }, - body: { - email: 'testRudderlabs+21@gmail.com', - password: 'dummyPassword', - connection: 'Username-Password-Authentication', - }, - path: '/api/v2/users', - query: {}, - method: 'post', - channel: 'https://manage.auth0.com/', - userAgent: + user_agent: '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', - }, - response: { - body: { - name: 'testRudderlabs+21@gmail.com', - email: 'testRudderlabs+21@gmail.com', - picture: - 'https://s.gravatar.com/avatar/0902f9d02b92aed9f0ac59aaf9475b60?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fbh.png', - user_id: 'auth0|dummyPassword', - nickname: 'testRudderlabs+21', - created_at: '2022-10-31T05:57:06.864Z', - identities: [ - { - user_id: 'auth0|dummyPassword', - isSocial: false, - provider: 'auth0', + details: { + request: { + ip: '35.166.202.113', + auth: { + user: { + name: 'rudder test', + email: 'test@rudderstack.com', + user_id: 'auth0|dummyPassword', + }, + strategy: 'jwt', + credentials: { + jti: '571921bf7833a97efabf08d765a0ec8f', + scopes: [ + 'create:actions', + 'create:actions_log_sessions', + 'create:client_credentials', + 'create:client_grants', + 'create:clients', + 'create:connections', + 'create:custom_domains', + 'create:email_provider', + 'create:email_templates', + 'create:guardian_enrollment_tickets', + 'create:integrations', + 'create:log_streams', + 'create:organization_connections', + 'create:organization_invitations', + 'create:organization_member_roles', + 'create:organization_members', + 'create:organizations', + 'create:requested_scopes', + 'create:resource_servers', + 'create:roles', + 'create:rules', + 'create:shields', + 'create:signing_keys', + 'create:tenant_invitations', + 'create:test_email_dispatch', + 'create:users', + 'delete:actions', + 'delete:anomaly_blocks', + 'delete:branding', + 'delete:client_credentials', + 'delete:client_grants', + 'delete:clients', + 'delete:connections', + 'delete:custom_domains', + 'delete:device_credentials', + 'delete:email_provider', + 'delete:email_templates', + 'delete:grants', + 'delete:guardian_enrollments', + 'delete:integrations', + 'delete:log_streams', + 'delete:organization_connections', + 'delete:organization_invitations', + 'delete:organization_member_roles', + 'delete:organization_members', + 'delete:organizations', + 'delete:owners', + 'delete:requested_scopes', + 'delete:resource_servers', + 'delete:roles', + 'delete:rules', + 'delete:rules_configs', + 'delete:shields', + 'delete:tenant_invitations', + 'delete:tenant_members', + 'delete:tenants', + 'delete:users', + 'read:actions', + 'read:anomaly_blocks', + 'read:attack_protection', + 'read:branding', + 'read:checks', + 'read:client_credentials', + 'read:client_grants', + 'read:client_keys', + 'read:clients', + 'read:connections', + 'read:custom_domains', + 'read:device_credentials', + 'read:email_provider', + 'read:email_templates', + 'read:email_triggers', + 'read:entity_counts', + 'read:grants', + 'read:guardian_factors', + 'read:insights', + 'read:integrations', + 'read:log_streams', + 'read:logs', + 'read:mfa_policies', + 'read:organization_connections', + 'read:organization_invitations', + 'read:organization_member_roles', + 'read:organization_members', + 'read:organizations', + 'read:prompts', + 'read:requested_scopes', + 'read:resource_servers', + 'read:roles', + 'read:rules', + 'read:rules_configs', + 'read:shields', + 'read:signing_keys', + 'read:stats', + 'read:tenant_invitations', + 'read:tenant_members', + 'read:tenant_settings', + 'read:triggers', + 'read:users', + 'run:checks', + 'update:actions', + 'update:attack_protection', + 'update:branding', + 'update:client_credentials', + 'update:client_grants', + 'update:client_keys', + 'update:clients', + 'update:connections', + 'update:custom_domains', + 'update:email_provider', + 'update:email_templates', + 'update:email_triggers', + 'update:guardian_factors', + 'update:integrations', + 'update:log_streams', + 'update:mfa_policies', + 'update:organization_connections', + 'update:organizations', + 'update:prompts', + 'update:requested_scopes', + 'update:resource_servers', + 'update:roles', + 'update:rules', + 'update:rules_configs', + 'update:shields', + 'update:signing_keys', + 'update:tenant_members', + 'update:tenant_settings', + 'update:triggers', + 'update:users', + ], + }, + }, + body: { + email: 'testRudderlabs+21@gmail.com', + password: 'dummyPassword', connection: 'Username-Password-Authentication', }, - ], - updated_at: '2022-10-31T05:57:06.864Z', - email_verified: false, + path: '/api/v2/users', + query: {}, + method: 'post', + channel: 'https://manage.auth0.com/', + 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', + }, + response: { + body: { + name: 'testRudderlabs+21@gmail.com', + email: 'testRudderlabs+21@gmail.com', + picture: + 'https://s.gravatar.com/avatar/0902f9d02b92aed9f0ac59aaf9475b60?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fbh.png', + user_id: 'auth0|dummyPassword', + nickname: 'testRudderlabs+21', + created_at: '2022-10-31T05:57:06.864Z', + identities: [ + { + user_id: 'auth0|dummyPassword', + isSocial: false, + provider: 'auth0', + connection: 'Username-Password-Authentication', + }, + ], + updated_at: '2022-10-31T05:57:06.864Z', + email_verified: false, + }, + statusCode: 201, + }, }, - statusCode: 201, + user_id: 'auth0|dummyPassword', + log_id: '90020221031055712103169676686007898566320991926665347090', }, - }, - user_id: 'auth0|dummyPassword', - log_id: '90020221031055712103169676686007898566320991926665347090', + }), }, + source: {}, }, ], method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, + headers: { 'Content-Type': 'application/json' }, }, pathSuffix: '', }, @@ -267,15 +274,10 @@ export const data = [ userId: 'auth0|dummyPassword', user_name: 'testRudderlabs+21@gmail.com', }, - library: { - name: 'unknown', - version: 'unknown', - }, + library: { name: 'unknown', version: 'unknown' }, userAgent: 'unknown', request_ip: '35.166.202.113', - integration: { - name: 'Auth0', - }, + integration: { name: 'Auth0' }, }, properties: { log_id: '90020221031055712103169676686005480714681762668315934738', @@ -293,9 +295,7 @@ export const data = [ description: '', source_type: 'ss', }, - integrations: { - Auth0: false, - }, + integrations: { Auth0: false }, originalTimestamp: '2022-10-31T05:57:06.859Z', }, ], @@ -311,19 +311,12 @@ export const data = [ userId: 'auth0|dummyPassword', anonymousId: '97fcd7b2-cc24-47d7-b776-057b7b199513', context: { - library: { - name: 'unknown', - version: 'unknown', - }, - traits: { - userId: 'auth0|dummyPassword', - }, + library: { name: 'unknown', version: 'unknown' }, + traits: { userId: 'auth0|dummyPassword' }, 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', request_ip: '35.166.202.113', - integration: { - name: 'Auth0', - }, + integration: { name: 'Auth0' }, }, properties: { log_id: '90020221031055712103169676686007898566320991926665347090', @@ -513,9 +506,7 @@ export const data = [ description: 'Create a User', source_type: 'sapi', }, - integrations: { - Auth0: false, - }, + integrations: { Auth0: false }, originalTimestamp: '2022-10-31T05:57:06.874Z', }, ], @@ -524,68 +515,60 @@ export const data = [ ], }, }, - mockFns: () => { - defaultMockFns(); - }, }, { name: 'auth0', description: 'add member to an organization', module: 'source', - version: 'v0', - + version: 'v2', input: { request: { body: [ { - log_id: '90020221031061004280169676882609459981150114445973782546', - data: { - date: '2022-10-31T06:09:59.135Z', - type: 'sapi', - description: 'Add members to an organization', - client_id: 'vQcJNDTxsM1W72eHFonRJdzyOvawlwIt', - client_name: '', - ip: '35.167.74.121', - user_agent: - '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', - details: { - request: { + request: { + body: JSON.stringify({ + log_id: '90020221031061004280169676882609459981150114445973782546', + data: { + date: '2022-10-31T06:09:59.135Z', + type: 'sapi', + description: 'Add members to an organization', + client_id: 'vQcJNDTxsM1W72eHFonRJdzyOvawlwIt', + client_name: '', ip: '35.167.74.121', - auth: { - user: { - name: 'rudder test', - email: 'test@rudderstack.com', - user_id: 'google-oauth2|123456', - }, - strategy: 'jwt', - credentials: { - jti: '571921bf7833a97efabf08d765a0ec8f', + user_agent: + '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', + details: { + request: { + ip: '35.167.74.121', + auth: { + user: { + name: 'rudder test', + email: 'test@rudderstack.com', + user_id: 'google-oauth2|123456', + }, + strategy: 'jwt', + credentials: { jti: '571921bf7833a97efabf08d765a0ec8f' }, + }, + body: { members: ['auth0|123456'] }, + path: '/api/v2/organizations/org_eoe8p2atZ7furBxg/members', + query: {}, + method: 'post', + channel: 'https://manage.auth0.com/', + 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', }, + response: { body: {}, statusCode: 204 }, }, - body: { - members: ['auth0|123456'], - }, - path: '/api/v2/organizations/org_eoe8p2atZ7furBxg/members', - query: {}, - method: 'post', - channel: 'https://manage.auth0.com/', - 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', + user_id: 'google-oauth2|123456', + log_id: '90020221031061004280169676882609459981150114445973782546', }, - response: { - body: {}, - statusCode: 204, - }, - }, - user_id: 'google-oauth2|123456', - log_id: '90020221031061004280169676882609459981150114445973782546', + }), }, + source: {}, }, ], method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, + headers: { 'Content-Type': 'application/json' }, }, pathSuffix: '', }, @@ -602,19 +585,12 @@ export const data = [ userId: 'google-oauth2|123456', anonymousId: '97fcd7b2-cc24-47d7-b776-057b7b199513', context: { - library: { - name: 'unknown', - version: 'unknown', - }, - traits: { - userId: 'google-oauth2|123456', - }, + library: { name: 'unknown', version: 'unknown' }, + traits: { userId: 'google-oauth2|123456' }, 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', request_ip: '35.167.74.121', - integration: { - name: 'Auth0', - }, + integration: { name: 'Auth0' }, }, groupId: 'org_eoe8p2atZ7furBxg', properties: { @@ -629,13 +605,9 @@ export const data = [ user_id: 'google-oauth2|123456', }, strategy: 'jwt', - credentials: { - jti: '571921bf7833a97efabf08d765a0ec8f', - }, - }, - body: { - members: ['auth0|123456'], + credentials: { jti: '571921bf7833a97efabf08d765a0ec8f' }, }, + body: { members: ['auth0|123456'] }, path: '/api/v2/organizations/org_eoe8p2atZ7furBxg/members', query: {}, method: 'post', @@ -643,19 +615,14 @@ export const data = [ 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', }, - response: { - body: {}, - statusCode: 204, - }, + response: { body: {}, statusCode: 204 }, }, client_id: 'vQcJNDTxsM1W72eHFonRJdzyOvawlwIt', client_name: '', description: 'Add members to an organization', source_type: 'sapi', }, - integrations: { - Auth0: false, - }, + integrations: { Auth0: false }, originalTimestamp: '2022-10-31T06:09:59.135Z', }, ], @@ -664,272 +631,276 @@ export const data = [ ], }, }, - mockFns: () => { - defaultMockFns(); - }, }, { name: 'auth0', description: 'update tenant settings', module: 'source', - version: 'v0', - + version: 'v2', input: { request: { body: [ { - log_id: '90020221031061527239169676960191065529099349299958906898', - data: { - date: '2022-10-31T06:15:25.201Z', - type: 'sapi', - description: 'Update tenant settings', - client_id: 'vQcJNDTxsM1W72eHFonRJdzyOvawlwIt', - client_name: '', - ip: '35.160.3.103', - user_agent: - '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', - details: { - request: { + request: { + body: JSON.stringify({ + log_id: '90020221031061527239169676960191065529099349299958906898', + data: { + date: '2022-10-31T06:15:25.201Z', + type: 'sapi', + description: 'Update tenant settings', + client_id: 'vQcJNDTxsM1W72eHFonRJdzyOvawlwIt', + client_name: '', ip: '35.160.3.103', - auth: { - user: { - name: 'rudder test', - email: 'test@rudderstack.com', - user_id: 'google-oauth2|123456', - }, - strategy: 'jwt', - credentials: { - jti: '571921bf7833a97efabf08d765a0ec8f', - scopes: [ - 'create:actions', - 'create:actions_log_sessions', - 'create:client_credentials', - 'create:client_grants', - 'create:clients', - 'create:connections', - 'create:custom_domains', - 'create:email_provider', - 'create:email_templates', - 'create:guardian_enrollment_tickets', - 'create:integrations', - 'create:log_streams', - 'create:organization_connections', - 'create:organization_invitations', - 'create:organization_member_roles', - 'create:organization_members', - 'create:organizations', - 'create:requested_scopes', - 'create:resource_servers', - 'create:roles', - 'create:rules', - 'create:shields', - 'create:signing_keys', - 'create:tenant_invitations', - 'create:test_email_dispatch', - 'create:users', - 'delete:actions', - 'delete:anomaly_blocks', - 'delete:branding', - 'delete:client_credentials', - 'delete:client_grants', - 'delete:clients', - 'delete:connections', - 'delete:custom_domains', - 'delete:device_credentials', - 'delete:email_provider', - 'delete:email_templates', - 'delete:grants', - 'delete:guardian_enrollments', - 'delete:integrations', - 'delete:log_streams', - 'delete:organization_connections', - 'delete:organization_invitations', - 'delete:organization_member_roles', - 'delete:organization_members', - 'delete:organizations', - 'delete:owners', - 'delete:requested_scopes', - 'delete:resource_servers', - 'delete:roles', - 'delete:rules', - 'delete:rules_configs', - 'delete:shields', - 'delete:tenant_invitations', - 'delete:tenant_members', - 'delete:tenants', - 'delete:users', - 'read:actions', - 'read:anomaly_blocks', - 'read:attack_protection', - 'read:branding', - 'read:checks', - 'read:client_credentials', - 'read:client_grants', - 'read:client_keys', - 'read:clients', - 'read:connections', - 'read:custom_domains', - 'read:device_credentials', - 'read:email_provider', - 'read:email_templates', - 'read:email_triggers', - 'read:entity_counts', - 'read:grants', - 'read:guardian_factors', - 'read:insights', - 'read:integrations', - 'read:log_streams', - 'read:logs', - 'read:mfa_policies', - 'read:organization_connections', - 'read:organization_invitations', - 'read:organization_member_roles', - 'read:organization_members', - 'read:organizations', - 'read:prompts', - 'read:requested_scopes', - 'read:resource_servers', - 'read:roles', - 'read:rules', - 'read:rules_configs', - 'read:shields', - 'read:signing_keys', - 'read:stats', - 'read:tenant_invitations', - 'read:tenant_members', - 'read:tenant_settings', - 'read:triggers', - 'read:users', - 'run:checks', - 'update:actions', - 'update:attack_protection', - 'update:branding', - 'update:client_credentials', - 'update:client_grants', - 'update:client_keys', - 'update:clients', - 'update:connections', - 'update:custom_domains', - 'update:email_provider', - 'update:email_templates', - 'update:email_triggers', - 'update:guardian_factors', - 'update:integrations', - 'update:log_streams', - 'update:mfa_policies', - 'update:organization_connections', - 'update:organizations', - 'update:prompts', - 'update:requested_scopes', - 'update:resource_servers', - 'update:roles', - 'update:rules', - 'update:rules_configs', - 'update:shields', - 'update:signing_keys', - 'update:tenant_members', - 'update:tenant_settings', - 'update:triggers', - 'update:users', - ], - }, - }, - body: { - picture_url: '', - support_url: '', - friendly_name: 'mecro-action', - support_email: 'support@test.com', - }, - path: '/api/v2/tenants/settings', - query: {}, - method: 'patch', - channel: 'https://manage.auth0.com/', - userAgent: + user_agent: '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', - }, - response: { - body: { - flags: { - enable_sso: true, - universal_login: true, - disable_impersonation: true, - allow_changing_enable_sso: false, - revoke_refresh_token_grant: false, - disable_clickjack_protection_headers: false, - new_universal_login_experience_enabled: true, - enforce_client_authentication_on_passwordless_start: true, - cannot_change_enforce_client_authentication_on_passwordless_start: true, + details: { + request: { + ip: '35.160.3.103', + auth: { + user: { + name: 'rudder test', + email: 'test@rudderstack.com', + user_id: 'google-oauth2|123456', + }, + strategy: 'jwt', + credentials: { + jti: '571921bf7833a97efabf08d765a0ec8f', + scopes: [ + 'create:actions', + 'create:actions_log_sessions', + 'create:client_credentials', + 'create:client_grants', + 'create:clients', + 'create:connections', + 'create:custom_domains', + 'create:email_provider', + 'create:email_templates', + 'create:guardian_enrollment_tickets', + 'create:integrations', + 'create:log_streams', + 'create:organization_connections', + 'create:organization_invitations', + 'create:organization_member_roles', + 'create:organization_members', + 'create:organizations', + 'create:requested_scopes', + 'create:resource_servers', + 'create:roles', + 'create:rules', + 'create:shields', + 'create:signing_keys', + 'create:tenant_invitations', + 'create:test_email_dispatch', + 'create:users', + 'delete:actions', + 'delete:anomaly_blocks', + 'delete:branding', + 'delete:client_credentials', + 'delete:client_grants', + 'delete:clients', + 'delete:connections', + 'delete:custom_domains', + 'delete:device_credentials', + 'delete:email_provider', + 'delete:email_templates', + 'delete:grants', + 'delete:guardian_enrollments', + 'delete:integrations', + 'delete:log_streams', + 'delete:organization_connections', + 'delete:organization_invitations', + 'delete:organization_member_roles', + 'delete:organization_members', + 'delete:organizations', + 'delete:owners', + 'delete:requested_scopes', + 'delete:resource_servers', + 'delete:roles', + 'delete:rules', + 'delete:rules_configs', + 'delete:shields', + 'delete:tenant_invitations', + 'delete:tenant_members', + 'delete:tenants', + 'delete:users', + 'read:actions', + 'read:anomaly_blocks', + 'read:attack_protection', + 'read:branding', + 'read:checks', + 'read:client_credentials', + 'read:client_grants', + 'read:client_keys', + 'read:clients', + 'read:connections', + 'read:custom_domains', + 'read:device_credentials', + 'read:email_provider', + 'read:email_templates', + 'read:email_triggers', + 'read:entity_counts', + 'read:grants', + 'read:guardian_factors', + 'read:insights', + 'read:integrations', + 'read:log_streams', + 'read:logs', + 'read:mfa_policies', + 'read:organization_connections', + 'read:organization_invitations', + 'read:organization_member_roles', + 'read:organization_members', + 'read:organizations', + 'read:prompts', + 'read:requested_scopes', + 'read:resource_servers', + 'read:roles', + 'read:rules', + 'read:rules_configs', + 'read:shields', + 'read:signing_keys', + 'read:stats', + 'read:tenant_invitations', + 'read:tenant_members', + 'read:tenant_settings', + 'read:triggers', + 'read:users', + 'run:checks', + 'update:actions', + 'update:attack_protection', + 'update:branding', + 'update:client_credentials', + 'update:client_grants', + 'update:client_keys', + 'update:clients', + 'update:connections', + 'update:custom_domains', + 'update:email_provider', + 'update:email_templates', + 'update:email_triggers', + 'update:guardian_factors', + 'update:integrations', + 'update:log_streams', + 'update:mfa_policies', + 'update:organization_connections', + 'update:organizations', + 'update:prompts', + 'update:requested_scopes', + 'update:resource_servers', + 'update:roles', + 'update:rules', + 'update:rules_configs', + 'update:shields', + 'update:signing_keys', + 'update:tenant_members', + 'update:tenant_settings', + 'update:triggers', + 'update:users', + ], + }, + }, + body: { + picture_url: '', + support_url: '', + friendly_name: 'mecro-action', + support_email: 'support@test.com', + }, + path: '/api/v2/tenants/settings', + query: {}, + method: 'patch', + channel: 'https://manage.auth0.com/', + 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', + }, + response: { + body: { + flags: { + enable_sso: true, + universal_login: true, + disable_impersonation: true, + allow_changing_enable_sso: false, + revoke_refresh_token_grant: false, + disable_clickjack_protection_headers: false, + new_universal_login_experience_enabled: true, + enforce_client_authentication_on_passwordless_start: true, + cannot_change_enforce_client_authentication_on_passwordless_start: true, + }, + picture_url: '', + support_url: '', + friendly_name: 'mecro-action', + support_email: 'support@test.com', + enabled_locales: ['en'], + sandbox_version: '16', + universal_login: {}, + }, + statusCode: 200, }, - picture_url: '', - support_url: '', - friendly_name: 'mecro-action', - support_email: 'support@test.com', - enabled_locales: ['en'], - sandbox_version: '16', - universal_login: {}, }, - statusCode: 200, + user_id: 'google-oauth2|123456', + log_id: '90020221031061527239169676960191065529099349299958906898', }, - }, - user_id: 'google-oauth2|123456', - log_id: '90020221031061527239169676960191065529099349299958906898', + }), }, + source: {}, }, { - log_id: '90020221031061530247169676961198100736838335677367058450', - data: { - date: '2022-10-31T06:15:25.196Z', - type: 'gd_tenant_update', - description: 'Guardian - Updates tenant settings', - ip: '35.160.3.103', - details: { - request: { + request: { + body: JSON.stringify({ + log_id: '90020221031061530247169676961198100736838335677367058450', + data: { + date: '2022-10-31T06:15:25.196Z', + type: 'gd_tenant_update', + description: 'Guardian - Updates tenant settings', ip: '35.160.3.103', - auth: { - scopes: [ - 'read:authenticators', - 'remove:authenticators', - 'update:authenticators', - 'create:authenticators', - 'read:enrollments', - 'delete:enrollments', - 'read:factors', - 'update:factors', - 'update:tenant_settings', - 'update:users', - 'create:enrollment_tickets', - 'create:users', - ], - subject: 'google-oauth2|123456', - strategy: 'jwt_api2_internal_token', - }, - body: { - picture_url: '[REDACTED]', - friendly_name: '[REDACTED]', - }, - path: '/api/tenants/settings', - query: {}, - method: 'PATCH', - }, - response: { - body: { - name: 'dev-cu4jy2zgao6yx15x', - picture_url: '[REDACTED]', - friendly_name: '[REDACTED]', - guardian_mfa_page: '[REDACTED]', + details: { + request: { + ip: '35.160.3.103', + auth: { + scopes: [ + 'read:authenticators', + 'remove:authenticators', + 'update:authenticators', + 'create:authenticators', + 'read:enrollments', + 'delete:enrollments', + 'read:factors', + 'update:factors', + 'update:tenant_settings', + 'update:users', + 'create:enrollment_tickets', + 'create:users', + ], + subject: 'google-oauth2|123456', + strategy: 'jwt_api2_internal_token', + }, + body: { + picture_url: '[REDACTED]', + friendly_name: '[REDACTED]', + }, + path: '/api/tenants/settings', + query: {}, + method: 'PATCH', + }, + response: { + body: { + name: 'dev-cu4jy2zgao6yx15x', + picture_url: '[REDACTED]', + friendly_name: '[REDACTED]', + guardian_mfa_page: '[REDACTED]', + }, + statusCode: 200, + }, }, - statusCode: 200, + user_id: 'google-oauth2|123456', + log_id: '90020221031061530247169676961198100736838335677367058450', }, - }, - user_id: 'google-oauth2|123456', - log_id: '90020221031061530247169676961198100736838335677367058450', + }), }, + source: {}, }, ], method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, + headers: { 'Content-Type': 'application/json' }, }, pathSuffix: '', }, @@ -947,19 +918,12 @@ export const data = [ userId: 'google-oauth2|123456', anonymousId: '97fcd7b2-cc24-47d7-b776-057b7b199513', context: { - library: { - name: 'unknown', - version: 'unknown', - }, - traits: { - userId: 'google-oauth2|123456', - }, + library: { name: 'unknown', version: 'unknown' }, + traits: { userId: 'google-oauth2|123456' }, 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', request_ip: '35.160.3.103', - integration: { - name: 'Auth0', - }, + integration: { name: 'Auth0' }, }, properties: { log_id: '90020221031061527239169676960191065529099349299958906898', @@ -1151,9 +1115,7 @@ export const data = [ description: 'Update tenant settings', source_type: 'sapi', }, - integrations: { - Auth0: false, - }, + integrations: { Auth0: false }, originalTimestamp: '2022-10-31T06:15:25.201Z', }, ], @@ -1169,17 +1131,10 @@ export const data = [ userId: 'google-oauth2|123456', anonymousId: '97fcd7b2-cc24-47d7-b776-057b7b199513', context: { - library: { - name: 'unknown', - version: 'unknown', - }, - traits: { - userId: 'google-oauth2|123456', - }, + library: { name: 'unknown', version: 'unknown' }, + traits: { userId: 'google-oauth2|123456' }, request_ip: '35.160.3.103', - integration: { - name: 'Auth0', - }, + integration: { name: 'Auth0' }, }, properties: { log_id: '90020221031061530247169676961198100736838335677367058450', @@ -1225,9 +1180,7 @@ export const data = [ description: 'Guardian - Updates tenant settings', source_type: 'gd_tenant_update', }, - integrations: { - Auth0: false, - }, + integrations: { Auth0: false }, originalTimestamp: '2022-10-31T06:15:25.196Z', }, ], @@ -1236,52 +1189,51 @@ export const data = [ ], }, }, - mockFns: () => { - defaultMockFns(); - }, }, { name: 'auth0', description: 'missing userId', module: 'source', - version: 'v0', - + version: 'v2', input: { request: { body: [ { - log_id: '90020221031055712103169676686005480714681762668315934738', - data: { - date: '2022-10-31T05:57:06.859Z', - type: 'ss', - description: '', - connection: 'Username-Password-Authentication', - connection_id: 'con_djwCjiwyID0vZy1S', - client_id: 'vQcJNDTxsM1W72eHFonRJdzyOvawlwIt', - client_name: 'All Applications', - ip: '35.166.202.113', - user_agent: 'unknown', - details: { - body: { - email: 'testRudderlabs+21@gmail.com', - tenant: 'dev-cu4jy2zgao6yx15x', - password: 'dummyPassword', - client_id: 'vQcJNDTxsM1W72eHFonRJdzyOvawlwIt', + request: { + body: JSON.stringify({ + log_id: '90020221031055712103169676686005480714681762668315934738', + data: { + date: '2022-10-31T05:57:06.859Z', + type: 'ss', + description: '', connection: 'Username-Password-Authentication', + connection_id: 'con_djwCjiwyID0vZy1S', + client_id: 'vQcJNDTxsM1W72eHFonRJdzyOvawlwIt', + client_name: 'All Applications', + ip: '35.166.202.113', + user_agent: 'unknown', + details: { + body: { + email: 'testRudderlabs+21@gmail.com', + tenant: 'dev-cu4jy2zgao6yx15x', + password: 'dummyPassword', + client_id: 'vQcJNDTxsM1W72eHFonRJdzyOvawlwIt', + connection: 'Username-Password-Authentication', + }, + }, + user_id: '', + user_name: 'testRudderlabs+21@gmail.com', + strategy: 'auth0', + strategy_type: 'database', + log_id: '90020221031055712103169676686005480714681762668315934738', }, - }, - user_id: '', - user_name: 'testRudderlabs+21@gmail.com', - strategy: 'auth0', - strategy_type: 'database', - log_id: '90020221031055712103169676686005480714681762668315934738', + }), }, + source: {}, }, ], method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, + headers: { 'Content-Type': 'application/json' }, }, pathSuffix: '', }, @@ -1306,15 +1258,10 @@ export const data = [ userId: '', user_name: 'testRudderlabs+21@gmail.com', }, - library: { - name: 'unknown', - version: 'unknown', - }, + library: { name: 'unknown', version: 'unknown' }, userAgent: 'unknown', request_ip: '35.166.202.113', - integration: { - name: 'Auth0', - }, + integration: { name: 'Auth0' }, }, properties: { log_id: '90020221031055712103169676686005480714681762668315934738', @@ -1332,9 +1279,7 @@ export const data = [ description: '', source_type: 'ss', }, - integrations: { - Auth0: false, - }, + integrations: { Auth0: false }, originalTimestamp: '2022-10-31T05:57:06.859Z', }, ], @@ -1343,66 +1288,70 @@ export const data = [ ], }, }, - mockFns: () => { - defaultMockFns(); - }, }, { name: 'auth0', description: 'missing userId for all the requests in a batch', module: 'source', - version: 'v0', - + version: 'v2', input: { request: { body: [ { - log_id: '90020221031055712103169676686005480714681762668315934738', - data: { - date: '2022-10-31T05:57:06.859Z', - type: 'ss', - description: '', - connection: 'Username-Password-Authentication', - connection_id: 'con_djwCjiwyID0vZy1S', - client_id: 'vQcJNDTxsM1W72eHFonRJdzyOvawlwIt', - client_name: 'All Applications', - ip: '35.166.202.113', - user_agent: 'unknown', - details: { - body: { - email: 'testRudderlabs+21@gmail.com', - tenant: 'dev-cu4jy2zgao6yx15x', - password: 'dummyPassword', - client_id: 'vQcJNDTxsM1W72eHFonRJdzyOvawlwIt', + request: { + body: JSON.stringify({ + log_id: '90020221031055712103169676686005480714681762668315934738', + data: { + date: '2022-10-31T05:57:06.859Z', + type: 'ss', + description: '', connection: 'Username-Password-Authentication', + connection_id: 'con_djwCjiwyID0vZy1S', + client_id: 'vQcJNDTxsM1W72eHFonRJdzyOvawlwIt', + client_name: 'All Applications', + ip: '35.166.202.113', + user_agent: 'unknown', + details: { + body: { + email: 'testRudderlabs+21@gmail.com', + tenant: 'dev-cu4jy2zgao6yx15x', + password: 'dummyPassword', + client_id: 'vQcJNDTxsM1W72eHFonRJdzyOvawlwIt', + connection: 'Username-Password-Authentication', + }, + }, + user_id: '', + user_name: 'testRudderlabs+21@gmail.com', + strategy: 'auth0', + strategy_type: 'database', + log_id: '90020221031055712103169676686005480714681762668315934738', }, - }, - user_id: '', - user_name: 'testRudderlabs+21@gmail.com', - strategy: 'auth0', - strategy_type: 'database', - log_id: '90020221031055712103169676686005480714681762668315934738', + }), }, + source: {}, }, { - log_id: '90020221031055712103169676686007898566320991926665347090', - data: { - date: '2022-10-31T05:57:06.874Z', - type: 'sapi', - description: 'Create a User', - client_id: 'vQcJNDTxsM1W72eHFonRJdzyOvawlwIt', - client_name: '', - ip: '35.166.202.113', - user_agent: - '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', - log_id: '90020221031055712103169676686007898566320991926665347090', + request: { + body: JSON.stringify({ + log_id: '90020221031055712103169676686007898566320991926665347090', + data: { + date: '2022-10-31T05:57:06.874Z', + type: 'sapi', + description: 'Create a User', + client_id: 'vQcJNDTxsM1W72eHFonRJdzyOvawlwIt', + client_name: '', + ip: '35.166.202.113', + user_agent: + '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', + log_id: '90020221031055712103169676686007898566320991926665347090', + }, + }), }, + source: {}, }, ], method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, + headers: { 'Content-Type': 'application/json' }, }, pathSuffix: '', }, @@ -1427,15 +1376,10 @@ export const data = [ userId: '', user_name: 'testRudderlabs+21@gmail.com', }, - library: { - name: 'unknown', - version: 'unknown', - }, + library: { name: 'unknown', version: 'unknown' }, userAgent: 'unknown', request_ip: '35.166.202.113', - integration: { - name: 'Auth0', - }, + integration: { name: 'Auth0' }, }, properties: { log_id: '90020221031055712103169676686005480714681762668315934738', @@ -1453,9 +1397,7 @@ export const data = [ description: '', source_type: 'ss', }, - integrations: { - Auth0: false, - }, + integrations: { Auth0: false }, originalTimestamp: '2022-10-31T05:57:06.859Z', }, ], @@ -1470,16 +1412,11 @@ export const data = [ sentAt: '2022-10-31T05:57:06.874Z', anonymousId: '97fcd7b2-cc24-47d7-b776-057b7b199513', context: { - library: { - name: 'unknown', - version: 'unknown', - }, + library: { name: 'unknown', version: 'unknown' }, 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', request_ip: '35.166.202.113', - integration: { - name: 'Auth0', - }, + integration: { name: 'Auth0' }, }, properties: { log_id: '90020221031055712103169676686007898566320991926665347090', @@ -1488,9 +1425,7 @@ export const data = [ description: 'Create a User', source_type: 'sapi', }, - integrations: { - Auth0: false, - }, + integrations: { Auth0: false }, originalTimestamp: '2022-10-31T05:57:06.874Z', }, ], @@ -1499,34 +1434,26 @@ export const data = [ ], }, }, - mockFns: () => { - defaultMockFns(); - }, }, { name: 'auth0', description: 'empty batch', module: 'source', - version: 'v0', + version: 'v2', skipGo: 'Created this case manually', input: { request: { body: [], method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, + headers: { 'Content-Type': 'application/json' }, }, pathSuffix: '', }, - output: { - response: { - status: 200, - body: [], - }, - }, - mockFns: () => { - defaultMockFns(); - }, + output: { response: { status: 200, body: [] } }, + }, +].map((tc) => ({ + ...tc, + mockFns: () => { + defaultMockFns(); }, -]; +})); diff --git a/test/integrations/sources/braze/data.ts b/test/integrations/sources/braze/data.ts index a4031e1bd04..516355daad3 100644 --- a/test/integrations/sources/braze/data.ts +++ b/test/integrations/sources/braze/data.ts @@ -10,25 +10,25 @@ export const data = [ name: 'braze', description: 'event mapping done in UI', module: 'source', - version: 'v1', + version: 'v2', skipGo: 'Custom source config', input: { request: { body: [ { - event: { - events: [ - { - event_type: 'users.messages.inappmessage.Click', - properties: { - device_model: 'samsung', - }, - user: { - user_id: 'user_id', - external_user_id: 'externalUserId', + request: { + body: JSON.stringify({ + events: [ + { + event_type: 'users.messages.inappmessage.Click', + properties: { device_model: 'samsung' }, + user: { + user_id: 'user_id', + external_user_id: 'externalUserId', + }, }, - }, - ], + ], + }), }, source: { ID: '2hgvYyU5TYaFvVzBge6tF2UKoeG', @@ -48,9 +48,7 @@ export const data = [ }, ], method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, + headers: { 'Content-Type': 'application/json' }, }, pathSuffix: '', }, @@ -64,21 +62,12 @@ export const data = [ { anonymousId: 'user_id', context: { - device: { - model: 'samsung', - }, - integration: { - name: 'Braze', - }, - library: { - name: 'unknown', - version: 'unknown', - }, + device: { model: 'samsung' }, + integration: { name: 'Braze' }, + library: { name: 'unknown', version: 'unknown' }, }, event: 'In-App Message Clicked', - integrations: { - Braze: false, - }, + integrations: { Braze: false }, type: 'track', userId: 'externalUserId', }, @@ -93,25 +82,24 @@ export const data = [ name: 'braze', description: 'The event is not mapped in the UI', module: 'source', - version: 'v1', - + version: 'v2', input: { request: { body: [ { - event: { - events: [ - { - event_type: 'users.messages.inappmessage.Click', - properties: { - device_model: 'samsung', - }, - user: { - user_id: 'user_id', - external_user_id: 'externalUserId', + request: { + body: JSON.stringify({ + events: [ + { + event_type: 'users.messages.inappmessage.Click', + properties: { device_model: 'samsung' }, + user: { + user_id: 'user_id', + external_user_id: 'externalUserId', + }, }, - }, - ], + ], + }), }, source: { ID: '2hgvYyU5TYaFvVzBge6tF2UKoeG', @@ -119,21 +107,14 @@ export const data = [ Name: 'Braze source', SourceDefinition: commonSourceDefinition, Config: { - customMapping: [ - { - from: 'randomEvent', - to: 'In-App Message Clicked', - }, - ], + customMapping: [{ from: 'randomEvent', to: 'In-App Message Clicked' }], }, ...commonSourceConfigProperties, }, }, ], method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, + headers: { 'Content-Type': 'application/json' }, }, pathSuffix: '', }, @@ -147,21 +128,12 @@ export const data = [ { anonymousId: 'user_id', context: { - device: { - model: 'samsung', - }, - integration: { - name: 'Braze', - }, - library: { - name: 'unknown', - version: 'unknown', - }, + device: { model: 'samsung' }, + integration: { name: 'Braze' }, + library: { name: 'unknown', version: 'unknown' }, }, event: 'users.messages.inappmessage.Click', - integrations: { - Braze: false, - }, + integrations: { Braze: false }, type: 'track', userId: 'externalUserId', }, @@ -176,37 +148,38 @@ export const data = [ name: 'braze', description: 'users.messages.inappmessage.Click event', module: 'source', - version: 'v1', - + version: 'v2', input: { request: { body: [ { - event: { - events: [ - { - event_type: 'users.messages.inappmessage.Click', - id: 'a1234567-89ab-cdef-0123-456789abcdef', - time: 1607988752, - user: { - user_id: '0123456789abcdef01234567', - external_user_id: 'user_id', - device_id: 'fedcba87-6543-210f-edc-ba9876543210', - timezone: 'America/Chicago', - }, - properties: { - app_id: '01234567-89ab-cdef-0123-456789abcdef', - campaign_id: '11234567-89ab-cdef-0123-456789abcdef', - campaign_name: 'Test Campaign', - message_variation_id: 'c1234567-89ab-cdef-0123-456789abcdef', - platform: 'android', - os_version: 'Android (N)', - device_model: 'Nexus 5X', - button_id: '0', - send_id: 'f123456789abcdef01234567', + request: { + body: JSON.stringify({ + events: [ + { + event_type: 'users.messages.inappmessage.Click', + id: 'a1234567-89ab-cdef-0123-456789abcdef', + time: 1607988752, + user: { + user_id: '0123456789abcdef01234567', + external_user_id: 'user_id', + device_id: 'fedcba87-6543-210f-edc-ba9876543210', + timezone: 'America/Chicago', + }, + properties: { + app_id: '01234567-89ab-cdef-0123-456789abcdef', + campaign_id: '11234567-89ab-cdef-0123-456789abcdef', + campaign_name: 'Test Campaign', + message_variation_id: 'c1234567-89ab-cdef-0123-456789abcdef', + platform: 'android', + os_version: 'Android (N)', + device_model: 'Nexus 5X', + button_id: '0', + send_id: 'f123456789abcdef01234567', + }, }, - }, - ], + ], + }), }, source: { ID: '2hgvYyU5TYaFvVzBge6tF2UKoeG', @@ -214,21 +187,14 @@ export const data = [ Name: 'Braze source', SourceDefinition: commonSourceDefinition, Config: { - customMapping: [ - { - from: 'randomEvent', - to: 'In-App Message Clicked', - }, - ], + customMapping: [{ from: 'randomEvent', to: 'In-App Message Clicked' }], }, ...commonSourceConfigProperties, }, }, ], method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, + headers: { 'Content-Type': 'application/json' }, }, pathSuffix: '', }, @@ -277,35 +243,36 @@ export const data = [ name: 'braze', description: 'users.messages.pushnotification.Send event', module: 'source', - version: 'v1', - + version: 'v2', input: { request: { body: [ { - event: { - events: [ - { - event_type: 'users.messages.pushnotification.Send', - id: 'a1234567-89ab-cdef-0123-456789abcdef', - time: 1477502783, - user: { - user_id: '0123456789abcdef01234567', - external_user_id: 'user_id', - device_id: 'fedcba87-6543-210f-edc-ba9876543210', - timezone: 'America/Chicago', - }, - properties: { - app_id: '01234567-89ab-cdef-0123-456789abcdef', - platform: 'ios', - campaign_id: '11234567-89ab-cdef-0123-456789abcdef', - campaign_name: 'Test Campaign', - message_variation_id: 'c1234567-89ab-cdef-0123-456789abcdef', - send_id: 'f123456789abcdef01234567', - dispatch_id: '01234567-89ab-cdef-0123-456789abcdef', + request: { + body: JSON.stringify({ + events: [ + { + event_type: 'users.messages.pushnotification.Send', + id: 'a1234567-89ab-cdef-0123-456789abcdef', + time: 1477502783, + user: { + user_id: '0123456789abcdef01234567', + external_user_id: 'user_id', + device_id: 'fedcba87-6543-210f-edc-ba9876543210', + timezone: 'America/Chicago', + }, + properties: { + app_id: '01234567-89ab-cdef-0123-456789abcdef', + platform: 'ios', + campaign_id: '11234567-89ab-cdef-0123-456789abcdef', + campaign_name: 'Test Campaign', + message_variation_id: 'c1234567-89ab-cdef-0123-456789abcdef', + send_id: 'f123456789abcdef01234567', + dispatch_id: '01234567-89ab-cdef-0123-456789abcdef', + }, }, - }, - ], + ], + }), }, source: { ID: '2hgvYyU5TYaFvVzBge6tF2UKoeG', @@ -313,21 +280,14 @@ export const data = [ Name: 'Braze source', SourceDefinition: commonSourceDefinition, Config: { - customMapping: [ - { - from: 'randomEvent', - to: 'In-App Message Clicked', - }, - ], + customMapping: [{ from: 'randomEvent', to: 'In-App Message Clicked' }], }, ...commonSourceConfigProperties, }, }, ], method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, + headers: { 'Content-Type': 'application/json' }, }, pathSuffix: '', }, @@ -373,35 +333,36 @@ export const data = [ name: 'braze', description: 'users.messages.email.Open event', module: 'source', - version: 'v1', - + version: 'v2', input: { request: { body: [ { - event: { - events: [ - { - event_type: 'users.messages.email.Open', - id: 'a1234567-89ab-cdef-0123-456789abcdef', - time: 1477502783, - user: { - user_id: '0123456789abcdef01234567', - external_user_id: 'user_id', - timezone: 'America/Chicago', - }, - properties: { - campaign_id: '11234567-89ab-cdef-0123-456789abcdef', - campaign_name: 'Test Campaign', - dispatch_id: '12345qwert', - message_variation_id: 'c1234567-89ab-cdef-0123-456789abcdef', - email_address: 'test@test.com', - send_id: 'f123456789abcdef01234567', - user_agent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36', + request: { + body: JSON.stringify({ + events: [ + { + event_type: 'users.messages.email.Open', + id: 'a1234567-89ab-cdef-0123-456789abcdef', + time: 1477502783, + user: { + user_id: '0123456789abcdef01234567', + external_user_id: 'user_id', + timezone: 'America/Chicago', + }, + properties: { + campaign_id: '11234567-89ab-cdef-0123-456789abcdef', + campaign_name: 'Test Campaign', + dispatch_id: '12345qwert', + message_variation_id: 'c1234567-89ab-cdef-0123-456789abcdef', + email_address: 'test@test.com', + send_id: 'f123456789abcdef01234567', + user_agent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36', + }, }, - }, - ], + ], + }), }, source: { ID: '2hgvYyU5TYaFvVzBge6tF2UKoeG', @@ -409,21 +370,14 @@ export const data = [ Name: 'Braze source', SourceDefinition: commonSourceDefinition, Config: { - customMapping: [ - { - from: 'randomEvent', - to: 'In-App Message Clicked', - }, - ], + customMapping: [{ from: 'randomEvent', to: 'In-App Message Clicked' }], }, ...commonSourceConfigProperties, }, }, ], method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, + headers: { 'Content-Type': 'application/json' }, }, pathSuffix: '', }, @@ -469,34 +423,35 @@ export const data = [ name: 'braze', description: 'users.messages.sms.Delivery send', module: 'source', - version: 'v1', - + version: 'v2', input: { request: { body: [ { - event: { - events: [ - { - event_type: 'users.messages.sms.Delivery', - id: 'a1234567-89ab-cdef-0123-456789abcdef', - time: 1477502783, - user: { - user_id: '0123456789abcdef01234567', - external_user_id: 'user_id', - timezone: 'America/Chicago', - }, - properties: { - campaign_id: '11234567-89ab-cdef-0123-456789abcdef', - campaign_name: 'Test Campaign', - dispatch_id: '12345qwert', - message_variation_id: 'c1234567-89ab-cdef-0123-456789abcdef', - to_phone_number: '+16462345678', - subscription_group_id: '41234567-89ab-cdef-0123-456789abcdef', - from_phone_number: '+12123470922', + request: { + body: JSON.stringify({ + events: [ + { + event_type: 'users.messages.sms.Delivery', + id: 'a1234567-89ab-cdef-0123-456789abcdef', + time: 1477502783, + user: { + user_id: '0123456789abcdef01234567', + external_user_id: 'user_id', + timezone: 'America/Chicago', + }, + properties: { + campaign_id: '11234567-89ab-cdef-0123-456789abcdef', + campaign_name: 'Test Campaign', + dispatch_id: '12345qwert', + message_variation_id: 'c1234567-89ab-cdef-0123-456789abcdef', + to_phone_number: '+16462345678', + subscription_group_id: '41234567-89ab-cdef-0123-456789abcdef', + from_phone_number: '+12123470922', + }, }, - }, - ], + ], + }), }, source: { ID: '2hgvYyU5TYaFvVzBge6tF2UKoeG', @@ -504,21 +459,14 @@ export const data = [ Name: 'Braze source', SourceDefinition: commonSourceDefinition, Config: { - customMapping: [ - { - from: 'randomEvent', - to: 'In-App Message Clicked', - }, - ], + customMapping: [{ from: 'randomEvent', to: 'In-App Message Clicked' }], }, ...commonSourceConfigProperties, }, }, ], method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, + headers: { 'Content-Type': 'application/json' }, }, pathSuffix: '', }, @@ -563,38 +511,39 @@ export const data = [ name: 'braze', description: 'users.messages.inappmessage.Click event', module: 'source', - version: 'v1', - + version: 'v2', input: { request: { body: [ { - event: { - events: [ - { - event_type: 'users.messages.inappmessage.Click', - id: 'a1234567-89ab-cdef-0123-456789abcdef', - time: 1477502783, - user: { - user_id: '0123456789abcdef01234567', - external_user_id: 'user_id', - device_id: 'fedcba87-6543-210f-edc-ba9876543210', - timezone: 'America/Chicago', - }, - properties: { - app_id: '01234567-89ab-cdef-0123-456789abcdef', - canvas_id: '11234567-89ab-cdef-0123-456789abcdef', - canvas_name: 'My Cool Campaign', - canvas_variation_id: '31234567-89ab-cdef-0123-456789abcdef', - canvas_step_id: '41234567-89ab-cdef-0123-456789abcdef', - platform: 'android', - os_version: 'Android (N)', - device_model: 'Nexus 5X', - button_id: '0', - send_id: 'f123456789abcdef01234567', + request: { + body: JSON.stringify({ + events: [ + { + event_type: 'users.messages.inappmessage.Click', + id: 'a1234567-89ab-cdef-0123-456789abcdef', + time: 1477502783, + user: { + user_id: '0123456789abcdef01234567', + external_user_id: 'user_id', + device_id: 'fedcba87-6543-210f-edc-ba9876543210', + timezone: 'America/Chicago', + }, + properties: { + app_id: '01234567-89ab-cdef-0123-456789abcdef', + canvas_id: '11234567-89ab-cdef-0123-456789abcdef', + canvas_name: 'My Cool Campaign', + canvas_variation_id: '31234567-89ab-cdef-0123-456789abcdef', + canvas_step_id: '41234567-89ab-cdef-0123-456789abcdef', + platform: 'android', + os_version: 'Android (N)', + device_model: 'Nexus 5X', + button_id: '0', + send_id: 'f123456789abcdef01234567', + }, }, - }, - ], + ], + }), }, source: { ID: '2hgvYyU5TYaFvVzBge6tF2UKoeG', @@ -602,21 +551,14 @@ export const data = [ Name: 'Braze source', SourceDefinition: commonSourceDefinition, Config: { - customMapping: [ - { - from: 'randomEvent', - to: 'In-App Message Clicked', - }, - ], + customMapping: [{ from: 'randomEvent', to: 'In-App Message Clicked' }], }, ...commonSourceConfigProperties, }, }, ], method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, + headers: { 'Content-Type': 'application/json' }, }, pathSuffix: '', }, @@ -666,36 +608,37 @@ export const data = [ name: 'braze', description: 'users.messages.pushnotification.Send event', module: 'source', - version: 'v1', - + version: 'v2', input: { request: { body: [ { - event: { - events: [ - { - event_type: 'users.messages.pushnotification.Send', - id: 'a1234567-89ab-cdef-0123-456789abcdef', - time: 1477502783, - user: { - user_id: '0123456789abcdef01234567', - external_user_id: 'user_id', - device_id: 'fedcba87-6543-210f-edc-ba9876543210', - timezone: 'America/Chicago', - }, - properties: { - app_id: '01234567-89ab-cdef-0123-456789abcdef', - platform: 'ios', - canvas_id: '11234567-89ab-cdef-0123-456789abcdef', - canvas_name: 'My Cool Campaign', - canvas_variation_id: '31234567-89ab-cdef-0123-456789abcdef', - canvas_step_id: '41234567-89ab-cdef-0123-456789abcdef', - send_id: 'f123456789abcdef01234567', - dispatch_id: '01234567-89ab-cdef-0123-456789abcdef', + request: { + body: JSON.stringify({ + events: [ + { + event_type: 'users.messages.pushnotification.Send', + id: 'a1234567-89ab-cdef-0123-456789abcdef', + time: 1477502783, + user: { + user_id: '0123456789abcdef01234567', + external_user_id: 'user_id', + device_id: 'fedcba87-6543-210f-edc-ba9876543210', + timezone: 'America/Chicago', + }, + properties: { + app_id: '01234567-89ab-cdef-0123-456789abcdef', + platform: 'ios', + canvas_id: '11234567-89ab-cdef-0123-456789abcdef', + canvas_name: 'My Cool Campaign', + canvas_variation_id: '31234567-89ab-cdef-0123-456789abcdef', + canvas_step_id: '41234567-89ab-cdef-0123-456789abcdef', + send_id: 'f123456789abcdef01234567', + dispatch_id: '01234567-89ab-cdef-0123-456789abcdef', + }, }, - }, - ], + ], + }), }, source: { ID: '2hgvYyU5TYaFvVzBge6tF2UKoeG', @@ -703,21 +646,14 @@ export const data = [ Name: 'Braze source', SourceDefinition: commonSourceDefinition, Config: { - customMapping: [ - { - from: 'randomEvent', - to: 'In-App Message Clicked', - }, - ], + customMapping: [{ from: 'randomEvent', to: 'In-App Message Clicked' }], }, ...commonSourceConfigProperties, }, }, ], method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, + headers: { 'Content-Type': 'application/json' }, }, pathSuffix: '', }, @@ -764,36 +700,37 @@ export const data = [ name: 'braze', description: 'users.messages.email.Open event', module: 'source', - version: 'v1', - + version: 'v2', input: { request: { body: [ { - event: { - events: [ - { - event_type: 'users.messages.email.Open', - id: 'a1234567-89ab-cdef-0123-456789abcdef', - time: 1477502783, - user: { - user_id: '0123456789abcdef01234567', - external_user_id: 'user_id', - timezone: 'America/Chicago', - }, - properties: { - canvas_id: '11234567-89ab-cdef-0123-456789abcdef', - canvas_name: 'My Cool Canvas', - canvas_variation_id: '31234567-89ab-cdef-0123-456789abcdef', - canvas_step_id: '41234567-89ab-cdef-0123-456789abcdef', - dispatch_id: '12345qwert', - email_address: 'test@test.com', - send_id: 'f123456789abcdef01234567', - user_agent: - 'Mozilla/5.0(Macintosh;IntelMacOSX10_13_5)AppleWebKit/537.36(KHTML,likeGecko)Chrome/67.0.3396.99Safari/537.36', + request: { + body: JSON.stringify({ + events: [ + { + event_type: 'users.messages.email.Open', + id: 'a1234567-89ab-cdef-0123-456789abcdef', + time: 1477502783, + user: { + user_id: '0123456789abcdef01234567', + external_user_id: 'user_id', + timezone: 'America/Chicago', + }, + properties: { + canvas_id: '11234567-89ab-cdef-0123-456789abcdef', + canvas_name: 'My Cool Canvas', + canvas_variation_id: '31234567-89ab-cdef-0123-456789abcdef', + canvas_step_id: '41234567-89ab-cdef-0123-456789abcdef', + dispatch_id: '12345qwert', + email_address: 'test@test.com', + send_id: 'f123456789abcdef01234567', + user_agent: + 'Mozilla/5.0(Macintosh;IntelMacOSX10_13_5)AppleWebKit/537.36(KHTML,likeGecko)Chrome/67.0.3396.99Safari/537.36', + }, }, - }, - ], + ], + }), }, source: { ID: '2hgvYyU5TYaFvVzBge6tF2UKoeG', @@ -801,21 +738,14 @@ export const data = [ Name: 'Braze source', SourceDefinition: commonSourceDefinition, Config: { - customMapping: [ - { - from: 'randomEvent', - to: 'In-App Message Clicked', - }, - ], + customMapping: [{ from: 'randomEvent', to: 'In-App Message Clicked' }], }, ...commonSourceConfigProperties, }, }, ], method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, + headers: { 'Content-Type': 'application/json' }, }, pathSuffix: '', }, @@ -862,35 +792,36 @@ export const data = [ name: 'braze', description: 'users.messages.sms.Delivery event', module: 'source', - version: 'v1', - + version: 'v2', input: { request: { body: [ { - event: { - events: [ - { - event_type: 'users.messages.sms.Delivery', - id: 'a1234567-89ab-cdef-0123-456789abcdef', - time: 1477502783, - user: { - user_id: '0123456789abcdef01234567', - external_user_id: 'user_id', - timezone: 'America/Chicago', - }, - properties: { - canvas_id: '11234567-89ab-cdef-0123-456789abcdef', - canvas_name: 'MyCoolCanvas', - canvas_variation_id: '31234567-89ab-cdef-0123-456789abcdef', - canvas_step_id: '41234567-89ab-cdef-0123-456789abcdef', - dispatch_id: '12345qwert', - to_phone_number: '+16462345678', - subscription_group_id: '41234567-89ab-cdef-0123-456789abcdef', - from_phone_number: '+12123470922', + request: { + body: JSON.stringify({ + events: [ + { + event_type: 'users.messages.sms.Delivery', + id: 'a1234567-89ab-cdef-0123-456789abcdef', + time: 1477502783, + user: { + user_id: '0123456789abcdef01234567', + external_user_id: 'user_id', + timezone: 'America/Chicago', + }, + properties: { + canvas_id: '11234567-89ab-cdef-0123-456789abcdef', + canvas_name: 'MyCoolCanvas', + canvas_variation_id: '31234567-89ab-cdef-0123-456789abcdef', + canvas_step_id: '41234567-89ab-cdef-0123-456789abcdef', + dispatch_id: '12345qwert', + to_phone_number: '+16462345678', + subscription_group_id: '41234567-89ab-cdef-0123-456789abcdef', + from_phone_number: '+12123470922', + }, }, - }, - ], + ], + }), }, source: { ID: '2hgvYyU5TYaFvVzBge6tF2UKoeG', @@ -898,21 +829,14 @@ export const data = [ Name: 'Braze source', SourceDefinition: commonSourceDefinition, Config: { - customMapping: [ - { - from: 'randomEvent', - to: 'In-App Message Clicked', - }, - ], + customMapping: [{ from: 'randomEvent', to: 'In-App Message Clicked' }], }, ...commonSourceConfigProperties, }, }, ], method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, + headers: { 'Content-Type': 'application/json' }, }, pathSuffix: '', }, @@ -958,41 +882,42 @@ export const data = [ name: 'braze', description: 'users.behaviors.CustomEvent any custom event', module: 'source', - version: 'v1', - + version: 'v2', input: { request: { body: [ { - event: { - events: [ - { - event_type: 'users.behaviors.CustomEvent', - id: 'a1234567-89ab-cdef-0123-456789abcdef', - time: 1477502783, - user: { - user_id: '0123456789abcdef01234567', - external_user_id: 'user_id', - device_id: 'fedcba87-6543-210f-edc-ba9876543210', - timezone: 'America/Chicago', - }, - properties: { - app_id: '01234567-89ab-cdef-0123-456789abcdef', - platform: 'ios', - os_version: 'iOS10.3.1', - device_model: 'iPhone7Plus', - name: 'customeventname', - ad_id: '01234567-89ab-cdef-0123-456789abcdef', - ad_id_type: 'roku_ad_id', - ad_tracking_enabled: true, - custom_properties: { - stringpropertyname: 'a', - numberpropertyname: 1, - listpropertyname: ['a', 'b'], + request: { + body: JSON.stringify({ + events: [ + { + event_type: 'users.behaviors.CustomEvent', + id: 'a1234567-89ab-cdef-0123-456789abcdef', + time: 1477502783, + user: { + user_id: '0123456789abcdef01234567', + external_user_id: 'user_id', + device_id: 'fedcba87-6543-210f-edc-ba9876543210', + timezone: 'America/Chicago', + }, + properties: { + app_id: '01234567-89ab-cdef-0123-456789abcdef', + platform: 'ios', + os_version: 'iOS10.3.1', + device_model: 'iPhone7Plus', + name: 'customeventname', + ad_id: '01234567-89ab-cdef-0123-456789abcdef', + ad_id_type: 'roku_ad_id', + ad_tracking_enabled: true, + custom_properties: { + stringpropertyname: 'a', + numberpropertyname: 1, + listpropertyname: ['a', 'b'], + }, }, }, - }, - ], + ], + }), }, source: { ID: '2hgvYyU5TYaFvVzBge6tF2UKoeG', @@ -1000,21 +925,14 @@ export const data = [ Name: 'Braze source', SourceDefinition: commonSourceDefinition, Config: { - customMapping: [ - { - from: 'randomEvent', - to: 'In-App Message Clicked', - }, - ], + customMapping: [{ from: 'randomEvent', to: 'In-App Message Clicked' }], }, ...commonSourceConfigProperties, }, }, ], method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, + headers: { 'Content-Type': 'application/json' }, }, pathSuffix: '', }, @@ -1067,43 +985,44 @@ export const data = [ name: 'braze', description: 'users.behaviors.Purchase event', module: 'source', - version: 'v1', - + version: 'v2', input: { request: { body: [ { - event: { - events: [ - { - event_type: 'users.behaviors.Purchase', - id: 'a1234567-89ab-cdef-0123-456789abcdef', - time: 1477502783, - user: { - user_id: '0123456789abcdef01234567', - external_user_id: 'user_id', - device_id: 'fedcba87-6543-210f-edc-ba9876543210', - timezone: 'America/Chicago', - }, - properties: { - app_id: '01234567-89ab-cdef-0123-456789abcdef', - platform: 'ios', - os_version: 'iOS10.3.1', - device_model: 'iPhone7Plus', - product_id: '1234', - price: 12.34, - currency: 'AED', - ad_id: '01234567-89ab-cdef-0123-456789abcdef', - ad_id_type: 'roku_ad_id', - ad_tracking_enabled: true, - purchase_properties: { - stringpropertyname: 'a', - numberpropertyname: 1, - listpropertyname: ['a', 'b'], + request: { + body: JSON.stringify({ + events: [ + { + event_type: 'users.behaviors.Purchase', + id: 'a1234567-89ab-cdef-0123-456789abcdef', + time: 1477502783, + user: { + user_id: '0123456789abcdef01234567', + external_user_id: 'user_id', + device_id: 'fedcba87-6543-210f-edc-ba9876543210', + timezone: 'America/Chicago', + }, + properties: { + app_id: '01234567-89ab-cdef-0123-456789abcdef', + platform: 'ios', + os_version: 'iOS10.3.1', + device_model: 'iPhone7Plus', + product_id: '1234', + price: 12.34, + currency: 'AED', + ad_id: '01234567-89ab-cdef-0123-456789abcdef', + ad_id_type: 'roku_ad_id', + ad_tracking_enabled: true, + purchase_properties: { + stringpropertyname: 'a', + numberpropertyname: 1, + listpropertyname: ['a', 'b'], + }, }, }, - }, - ], + ], + }), }, source: { ID: '2hgvYyU5TYaFvVzBge6tF2UKoeG', @@ -1111,21 +1030,14 @@ export const data = [ Name: 'Braze source', SourceDefinition: commonSourceDefinition, Config: { - customMapping: [ - { - from: 'randomEvent', - to: 'In-App Message Clicked', - }, - ], + customMapping: [{ from: 'randomEvent', to: 'In-App Message Clicked' }], }, ...commonSourceConfigProperties, }, }, ], method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, + headers: { 'Content-Type': 'application/json' }, }, pathSuffix: '', }, @@ -1180,32 +1092,33 @@ export const data = [ name: 'braze', description: 'users.behaviors.app.SessionStart event', module: 'source', - version: 'v1', - + version: 'v2', input: { request: { body: [ { - event: { - events: [ - { - event_type: 'users.behaviors.app.SessionStart', - id: 'a1234567-89ab-cdef-0123-456789abcdef', - time: 1477502783, - user: { - user_id: '0123456789abcdef01234567', - external_user_id: 'user_id', - device_id: 'fedcba87-6543-210f-edc-ba9876543210', - }, - properties: { - app_id: '01234567-89ab-cdef-0123-456789abcdef', - platform: 'ios', - os_version: 'iOS10.3.1', - device_model: 'iPhone7Plus', - session_id: 'b1234567-89ab-cdef-0123-456789abcdef', + request: { + body: JSON.stringify({ + events: [ + { + event_type: 'users.behaviors.app.SessionStart', + id: 'a1234567-89ab-cdef-0123-456789abcdef', + time: 1477502783, + user: { + user_id: '0123456789abcdef01234567', + external_user_id: 'user_id', + device_id: 'fedcba87-6543-210f-edc-ba9876543210', + }, + properties: { + app_id: '01234567-89ab-cdef-0123-456789abcdef', + platform: 'ios', + os_version: 'iOS10.3.1', + device_model: 'iPhone7Plus', + session_id: 'b1234567-89ab-cdef-0123-456789abcdef', + }, }, - }, - ], + ], + }), }, source: { ID: '2hgvYyU5TYaFvVzBge6tF2UKoeG', @@ -1213,21 +1126,14 @@ export const data = [ Name: 'Braze source', SourceDefinition: commonSourceDefinition, Config: { - customMapping: [ - { - from: 'randomEvent', - to: 'In-App Message Clicked', - }, - ], + customMapping: [{ from: 'randomEvent', to: 'In-App Message Clicked' }], }, ...commonSourceConfigProperties, }, }, ], method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, + headers: { 'Content-Type': 'application/json' }, }, pathSuffix: '', }, diff --git a/test/integrations/sources/canny/data.ts b/test/integrations/sources/canny/data.ts index 50a99bb4832..de626abf19f 100644 --- a/test/integrations/sources/canny/data.ts +++ b/test/integrations/sources/canny/data.ts @@ -9,50 +9,61 @@ export const data = [ name: 'canny', description: 'test-0', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - created: '2022-07-28T10:52:46.294Z', - object: { - author: { - created: '2022-07-15T11:16:32.648Z', - email: 'test@rudderstack.com', - id: '62d14c90fff7c80d0ec08375', - isAdmin: true, - name: 'Rudder Test', - url: 'https://rudder.canny.io/admin/users/dummyUser', - userID: null, - }, - board: { - created: '2022-07-25T12:11:19.895Z', - id: '62de88676bc28b44aaaf25cc', - name: 'features', - postCount: 13, - url: 'https://rudder.canny.io/admin/board/features', - }, - by: null, - category: null, - commentCount: 0, - created: '2022-07-28T10:52:46.172Z', - customFields: [{ id: '62e13820d7949d44b92d3876', name: 'abc', value: '123' }], - details: 'Array of images', - eta: null, - id: '62e26a7e1d4ea13c124337bd', - imageURLs: [ - 'https://canny.io/images/6371453a825c79351c52a6063c3af476.jpg', - 'https://canny.io/images/47db6ee5035bfb45ea87a74f2eb17928.jpg', - ], - owner: null, - score: 1, - status: 'open', - tags: [], - title: 'Custom Fields Testing', - url: 'https://rudder.canny.io/admin/board/features/p/custom-fields-testing', + request: { + body: JSON.stringify({ + created: '2022-07-28T10:52:46.294Z', + object: { + author: { + created: '2022-07-15T11:16:32.648Z', + email: 'test@rudderstack.com', + id: '62d14c90fff7c80d0ec08375', + isAdmin: true, + name: 'Rudder Test', + url: 'https://rudder.canny.io/admin/users/dummyUser', + userID: null, + }, + board: { + created: '2022-07-25T12:11:19.895Z', + id: '62de88676bc28b44aaaf25cc', + name: 'features', + postCount: 13, + url: 'https://rudder.canny.io/admin/board/features', + }, + by: null, + category: null, + commentCount: 0, + created: '2022-07-28T10:52:46.172Z', + customFields: [ + { + id: '62e13820d7949d44b92d3876', + name: 'abc', + value: '123', + }, + ], + details: 'Array of images', + eta: null, + id: '62e26a7e1d4ea13c124337bd', + imageURLs: [ + 'https://canny.io/images/6371453a825c79351c52a6063c3af476.jpg', + 'https://canny.io/images/47db6ee5035bfb45ea87a74f2eb17928.jpg', + ], + owner: null, + score: 1, + status: 'open', + tags: [], + title: 'Custom Fields Testing', + url: 'https://rudder.canny.io/admin/board/features/p/custom-fields-testing', + }, + objectType: 'post', + type: 'post.created', + }), }, - objectType: 'post', - type: 'post.created', + source: {}, }, ], method: 'POST', @@ -81,7 +92,12 @@ export const data = [ name: 'Rudder Test', url: 'https://rudder.canny.io/admin/users/dummyUser', }, - externalId: [{ type: 'cannyUserId', id: '62d14c90fff7c80d0ec08375' }], + externalId: [ + { + type: 'cannyUserId', + id: '62d14c90fff7c80d0ec08375', + }, + ], }, timestamp: '2022-07-28T10:52:46.294Z', originalTimestamp: '2022-07-28T10:52:46.294Z', @@ -98,7 +114,13 @@ export const data = [ category: null, commentCount: 0, created: '2022-07-28T10:52:46.172Z', - customFields: [{ id: '62e13820d7949d44b92d3876', name: 'abc', value: '123' }], + customFields: [ + { + id: '62e13820d7949d44b92d3876', + name: 'abc', + value: '123', + }, + ], details: 'Array of images', eta: null, id: '62e26a7e1d4ea13c124337bd', @@ -126,55 +148,60 @@ export const data = [ name: 'canny', description: 'test-1', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - created: '2022-07-26T10:35:16.390Z', - object: { - author: { - created: '2022-07-15T11:16:32.648Z', - email: 'test@rudderstack.com', - id: '62d14c90fff7c80d0ec08375', - isAdmin: true, - name: 'Rudder Test', - url: 'https://rudder.canny.io/admin/users/dummyUser', - userID: null, - }, - board: { - created: '2022-07-25T12:11:19.895Z', - id: '62de88676bc28b44aaaf25cc', - name: 'features', - postCount: 10, - url: 'https://rudder.canny.io/admin/board/features', - }, - by: null, - category: null, - commentCount: 0, - created: '2022-07-26T08:18:52.459Z', - deletedBy: { - created: '2022-07-15T11:16:32.648Z', - email: 'test@rudderstack.com', - id: '62d14c90fff7c80d0ec08375', - isAdmin: true, - name: 'Rudder Test', - url: 'https://rudder.canny.io/admin/users/dummyUser', - userID: null, - }, - details: "This is the post's details", - eta: null, - id: '62dfa36c9950e94655320fe7', - imageURLs: [], - owner: null, - score: 1, - status: 'open', - tags: [], - title: 'Post Title', - url: 'https://rudder.canny.io/admin/board/features/p/post-title-4', + request: { + body: JSON.stringify({ + created: '2022-07-26T10:35:16.390Z', + object: { + author: { + created: '2022-07-15T11:16:32.648Z', + email: 'test@rudderstack.com', + id: '62d14c90fff7c80d0ec08375', + isAdmin: true, + name: 'Rudder Test', + url: 'https://rudder.canny.io/admin/users/dummyUser', + userID: null, + }, + board: { + created: '2022-07-25T12:11:19.895Z', + id: '62de88676bc28b44aaaf25cc', + name: 'features', + postCount: 10, + url: 'https://rudder.canny.io/admin/board/features', + }, + by: null, + category: null, + commentCount: 0, + created: '2022-07-26T08:18:52.459Z', + deletedBy: { + created: '2022-07-15T11:16:32.648Z', + email: 'test@rudderstack.com', + id: '62d14c90fff7c80d0ec08375', + isAdmin: true, + name: 'Rudder Test', + url: 'https://rudder.canny.io/admin/users/dummyUser', + userID: null, + }, + details: "This is the post's details", + eta: null, + id: '62dfa36c9950e94655320fe7', + imageURLs: [], + owner: null, + score: 1, + status: 'open', + tags: [], + title: 'Post Title', + url: 'https://rudder.canny.io/admin/board/features/p/post-title-4', + }, + objectType: 'post', + type: 'post.deleted', + }), }, - objectType: 'post', - type: 'post.deleted', + source: {}, }, ], method: 'POST', @@ -203,7 +230,12 @@ export const data = [ name: 'Rudder Test', url: 'https://rudder.canny.io/admin/users/dummyUser', }, - externalId: [{ type: 'cannyUserId', id: '62d14c90fff7c80d0ec08375' }], + externalId: [ + { + type: 'cannyUserId', + id: '62d14c90fff7c80d0ec08375', + }, + ], }, timestamp: '2022-07-26T10:35:16.390Z', originalTimestamp: '2022-07-26T10:35:16.390Z', @@ -253,55 +285,62 @@ export const data = [ name: 'canny', description: 'test-2', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - created: '2022-07-26T18:32:28.337Z', - object: { - author: { - created: '2022-07-15T11:16:32.648Z', - email: 'test@rudderstack.com', - id: '62d14c90fff7c80d0ec08375', - isAdmin: true, - name: 'Rudder Test', - url: 'https://rudder.canny.io/admin/users/dummyUser', - userID: null, - }, - by: null, - board: { - created: '2022-07-25T12:11:19.895Z', - id: '62de88676bc28b44aaaf25cc', - name: 'features', - postCount: 12, - url: 'https://rudder.canny.io/admin/board/features', - }, - category: null, - commentCount: 0, - created: '2022-07-26T10:43:43.752Z', - details: "This is the post's details", - eta: null, - id: '62dfc55ffe7f6f465b9b4568', - imageURLs: [], - issue: { - description: - "This is the post's details\n\nhttps://rudder.canny.io/admin/board/features/p/post-title-8", - id: '10001', - key: 'TES-2', - status: 'To Do', - summary: 'Canny Source Testing', - url: 'https://rudderstack-user.atlassian.net/browse/TES-2', - }, - owner: null, - score: 2, - status: 'open', - tags: [], - title: 'Post Title', - url: 'https://rudder.canny.io/admin/board/features/p/post-title-8', + request: { + body: JSON.stringify({ + created: '2022-07-26T18:32:28.337Z', + object: { + author: { + created: '2022-07-15T11:16:32.648Z', + email: 'test@rudderstack.com', + id: '62d14c90fff7c80d0ec08375', + isAdmin: true, + name: 'Rudder Test', + url: 'https://rudder.canny.io/admin/users/dummyUser', + userID: null, + }, + by: null, + board: { + created: '2022-07-25T12:11:19.895Z', + id: '62de88676bc28b44aaaf25cc', + name: 'features', + postCount: 12, + url: 'https://rudder.canny.io/admin/board/features', + }, + category: null, + commentCount: 0, + created: '2022-07-26T10:43:43.752Z', + details: "This is the post's details", + eta: null, + id: '62dfc55ffe7f6f465b9b4568', + imageURLs: [], + issue: { + description: + "This is the post's details\n" + + '\n' + + 'https://rudder.canny.io/admin/board/features/p/post-title-8', + id: '10001', + key: 'TES-2', + status: 'To Do', + summary: 'Canny Source Testing', + url: 'https://rudderstack-user.atlassian.net/browse/TES-2', + }, + owner: null, + score: 2, + status: 'open', + tags: [], + title: 'Post Title', + url: 'https://rudder.canny.io/admin/board/features/p/post-title-8', + }, + objectType: 'post', + type: 'post.jira_issue_linked', + }), }, - objectType: 'post', - type: 'post.jira_issue_linked', + source: {}, }, ], method: 'POST', @@ -330,7 +369,12 @@ export const data = [ name: 'Rudder Test', url: 'https://rudder.canny.io/admin/users/dummyUser', }, - externalId: [{ type: 'cannyUserId', id: '62d14c90fff7c80d0ec08375' }], + externalId: [ + { + type: 'cannyUserId', + id: '62d14c90fff7c80d0ec08375', + }, + ], }, timestamp: '2022-07-26T18:32:28.337Z', originalTimestamp: '2022-07-26T18:32:28.337Z', @@ -353,7 +397,9 @@ export const data = [ imageURLs: [], issue: { description: - "This is the post's details\n\nhttps://rudder.canny.io/admin/board/features/p/post-title-8", + "This is the post's details\n" + + '\n' + + 'https://rudder.canny.io/admin/board/features/p/post-title-8', id: '10001', key: 'TES-2', status: 'To Do', @@ -380,55 +426,62 @@ export const data = [ name: 'canny', description: 'test-3', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - created: '2022-07-27T04:08:24.377Z', - object: { - author: { - created: '2022-07-15T11:16:32.648Z', - email: 'test@rudderstack.com', - id: '62d14c90fff7c80d0ec08375', - isAdmin: true, - name: 'Rudder Test', - url: 'https://rudder.canny.io/admin/users/dummyUser', - userID: null, - }, - by: null, - board: { - created: '2022-07-25T12:11:19.895Z', - id: '62de88676bc28b44aaaf25cc', - name: 'features', - postCount: 12, - url: 'https://rudder.canny.io/admin/board/features', - }, - category: null, - commentCount: 0, - created: '2022-07-26T11:32:31.228Z', - details: 'Array of images', - eta: null, - id: '62dfd0cfb2870d468c9618dd', - imageURLs: [], - issue: { - description: - 'Array of images\n\nhttps://rudder.canny.io/admin/board/features/p/images-testing-2', - id: '10002', - key: 'TES-3', - status: 'To Do', - summary: 'Images testing', - url: 'https://rudderstack-user.atlassian.net/browse/TES-3', - }, - owner: null, - score: 1, - status: 'open', - tags: [], - title: 'Images testing', - url: 'https://rudder.canny.io/admin/board/features/p/images-testing-2', + request: { + body: JSON.stringify({ + created: '2022-07-27T04:08:24.377Z', + object: { + author: { + created: '2022-07-15T11:16:32.648Z', + email: 'test@rudderstack.com', + id: '62d14c90fff7c80d0ec08375', + isAdmin: true, + name: 'Rudder Test', + url: 'https://rudder.canny.io/admin/users/dummyUser', + userID: null, + }, + by: null, + board: { + created: '2022-07-25T12:11:19.895Z', + id: '62de88676bc28b44aaaf25cc', + name: 'features', + postCount: 12, + url: 'https://rudder.canny.io/admin/board/features', + }, + category: null, + commentCount: 0, + created: '2022-07-26T11:32:31.228Z', + details: 'Array of images', + eta: null, + id: '62dfd0cfb2870d468c9618dd', + imageURLs: [], + issue: { + description: + 'Array of images\n' + + '\n' + + 'https://rudder.canny.io/admin/board/features/p/images-testing-2', + id: '10002', + key: 'TES-3', + status: 'To Do', + summary: 'Images testing', + url: 'https://rudderstack-user.atlassian.net/browse/TES-3', + }, + owner: null, + score: 1, + status: 'open', + tags: [], + title: 'Images testing', + url: 'https://rudder.canny.io/admin/board/features/p/images-testing-2', + }, + objectType: 'post', + type: 'post.jira_issue_unlinked', + }), }, - objectType: 'post', - type: 'post.jira_issue_unlinked', + source: {}, }, ], method: 'POST', @@ -457,7 +510,12 @@ export const data = [ name: 'Rudder Test', url: 'https://rudder.canny.io/admin/users/dummyUser', }, - externalId: [{ type: 'cannyUserId', id: '62d14c90fff7c80d0ec08375' }], + externalId: [ + { + type: 'cannyUserId', + id: '62d14c90fff7c80d0ec08375', + }, + ], }, timestamp: '2022-07-27T04:08:24.377Z', originalTimestamp: '2022-07-27T04:08:24.377Z', @@ -481,7 +539,9 @@ export const data = [ imageURLs: [], issue: { description: - 'Array of images\n\nhttps://rudder.canny.io/admin/board/features/p/images-testing-2', + 'Array of images\n' + + '\n' + + 'https://rudder.canny.io/admin/board/features/p/images-testing-2', id: '10002', key: 'TES-3', status: 'To Do', @@ -507,63 +567,68 @@ export const data = [ name: 'canny', description: 'test-4', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - created: '2022-07-26T18:07:03.143Z', - object: { - author: { - avatarURL: 'https://canny.io/images/cddfd145056cd4bc04132ee0e7de04ee.png', - created: '2022-07-15T11:16:32.648Z', - email: 'test@rudderstack.com', - id: '62d14c90fff7c80d0ec08375', - isAdmin: true, - name: 'Rudder Test', - url: 'https://rudder.canny.io/admin/users/dummyUser', - userID: null, - }, - board: { - created: '2022-07-25T12:11:19.895Z', - id: '62de88676bc28b44aaaf25cc', - name: 'features', - postCount: 12, - url: 'https://rudder.canny.io/admin/board/features', - }, - by: null, - category: null, - changeComment: { - imageURLs: ['https://canny.io/images/0a4b1c6a967ad9fc17f0c71dc11d1de2.webp'], - value: '', - }, - changedAt: '2022-07-26T18:07:03.143Z', - changer: { - avatarURL: 'https://canny.io/images/cddfd145056cd4bc04132ee0e7de04ee.png', - created: '2022-07-15T11:16:32.648Z', - email: 'test@rudderstack.com', - id: '62d14c90fff7c80d0ec08375', - isAdmin: true, - name: 'Rudder Test', - url: 'https://rudder.canny.io/admin/users/dummyUser', - userID: null, - }, - commentCount: 1, - created: '2022-07-26T08:22:31.089Z', - details: "This is the post's details", - eta: null, - id: '62dfa4479950e9465532a31e', - imageURLs: [], - jira: { linkedIssues: [], linkedIssueIDs: [] }, - owner: null, - score: 2, - status: 'planned', - tags: [], - title: 'Post Title', - url: 'https://rudder.canny.io/admin/board/features/p/post-title-7', + request: { + body: JSON.stringify({ + created: '2022-07-26T18:07:03.143Z', + object: { + author: { + avatarURL: 'https://canny.io/images/cddfd145056cd4bc04132ee0e7de04ee.png', + created: '2022-07-15T11:16:32.648Z', + email: 'test@rudderstack.com', + id: '62d14c90fff7c80d0ec08375', + isAdmin: true, + name: 'Rudder Test', + url: 'https://rudder.canny.io/admin/users/dummyUser', + userID: null, + }, + board: { + created: '2022-07-25T12:11:19.895Z', + id: '62de88676bc28b44aaaf25cc', + name: 'features', + postCount: 12, + url: 'https://rudder.canny.io/admin/board/features', + }, + by: null, + category: null, + changeComment: { + imageURLs: ['https://canny.io/images/0a4b1c6a967ad9fc17f0c71dc11d1de2.webp'], + value: '', + }, + changedAt: '2022-07-26T18:07:03.143Z', + changer: { + avatarURL: 'https://canny.io/images/cddfd145056cd4bc04132ee0e7de04ee.png', + created: '2022-07-15T11:16:32.648Z', + email: 'test@rudderstack.com', + id: '62d14c90fff7c80d0ec08375', + isAdmin: true, + name: 'Rudder Test', + url: 'https://rudder.canny.io/admin/users/dummyUser', + userID: null, + }, + commentCount: 1, + created: '2022-07-26T08:22:31.089Z', + details: "This is the post's details", + eta: null, + id: '62dfa4479950e9465532a31e', + imageURLs: [], + jira: { linkedIssues: [], linkedIssueIDs: [] }, + owner: null, + score: 2, + status: 'planned', + tags: [], + title: 'Post Title', + url: 'https://rudder.canny.io/admin/board/features/p/post-title-7', + }, + objectType: 'post', + type: 'post.status_changed', + }), }, - objectType: 'post', - type: 'post.status_changed', + source: {}, }, ], method: 'POST', @@ -593,7 +658,12 @@ export const data = [ name: 'Rudder Test', url: 'https://rudder.canny.io/admin/users/dummyUser', }, - externalId: [{ type: 'cannyUserId', id: '62d14c90fff7c80d0ec08375' }], + externalId: [ + { + type: 'cannyUserId', + id: '62d14c90fff7c80d0ec08375', + }, + ], }, timestamp: '2022-07-26T18:07:03.143Z', originalTimestamp: '2022-07-26T18:07:03.143Z', @@ -650,64 +720,69 @@ export const data = [ name: 'canny', description: 'test-5', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - created: '2022-07-26T10:52:17.712Z', - object: { - author: { - created: '2022-07-15T11:16:32.648Z', - email: 'test@rudderstack.com', - id: '62d14c90fff7c80d0ec08375', - isAdmin: true, - name: 'Rudder Test', - url: 'https://rudder.canny.io/admin/users/dummyUser', - userID: null, - }, - board: { - created: '2022-07-25T12:11:19.895Z', - id: '62de88676bc28b44aaaf25cc', - name: 'features', - postCount: 11, - url: 'https://rudder.canny.io/admin/board/features', - }, - created: '2022-07-26T10:52:17.618Z', - id: '62dfc761af6e2b467381b103', - imageURLs: ['https://canny.io/images/59ef1b731f87d1c84bbdc078d0b9221e.webp'], - internal: true, - mentions: [], - parentID: null, - post: { - author: { - created: '2022-07-15T11:16:32.648Z', - email: 'test@rudderstack.com', - id: '62d14c90fff7c80d0ec08375', - isAdmin: true, - name: 'Rudder Test', - url: 'https://rudder.canny.io/admin/users/dummyUser', - userID: null, + request: { + body: JSON.stringify({ + created: '2022-07-26T10:52:17.712Z', + object: { + author: { + created: '2022-07-15T11:16:32.648Z', + email: 'test@rudderstack.com', + id: '62d14c90fff7c80d0ec08375', + isAdmin: true, + name: 'Rudder Test', + url: 'https://rudder.canny.io/admin/users/dummyUser', + userID: null, + }, + board: { + created: '2022-07-25T12:11:19.895Z', + id: '62de88676bc28b44aaaf25cc', + name: 'features', + postCount: 11, + url: 'https://rudder.canny.io/admin/board/features', + }, + created: '2022-07-26T10:52:17.618Z', + id: '62dfc761af6e2b467381b103', + imageURLs: ['https://canny.io/images/59ef1b731f87d1c84bbdc078d0b9221e.webp'], + internal: true, + mentions: [], + parentID: null, + post: { + author: { + created: '2022-07-15T11:16:32.648Z', + email: 'test@rudderstack.com', + id: '62d14c90fff7c80d0ec08375', + isAdmin: true, + name: 'Rudder Test', + url: 'https://rudder.canny.io/admin/users/dummyUser', + userID: null, + }, + by: null, + category: null, + commentCount: 1, + details: "This is the post's details", + eta: null, + id: '62dfa4479950e9465532a31e', + imageURLs: [], + owner: null, + score: 2, + status: 'open', + tags: [], + title: 'Post Title', + url: 'https://rudder.canny.io/admin/board/features/p/post-title-7', + }, + private: false, + value: 'webhook-test', }, - by: null, - category: null, - commentCount: 1, - details: "This is the post's details", - eta: null, - id: '62dfa4479950e9465532a31e', - imageURLs: [], - owner: null, - score: 2, - status: 'open', - tags: [], - title: 'Post Title', - url: 'https://rudder.canny.io/admin/board/features/p/post-title-7', - }, - private: false, - value: 'webhook-test', + objectType: 'comment', + type: 'comment.created', + }), }, - objectType: 'comment', - type: 'comment.created', + source: {}, }, ], method: 'POST', @@ -736,7 +811,12 @@ export const data = [ name: 'Rudder Test', url: 'https://rudder.canny.io/admin/users/dummyUser', }, - externalId: [{ type: 'cannyUserId', id: '62d14c90fff7c80d0ec08375' }], + externalId: [ + { + type: 'cannyUserId', + id: '62d14c90fff7c80d0ec08375', + }, + ], }, timestamp: '2022-07-26T10:52:17.712Z', originalTimestamp: '2022-07-26T10:52:17.712Z', @@ -795,62 +875,67 @@ export const data = [ name: 'canny', description: 'test-6', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - created: '2022-07-27T04:12:09.290Z', - object: { - author: { - created: '2022-07-15T11:16:32.648Z', - email: 'test@rudderstack.com', - id: '62d14c90fff7c80d0ec08375', - isAdmin: true, - name: 'Rudder Test', - url: 'https://rudder.canny.io/admin/users/dummyUser', - userID: null, - }, - board: { - created: '2022-07-25T12:11:19.895Z', - id: '62de88676bc28b44aaaf25cc', - name: 'features', - postCount: 12, - url: 'https://rudder.canny.io/admin/board/features', - }, - created: '2022-07-27T04:11:59.942Z', - id: '62e0bb0faf6e2b467328b133', - imageURLs: [], - parentID: null, - post: { - author: { - created: '2022-07-15T11:16:32.648Z', - email: 'test@rudderstack.com', - id: '62d14c90fff7c80d0ec08375', - isAdmin: true, - name: 'Rudder Test', - url: 'https://rudder.canny.io/admin/users/dummyUser', - userID: null, + request: { + body: JSON.stringify({ + created: '2022-07-27T04:12:09.290Z', + object: { + author: { + created: '2022-07-15T11:16:32.648Z', + email: 'test@rudderstack.com', + id: '62d14c90fff7c80d0ec08375', + isAdmin: true, + name: 'Rudder Test', + url: 'https://rudder.canny.io/admin/users/dummyUser', + userID: null, + }, + board: { + created: '2022-07-25T12:11:19.895Z', + id: '62de88676bc28b44aaaf25cc', + name: 'features', + postCount: 12, + url: 'https://rudder.canny.io/admin/board/features', + }, + created: '2022-07-27T04:11:59.942Z', + id: '62e0bb0faf6e2b467328b133', + imageURLs: [], + parentID: null, + post: { + author: { + created: '2022-07-15T11:16:32.648Z', + email: 'test@rudderstack.com', + id: '62d14c90fff7c80d0ec08375', + isAdmin: true, + name: 'Rudder Test', + url: 'https://rudder.canny.io/admin/users/dummyUser', + userID: null, + }, + by: null, + category: null, + commentCount: 0, + details: 'Array of images', + eta: null, + id: '62dfd0cfb2870d468c9618dd', + imageURLs: [], + owner: null, + score: 1, + status: 'open', + tags: [], + title: 'Images testing', + url: 'https://rudder.canny.io/admin/board/features/p/images-testing-2', + }, + private: false, + value: 'good', }, - by: null, - category: null, - commentCount: 0, - details: 'Array of images', - eta: null, - id: '62dfd0cfb2870d468c9618dd', - imageURLs: [], - owner: null, - score: 1, - status: 'open', - tags: [], - title: 'Images testing', - url: 'https://rudder.canny.io/admin/board/features/p/images-testing-2', - }, - private: false, - value: 'good', + objectType: 'comment', + type: 'comment.deleted', + }), }, - objectType: 'comment', - type: 'comment.deleted', + source: {}, }, ], method: 'POST', @@ -879,7 +964,12 @@ export const data = [ name: 'Rudder Test', url: 'https://rudder.canny.io/admin/users/dummyUser', }, - externalId: [{ type: 'cannyUserId', id: '62d14c90fff7c80d0ec08375' }], + externalId: [ + { + type: 'cannyUserId', + id: '62d14c90fff7c80d0ec08375', + }, + ], }, timestamp: '2022-07-27T04:12:09.290Z', originalTimestamp: '2022-07-27T04:12:09.290Z', @@ -936,62 +1026,67 @@ export const data = [ name: 'canny', description: 'test-7', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - created: '2022-07-26T11:32:31.378Z', - object: { - board: { - created: '2022-07-25T12:11:19.895Z', - id: '62de88676bc28b44aaaf25cc', - name: 'features', - postCount: 12, - url: 'https://rudder.canny.io/admin/board/features', - }, - by: null, - created: '2022-07-26T11:32:31.263Z', - id: '62dfd0cfb2870d468c9618f5', - post: { - author: { - avatarURL: 'https://canny.io/images/cddfd145056cd4bc04132ee0e7de04ee.png', - created: '2022-07-15T11:16:32.648Z', - email: 'test@rudderstack.com', - id: '62d14c90fff7c80d0ec08375', - isAdmin: true, - name: 'Rudder Test', - url: 'https://rudder.canny.io/admin/users/dummyUser', - userID: null, + request: { + body: JSON.stringify({ + created: '2022-07-26T11:32:31.378Z', + object: { + board: { + created: '2022-07-25T12:11:19.895Z', + id: '62de88676bc28b44aaaf25cc', + name: 'features', + postCount: 12, + url: 'https://rudder.canny.io/admin/board/features', + }, + by: null, + created: '2022-07-26T11:32:31.263Z', + id: '62dfd0cfb2870d468c9618f5', + post: { + author: { + avatarURL: 'https://canny.io/images/cddfd145056cd4bc04132ee0e7de04ee.png', + created: '2022-07-15T11:16:32.648Z', + email: 'test@rudderstack.com', + id: '62d14c90fff7c80d0ec08375', + isAdmin: true, + name: 'Rudder Test', + url: 'https://rudder.canny.io/admin/users/dummyUser', + userID: null, + }, + by: null, + category: null, + commentCount: 0, + details: 'Array of images', + eta: null, + id: '62dfd0cfb2870d468c9618dd', + imageURLs: [], + owner: null, + score: 1, + status: 'open', + tags: [], + title: 'Images testing', + url: 'https://rudder.canny.io/admin/board/features/p/images-testing-2', + }, + score: 1, + voter: { + avatarURL: 'https://canny.io/images/cddfd145056cd4bc04132ee0e7de04ee.png', + created: '2022-07-15T11:16:32.648Z', + email: 'test@rudderstack.com', + id: '62d14c90fff7c80d0ec08375', + isAdmin: true, + name: 'Rudder Test', + url: 'https://rudder.canny.io/admin/users/dummyUser', + userID: null, + }, }, - by: null, - category: null, - commentCount: 0, - details: 'Array of images', - eta: null, - id: '62dfd0cfb2870d468c9618dd', - imageURLs: [], - owner: null, - score: 1, - status: 'open', - tags: [], - title: 'Images testing', - url: 'https://rudder.canny.io/admin/board/features/p/images-testing-2', - }, - score: 1, - voter: { - avatarURL: 'https://canny.io/images/cddfd145056cd4bc04132ee0e7de04ee.png', - created: '2022-07-15T11:16:32.648Z', - email: 'test@rudderstack.com', - id: '62d14c90fff7c80d0ec08375', - isAdmin: true, - name: 'Rudder Test', - url: 'https://rudder.canny.io/admin/users/dummyUser', - userID: null, - }, + objectType: 'vote', + type: 'vote.created', + }), }, - objectType: 'vote', - type: 'vote.created', + source: {}, }, ], method: 'POST', @@ -1021,7 +1116,12 @@ export const data = [ name: 'Rudder Test', url: 'https://rudder.canny.io/admin/users/dummyUser', }, - externalId: [{ type: 'cannyUserId', id: '62d14c90fff7c80d0ec08375' }], + externalId: [ + { + type: 'cannyUserId', + id: '62d14c90fff7c80d0ec08375', + }, + ], }, timestamp: '2022-07-26T11:32:31.378Z', originalTimestamp: '2022-07-26T11:32:31.378Z', @@ -1077,69 +1177,74 @@ export const data = [ name: 'canny', description: 'test-8', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - created: '2022-07-26T18:09:27.358Z', - object: { - board: { - created: '2022-07-25T12:11:19.895Z', - id: '62de88676bc28b44aaaf25cc', - name: 'features', - postCount: 12, - url: 'https://rudder.canny.io/admin/board/features', - }, - by: null, - created: '2022-07-26T08:22:31.109Z', - id: '62dfa4479950e9465532a338', - post: { - author: { - avatarURL: 'https://canny.io/images/cddfd145056cd4bc04132ee0e7de04ee.png', - created: '2022-07-15T11:16:32.648Z', - email: 'test@rudderstack.com', - id: '62d14c90fff7c80d0ec08375', - isAdmin: true, - name: 'Rudder Test', - url: 'https://rudder.canny.io/admin/users/dummyUser', - userID: null, - }, - by: null, - category: null, - commentCount: 1, - details: "This is the post's details", - eta: null, - id: '62dfa4479950e9465532a31e', - imageURLs: [], - owner: null, - score: 1, - status: 'planned', - tags: [ - { - id: '62e02db67ad24c46bc175f56', - name: 'abc-tag', - postCount: 1, - url: 'https://rudder.canny.io/admin/board/features?tags=abc-tag', + request: { + body: JSON.stringify({ + created: '2022-07-26T18:09:27.358Z', + object: { + board: { + created: '2022-07-25T12:11:19.895Z', + id: '62de88676bc28b44aaaf25cc', + name: 'features', + postCount: 12, + url: 'https://rudder.canny.io/admin/board/features', }, - ], - title: 'Post Title', - url: 'https://rudder.canny.io/admin/board/features/p/post-title-7', - }, - score: 0, - voter: { - avatarURL: 'https://canny.io/images/cddfd145056cd4bc04132ee0e7de04ee.png', - created: '2022-07-15T11:16:32.648Z', - email: 'test@rudderstack.com', - id: '62d14c90fff7c80d0ec08375', - isAdmin: true, - name: 'Rudder Test', - url: 'https://rudder.canny.io/admin/users/dummyUser', - userID: null, - }, + by: null, + created: '2022-07-26T08:22:31.109Z', + id: '62dfa4479950e9465532a338', + post: { + author: { + avatarURL: 'https://canny.io/images/cddfd145056cd4bc04132ee0e7de04ee.png', + created: '2022-07-15T11:16:32.648Z', + email: 'test@rudderstack.com', + id: '62d14c90fff7c80d0ec08375', + isAdmin: true, + name: 'Rudder Test', + url: 'https://rudder.canny.io/admin/users/dummyUser', + userID: null, + }, + by: null, + category: null, + commentCount: 1, + details: "This is the post's details", + eta: null, + id: '62dfa4479950e9465532a31e', + imageURLs: [], + owner: null, + score: 1, + status: 'planned', + tags: [ + { + id: '62e02db67ad24c46bc175f56', + name: 'abc-tag', + postCount: 1, + url: 'https://rudder.canny.io/admin/board/features?tags=abc-tag', + }, + ], + title: 'Post Title', + url: 'https://rudder.canny.io/admin/board/features/p/post-title-7', + }, + score: 0, + voter: { + avatarURL: 'https://canny.io/images/cddfd145056cd4bc04132ee0e7de04ee.png', + created: '2022-07-15T11:16:32.648Z', + email: 'test@rudderstack.com', + id: '62d14c90fff7c80d0ec08375', + isAdmin: true, + name: 'Rudder Test', + url: 'https://rudder.canny.io/admin/users/dummyUser', + userID: null, + }, + }, + objectType: 'vote', + type: 'vote.deleted', + }), }, - objectType: 'vote', - type: 'vote.deleted', + source: {}, }, ], method: 'POST', @@ -1169,7 +1274,12 @@ export const data = [ name: 'Rudder Test', url: 'https://rudder.canny.io/admin/users/dummyUser', }, - externalId: [{ type: 'cannyUserId', id: '62d14c90fff7c80d0ec08375' }], + externalId: [ + { + type: 'cannyUserId', + id: '62d14c90fff7c80d0ec08375', + }, + ], }, timestamp: '2022-07-26T18:09:27.358Z', originalTimestamp: '2022-07-26T18:09:27.358Z', @@ -1232,50 +1342,61 @@ export const data = [ name: 'canny', description: 'test-9', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - created: '2022-07-28T10:52:46.294Z', - object: { - author: { - created: '2022-07-15T11:16:32.648Z', - email: 'test@rudderstack.com', - id: '62d14c90fff7c80d0ec08375', - isAdmin: true, - name: 'Rudder Test', - url: 'https://rudder.canny.io/admin/users/dummyUser', - userID: 'sampleuserId', - }, - board: { - created: '2022-07-25T12:11:19.895Z', - id: '62de88676bc28b44aaaf25cc', - name: 'features', - postCount: 13, - url: 'https://rudder.canny.io/admin/board/features', - }, - by: null, - category: null, - commentCount: 0, - created: '2022-07-28T10:52:46.172Z', - customFields: [{ id: '62e13820d7949d44b92d3876', name: 'abc', value: '123' }], - details: 'Array of images', - eta: null, - id: '62e26a7e1d4ea13c124337bd', - imageURLs: [ - 'https://canny.io/images/6371453a825c79351c52a6063c3af476.jpg', - 'https://canny.io/images/47db6ee5035bfb45ea87a74f2eb17928.jpg', - ], - owner: null, - score: 1, - status: 'open', - tags: [], - title: 'Custom Fields Testing', - url: 'https://rudder.canny.io/admin/board/features/p/custom-fields-testing', + request: { + body: JSON.stringify({ + created: '2022-07-28T10:52:46.294Z', + object: { + author: { + created: '2022-07-15T11:16:32.648Z', + email: 'test@rudderstack.com', + id: '62d14c90fff7c80d0ec08375', + isAdmin: true, + name: 'Rudder Test', + url: 'https://rudder.canny.io/admin/users/dummyUser', + userID: 'sampleuserId', + }, + board: { + created: '2022-07-25T12:11:19.895Z', + id: '62de88676bc28b44aaaf25cc', + name: 'features', + postCount: 13, + url: 'https://rudder.canny.io/admin/board/features', + }, + by: null, + category: null, + commentCount: 0, + created: '2022-07-28T10:52:46.172Z', + customFields: [ + { + id: '62e13820d7949d44b92d3876', + name: 'abc', + value: '123', + }, + ], + details: 'Array of images', + eta: null, + id: '62e26a7e1d4ea13c124337bd', + imageURLs: [ + 'https://canny.io/images/6371453a825c79351c52a6063c3af476.jpg', + 'https://canny.io/images/47db6ee5035bfb45ea87a74f2eb17928.jpg', + ], + owner: null, + score: 1, + status: 'open', + tags: [], + title: 'Custom Fields Testing', + url: 'https://rudder.canny.io/admin/board/features/p/custom-fields-testing', + }, + objectType: 'post', + type: 'post.created', + }), }, - objectType: 'post', - type: 'post.created', + source: {}, }, ], method: 'POST', @@ -1304,7 +1425,12 @@ export const data = [ name: 'Rudder Test', url: 'https://rudder.canny.io/admin/users/dummyUser', }, - externalId: [{ type: 'cannyUserId', id: '62d14c90fff7c80d0ec08375' }], + externalId: [ + { + type: 'cannyUserId', + id: '62d14c90fff7c80d0ec08375', + }, + ], }, timestamp: '2022-07-28T10:52:46.294Z', originalTimestamp: '2022-07-28T10:52:46.294Z', @@ -1321,7 +1447,13 @@ export const data = [ category: null, commentCount: 0, created: '2022-07-28T10:52:46.172Z', - customFields: [{ id: '62e13820d7949d44b92d3876', name: 'abc', value: '123' }], + customFields: [ + { + id: '62e13820d7949d44b92d3876', + name: 'abc', + value: '123', + }, + ], details: 'Array of images', eta: null, id: '62e26a7e1d4ea13c124337bd', @@ -1349,62 +1481,67 @@ export const data = [ name: 'canny', description: 'test-10', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - created: '2022-07-26T11:32:31.378Z', - object: { - board: { - created: '2022-07-25T12:11:19.895Z', - id: '62de88676bc28b44aaaf25cc', - name: 'features', - postCount: 12, - url: 'https://rudder.canny.io/admin/board/features', - }, - by: null, - created: '2022-07-26T11:32:31.263Z', - id: '62dfd0cfb2870d468c9618f5', - post: { - author: { - avatarURL: 'https://canny.io/images/cddfd145056cd4bc04132ee0e7de04ee.png', - created: '2022-07-15T11:16:32.648Z', - email: 'test@rudderstack.com', - id: '62d14c90fff7c80d0ec08375', - isAdmin: true, - name: 'Rudder Test', - url: 'https://rudder.canny.io/admin/users/dummyUser', - userID: null, + request: { + body: JSON.stringify({ + created: '2022-07-26T11:32:31.378Z', + object: { + board: { + created: '2022-07-25T12:11:19.895Z', + id: '62de88676bc28b44aaaf25cc', + name: 'features', + postCount: 12, + url: 'https://rudder.canny.io/admin/board/features', + }, + by: null, + created: '2022-07-26T11:32:31.263Z', + id: '62dfd0cfb2870d468c9618f5', + post: { + author: { + avatarURL: 'https://canny.io/images/cddfd145056cd4bc04132ee0e7de04ee.png', + created: '2022-07-15T11:16:32.648Z', + email: 'test@rudderstack.com', + id: '62d14c90fff7c80d0ec08375', + isAdmin: true, + name: 'Rudder Test', + url: 'https://rudder.canny.io/admin/users/dummyUser', + userID: null, + }, + by: null, + category: null, + commentCount: 0, + details: 'Array of images', + eta: null, + id: '62dfd0cfb2870d468c9618dd', + imageURLs: [], + owner: null, + score: 1, + status: 'open', + tags: [], + title: 'Images testing', + url: 'https://rudder.canny.io/admin/board/features/p/images-testing-2', + }, + score: 1, + voter: { + avatarURL: 'https://canny.io/images/cddfd145056cd4bc04132ee0e7de04ee.png', + created: '2022-07-15T11:16:32.648Z', + email: 'test@rudderstack.com', + id: '62d14c90fff7c80d0ec08375', + isAdmin: true, + name: 'Rudder Test', + url: 'https://rudder.canny.io/admin/users/dummyUser', + userID: '123', + }, }, - by: null, - category: null, - commentCount: 0, - details: 'Array of images', - eta: null, - id: '62dfd0cfb2870d468c9618dd', - imageURLs: [], - owner: null, - score: 1, - status: 'open', - tags: [], - title: 'Images testing', - url: 'https://rudder.canny.io/admin/board/features/p/images-testing-2', - }, - score: 1, - voter: { - avatarURL: 'https://canny.io/images/cddfd145056cd4bc04132ee0e7de04ee.png', - created: '2022-07-15T11:16:32.648Z', - email: 'test@rudderstack.com', - id: '62d14c90fff7c80d0ec08375', - isAdmin: true, - name: 'Rudder Test', - url: 'https://rudder.canny.io/admin/users/dummyUser', - userID: '123', - }, + objectType: 'vote', + type: 'vote.created', + }), }, - objectType: 'vote', - type: 'vote.created', + source: {}, }, ], method: 'POST', @@ -1434,7 +1571,12 @@ export const data = [ name: 'Rudder Test', url: 'https://rudder.canny.io/admin/users/dummyUser', }, - externalId: [{ type: 'cannyUserId', id: '62d14c90fff7c80d0ec08375' }], + externalId: [ + { + type: 'cannyUserId', + id: '62d14c90fff7c80d0ec08375', + }, + ], }, timestamp: '2022-07-26T11:32:31.378Z', originalTimestamp: '2022-07-26T11:32:31.378Z', @@ -1490,69 +1632,74 @@ export const data = [ name: 'canny', description: 'test-11', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - created: '2022-07-26T18:09:27.358Z', - object: { - board: { - created: '2022-07-25T12:11:19.895Z', - id: '62de88676bc28b44aaaf25cc', - name: 'features', - postCount: 12, - url: 'https://rudder.canny.io/admin/board/features', - }, - by: null, - created: '2022-07-26T08:22:31.109Z', - id: '62dfa4479950e9465532a338', - post: { - author: { - avatarURL: 'https://canny.io/images/cddfd145056cd4bc04132ee0e7de04ee.png', - created: '2022-07-15T11:16:32.648Z', - email: 'test@rudderstack.com', - id: '62d14c90fff7c80d0ec08375', - isAdmin: true, - name: 'Rudder Test', - url: 'https://rudder.canny.io/admin/users/dummyUser', - userID: null, - }, - by: null, - category: null, - commentCount: 1, - details: "This is the post's details", - eta: null, - id: '62dfa4479950e9465532a31e', - imageURLs: [], - owner: null, - score: 1, - status: 'planned', - tags: [ - { - id: '62e02db67ad24c46bc175f56', - name: 'abc-tag', - postCount: 1, - url: 'https://rudder.canny.io/admin/board/features?tags=abc-tag', + request: { + body: JSON.stringify({ + created: '2022-07-26T18:09:27.358Z', + object: { + board: { + created: '2022-07-25T12:11:19.895Z', + id: '62de88676bc28b44aaaf25cc', + name: 'features', + postCount: 12, + url: 'https://rudder.canny.io/admin/board/features', }, - ], - title: 'Post Title', - url: 'https://rudder.canny.io/admin/board/features/p/post-title-7', - }, - score: 0, - voter: { - avatarURL: 'https://canny.io/images/cddfd145056cd4bc04132ee0e7de04ee.png', - created: '2022-07-15T11:16:32.648Z', - email: null, - id: '62d14c90fff7c80d0ec08375', - isAdmin: true, - name: 'Rudder Test', - url: 'https://rudder.canny.io/admin/users/dummyUser', - userID: null, - }, + by: null, + created: '2022-07-26T08:22:31.109Z', + id: '62dfa4479950e9465532a338', + post: { + author: { + avatarURL: 'https://canny.io/images/cddfd145056cd4bc04132ee0e7de04ee.png', + created: '2022-07-15T11:16:32.648Z', + email: 'test@rudderstack.com', + id: '62d14c90fff7c80d0ec08375', + isAdmin: true, + name: 'Rudder Test', + url: 'https://rudder.canny.io/admin/users/dummyUser', + userID: null, + }, + by: null, + category: null, + commentCount: 1, + details: "This is the post's details", + eta: null, + id: '62dfa4479950e9465532a31e', + imageURLs: [], + owner: null, + score: 1, + status: 'planned', + tags: [ + { + id: '62e02db67ad24c46bc175f56', + name: 'abc-tag', + postCount: 1, + url: 'https://rudder.canny.io/admin/board/features?tags=abc-tag', + }, + ], + title: 'Post Title', + url: 'https://rudder.canny.io/admin/board/features/p/post-title-7', + }, + score: 0, + voter: { + avatarURL: 'https://canny.io/images/cddfd145056cd4bc04132ee0e7de04ee.png', + created: '2022-07-15T11:16:32.648Z', + email: null, + id: '62d14c90fff7c80d0ec08375', + isAdmin: true, + name: 'Rudder Test', + url: 'https://rudder.canny.io/admin/users/dummyUser', + userID: null, + }, + }, + objectType: 'vote', + type: 'vote.deleted', + }), }, - objectType: 'vote', - type: 'vote.deleted', + source: {}, }, ], method: 'POST', @@ -1585,53 +1732,58 @@ export const data = [ name: 'canny', description: 'test-12', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - created: '2022-07-26T10:35:16.390Z', - object: { - author: { - created: '2022-07-15T11:16:32.648Z', - email: 'test@rudderstack.com', - isAdmin: true, - name: 'Rudder Test', - url: 'https://rudder.canny.io/admin/users/dummyUser', - userID: null, - }, - board: { - created: '2022-07-25T12:11:19.895Z', - id: '62de88676bc28b44aaaf25cc', - name: 'features', - postCount: 10, - url: 'https://rudder.canny.io/admin/board/features', - }, - by: null, - category: null, - commentCount: 0, - created: '2022-07-26T08:18:52.459Z', - deletedBy: { - created: '2022-07-15T11:16:32.648Z', - email: 'test@rudderstack.com', - id: '62d14c90fff7c80d0ec08375', - isAdmin: true, - name: 'Rudder Test', - url: 'https://rudder.canny.io/admin/users/dummyUser', - userID: null, - }, - details: "This is the post's details", - eta: null, - id: '62dfa36c9950e94655320fe7', - imageURLs: [], - owner: null, - score: 1, - status: 'open', - tags: [], - title: 'Post Title', - url: 'https://rudder.canny.io/admin/board/features/p/post-title-4', + request: { + body: JSON.stringify({ + created: '2022-07-26T10:35:16.390Z', + object: { + author: { + created: '2022-07-15T11:16:32.648Z', + email: 'test@rudderstack.com', + isAdmin: true, + name: 'Rudder Test', + url: 'https://rudder.canny.io/admin/users/dummyUser', + userID: null, + }, + board: { + created: '2022-07-25T12:11:19.895Z', + id: '62de88676bc28b44aaaf25cc', + name: 'features', + postCount: 10, + url: 'https://rudder.canny.io/admin/board/features', + }, + by: null, + category: null, + commentCount: 0, + created: '2022-07-26T08:18:52.459Z', + deletedBy: { + created: '2022-07-15T11:16:32.648Z', + email: 'test@rudderstack.com', + id: '62d14c90fff7c80d0ec08375', + isAdmin: true, + name: 'Rudder Test', + url: 'https://rudder.canny.io/admin/users/dummyUser', + userID: null, + }, + details: "This is the post's details", + eta: null, + id: '62dfa36c9950e94655320fe7', + imageURLs: [], + owner: null, + score: 1, + status: 'open', + tags: [], + title: 'Post Title', + url: 'https://rudder.canny.io/admin/board/features/p/post-title-4', + }, + objectType: 'post', + }), }, - objectType: 'post', + source: {}, }, ], method: 'POST', diff --git a/test/integrations/sources/close_crm/data.ts b/test/integrations/sources/close_crm/data.ts index 08b9d13a1b0..66c8841d1eb 100644 --- a/test/integrations/sources/close_crm/data.ts +++ b/test/integrations/sources/close_crm/data.ts @@ -9,78 +9,78 @@ export const data = [ name: 'close_crm', description: 'lead update', module: 'source', - version: 'v1', + version: 'v2', input: { request: { body: [ { - event: { - event: { - date_created: '2019-01-15T12:48:23.395000', - meta: { - request_method: 'PUT', - request_path: '/api/v1/opportunity/object_id/', - }, - id: 'ev_123', - action: 'updated', - date_updated: '2019-01-15T12:48:23.395000', - changed_fields: [ - 'confidence', - 'date_updated', - 'status_id', - 'status_label', - 'status_type', - ], - previous_data: { - status_type: 'active', - confidence: 70, - date_updated: '2019-01-15T12:47:39.873000+00:00', - status_id: 'stat_123', - status_label: 'Active', - }, - organization_id: 'orga_123', - data: { - contact_name: 'Mr. Jones', - user_name: 'Joe Kemp', - value_period: 'one_time', - updated_by_name: 'Joe Kemp', - date_created: '2019-01-15T12:41:24.496000+00:00', - user_id: 'user_123', - updated_by: 'user_123', - value_currency: 'USD', + request: { + body: JSON.stringify({ + event: { + date_created: '2019-01-15T12:48:23.395000', + meta: { + request_method: 'PUT', + request_path: '/api/v1/opportunity/object_id/', + }, + id: 'ev_123', + action: 'updated', + date_updated: '2019-01-15T12:48:23.395000', + changed_fields: [ + 'confidence', + 'date_updated', + 'status_id', + 'status_label', + 'status_type', + ], + previous_data: { + status_type: 'active', + confidence: 70, + date_updated: '2019-01-15T12:47:39.873000+00:00', + status_id: 'stat_123', + status_label: 'Active', + }, organization_id: 'orga_123', - status_label: 'Won', - contact_id: 'cont_123', - status_type: 'won', - created_by_name: 'Joe Kemp', - id: 'id_12', - lead_name: 'KLine', - date_lost: null, - note: '', - date_updated: '2019-01-15T12:48:23.392000+00:00', - status_id: 'stat_12', - value: 100000, - created_by: 'user_123', - value_formatted: '$1,000', - date_won: '2019-01-15', + data: { + contact_name: 'Mr. Jones', + user_name: 'Joe Kemp', + value_period: 'one_time', + updated_by_name: 'Joe Kemp', + date_created: '2019-01-15T12:41:24.496000+00:00', + user_id: 'user_123', + updated_by: 'user_123', + value_currency: 'USD', + organization_id: 'orga_123', + status_label: 'Won', + contact_id: 'cont_123', + status_type: 'won', + created_by_name: 'Joe Kemp', + id: 'id_12', + lead_name: 'KLine', + date_lost: null, + note: '', + date_updated: '2019-01-15T12:48:23.392000+00:00', + status_id: 'stat_12', + value: 100000, + created_by: 'user_123', + value_formatted: '$1,000', + date_won: '2019-01-15', + lead_id: 'lead_123', + confidence: 100, + }, + request_id: 'req_123', + object_id: 'object_id', + user_id: 'user_123', + object_type: 'opportunity', lead_id: 'lead_123', - confidence: 100, }, - request_id: 'req_123', - object_id: 'object_id', - user_id: 'user_123', - object_type: 'opportunity', - lead_id: 'lead_123', - }, - subscription_id: 'whsub_123', + subscription_id: 'whsub_123', + }), }, source: {}, }, ], method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, + headers: { 'Content-Type': 'application/json' }, }, pathSuffix: '', }, @@ -93,17 +93,10 @@ export const data = [ batch: [ { context: { - library: { - name: 'unknown', - version: 'unknown', - }, - integration: { - name: 'CloseCRM', - }, - }, - integrations: { - CloseCRM: false, + library: { name: 'unknown', version: 'unknown' }, + integration: { name: 'CloseCRM' }, }, + integrations: { CloseCRM: false }, type: 'track', event: 'opportunity updated', messageId: 'ev_123', @@ -159,59 +152,52 @@ export const data = [ ], }, }, - mockFns: () => { - defaultMockFns(); - }, }, { name: 'close_crm', description: 'group creation', module: 'source', - version: 'v1', + version: 'v2', input: { request: { body: [ { - event: { - subscription_id: 'whsub_123', - event: { - id: 'ev_123', - date_created: '2024-06-13T03:53:33.917000', - date_updated: '2024-06-13T03:53:33.917000', - organization_id: 'orga_123', - user_id: 'user_123', - request_id: 'req_123', - api_key_id: null, - oauth_client_id: null, - oauth_scope: null, - object_type: 'group', - object_id: 'group_123', - lead_id: null, - action: 'created', - changed_fields: [], - meta: { - request_path: '/api/v1/graphql/', - request_method: 'POST', - }, - data: { - id: 'group_123', - name: 'Test group', - members: [ - { - user_id: 'user_123', - }, - ], + request: { + body: JSON.stringify({ + subscription_id: 'whsub_123', + event: { + id: 'ev_123', + date_created: '2024-06-13T03:53:33.917000', + date_updated: '2024-06-13T03:53:33.917000', + organization_id: 'orga_123', + user_id: 'user_123', + request_id: 'req_123', + api_key_id: null, + oauth_client_id: null, + oauth_scope: null, + object_type: 'group', + object_id: 'group_123', + lead_id: null, + action: 'created', + changed_fields: [], + meta: { + request_path: '/api/v1/graphql/', + request_method: 'POST', + }, + data: { + id: 'group_123', + name: 'Test group', + members: [{ user_id: 'user_123' }], + }, + previous_data: {}, }, - previous_data: {}, - }, + }), }, source: {}, }, ], method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, + headers: { 'Content-Type': 'application/json' }, }, pathSuffix: '', }, @@ -225,29 +211,18 @@ export const data = [ { anonymousId: '97fcd7b2-cc24-47d7-b776-057b7b199513', context: { - integration: { - name: 'CloseCRM', - }, - library: { - name: 'unknown', - version: 'unknown', - }, + integration: { name: 'CloseCRM' }, + library: { name: 'unknown', version: 'unknown' }, }, event: 'group created', - integrations: { - CloseCRM: false, - }, + integrations: { CloseCRM: false }, messageId: 'ev_123', originalTimestamp: '2024-06-ThT03:53:33.917+00:00', properties: { action: 'created', data: { id: 'group_123', - members: [ - { - user_id: 'user_123', - }, - ], + members: [{ user_id: 'user_123' }], name: 'Test group', }, date_created: '2024-06-13T03:53:33.917000', @@ -272,68 +247,65 @@ export const data = [ ], }, }, - mockFns: () => { - defaultMockFns(); - }, }, { name: 'close_crm', description: 'lead deletion', module: 'source', - version: 'v1', + version: 'v2', input: { request: { body: [ { - event: { - subscription_id: 'whsub_123', - event: { - id: 'ev_123', - date_created: '2024-06-14T05:16:04.138000', - date_updated: '2024-06-14T05:16:04.138000', - organization_id: 'orga_123', - user_id: 'user_123', - request_id: 'req_123', - api_key_id: 'api_123', - oauth_client_id: null, - oauth_scope: null, - object_type: 'lead', - object_id: 'lead_123', - lead_id: 'lead_123', - action: 'deleted', - changed_fields: [], - meta: { - request_path: '/api/v1/lead/lead_123/', - request_method: 'DELETE', - }, - data: {}, - previous_data: { - created_by_name: 'Rudder User', - addresses: [], - description: '', - url: null, - date_created: '2024-06-14T05:13:42.239000+00:00', - status_id: 'stat_123', - contact_ids: ['cont_123'], - id: 'lead_12', - date_updated: '2024-06-14T05:13:42.262000+00:00', - updated_by_name: 'Rudder User', - status_label: 'Potential', - name: 'test name', - display_name: 'test name', + request: { + body: JSON.stringify({ + subscription_id: 'whsub_123', + event: { + id: 'ev_123', + date_created: '2024-06-14T05:16:04.138000', + date_updated: '2024-06-14T05:16:04.138000', organization_id: 'orga_123', - updated_by: 'user_123', - created_by: 'user_123', + user_id: 'user_123', + request_id: 'req_123', + api_key_id: 'api_123', + oauth_client_id: null, + oauth_scope: null, + object_type: 'lead', + object_id: 'lead_123', + lead_id: 'lead_123', + action: 'deleted', + changed_fields: [], + meta: { + request_path: '/api/v1/lead/lead_123/', + request_method: 'DELETE', + }, + data: {}, + previous_data: { + created_by_name: 'Rudder User', + addresses: [], + description: '', + url: null, + date_created: '2024-06-14T05:13:42.239000+00:00', + status_id: 'stat_123', + contact_ids: ['cont_123'], + id: 'lead_12', + date_updated: '2024-06-14T05:13:42.262000+00:00', + updated_by_name: 'Rudder User', + status_label: 'Potential', + name: 'test name', + display_name: 'test name', + organization_id: 'orga_123', + updated_by: 'user_123', + created_by: 'user_123', + }, }, - }, + }), }, source: {}, }, ], method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, + headers: { 'Content-Type': 'application/json' }, }, pathSuffix: '', }, @@ -346,17 +318,10 @@ export const data = [ batch: [ { context: { - library: { - name: 'unknown', - version: 'unknown', - }, - integration: { - name: 'CloseCRM', - }, - }, - integrations: { - CloseCRM: false, + library: { name: 'unknown', version: 'unknown' }, + integration: { name: 'CloseCRM' }, }, + integrations: { CloseCRM: false }, type: 'track', event: 'lead deleted', userId: 'lead_123', @@ -388,8 +353,10 @@ export const data = [ ], }, }, - mockFns: () => { - defaultMockFns(); - }, }, -]; +].map((tc) => ({ + ...tc, + mockFns: () => { + defaultMockFns(); + }, +})); diff --git a/test/integrations/sources/cordial/data.ts b/test/integrations/sources/cordial/data.ts index acb02e9fbfc..4da265a9ca2 100644 --- a/test/integrations/sources/cordial/data.ts +++ b/test/integrations/sources/cordial/data.ts @@ -9,61 +9,59 @@ export const data = [ name: 'cordial', description: 'Simple Single object Input event with normal channel and action', module: 'source', - version: 'v1', + version: 'v2', input: { request: { body: [ { - event: { - contact: { - _id: '6690fe3655e334xx028xxx', - channels: { - email: { - address: 'jondoe@example.com', - subscribeStatus: 'subscribed', - subscribedAt: '2024-07-12T09:58:14+0000', + request: { + body: JSON.stringify({ + contact: { + _id: '6690fe3655e334xx028xxx', + channels: { + email: { + address: 'jondoe@example.com', + subscribeStatus: 'subscribed', + subscribedAt: '2024-07-12T09:58:14+0000', + }, }, + createdAt: '2024-07-12T09:58:14+0000', + address: { city: 'San Miego' }, + first_name: 'John', + last_name: 'Doe', + lastUpdateSource: 'api', + lastModified: '2024-07-12T13:00:49+0000', + cID: '6690fe3655e334xx028xxx', }, - createdAt: '2024-07-12T09:58:14+0000', - address: { - city: 'San Miego', - }, - first_name: 'John', - last_name: 'Doe', - lastUpdateSource: 'api', - lastModified: '2024-07-12T13:00:49+0000', - cID: '6690fe3655e334xx028xxx', - }, - event: { - _id: '669141857b8cxxx1ba0da2xx', - cID: '6690fe3655e334xx028xxx', - ts: '2024-07-12T14:45:25+00:00', - ats: '2024-07-12T14:45:25+0000', - a: 'browse', - tzo: -7, - rl: 'a', - UID: '4934ee07118197xx3f74d5xxxx7b0076', - time: '2024-07-12T14:45:25+0000', - action: 'browse', - bmID: '', - first: 0, - properties: { - category: 'Shirts', - url: 'http://example.com/shirts', - description: 'A really cool khaki shirt.', - price: 9.99, - title: 'Khaki Shirt', - test_key: 'value', + event: { + _id: '669141857b8cxxx1ba0da2xx', + cID: '6690fe3655e334xx028xxx', + ts: '2024-07-12T14:45:25+00:00', + ats: '2024-07-12T14:45:25+0000', + a: 'browse', + tzo: -7, + rl: 'a', + UID: '4934ee07118197xx3f74d5xxxx7b0076', + time: '2024-07-12T14:45:25+0000', + action: 'browse', + bmID: '', + first: 0, + properties: { + category: 'Shirts', + url: 'http://example.com/shirts', + description: 'A really cool khaki shirt.', + price: 9.99, + title: 'Khaki Shirt', + test_key: 'value', + }, }, - }, + }), }, source: {}, }, ], method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, + headers: { 'Content-Type': 'application/json' }, }, pathSuffix: '', }, @@ -76,13 +74,8 @@ export const data = [ batch: [ { context: { - library: { - name: 'unknown', - version: 'unknown', - }, - integration: { - name: 'Cordial', - }, + library: { name: 'unknown', version: 'unknown' }, + integration: { name: 'Cordial' }, traits: { userId: '6690fe3655e334xx028xxx', email: 'jondoe@example.com', @@ -95,20 +88,21 @@ export const data = [ }, }, createdAt: '2024-07-12T09:58:14+0000', - address: { - city: 'San Miego', - }, + address: { city: 'San Miego' }, first_name: 'John', last_name: 'Doe', lastUpdateSource: 'api', lastModified: '2024-07-12T13:00:49+0000', cID: '6690fe3655e334xx028xxx', }, - externalId: [{ id: '6690fe3655e334xx028xxx', type: 'cordialContactId' }], - }, - integrations: { - Cordial: false, + externalId: [ + { + id: '6690fe3655e334xx028xxx', + type: 'cordialContactId', + }, + ], }, + integrations: { Cordial: false }, type: 'track', event: 'browse', originalTimestamp: '2024-07-12T14:45:25+00:00', @@ -142,154 +136,147 @@ export const data = [ ], }, }, - mockFns: () => { - defaultMockFns(); - }, }, { name: 'cordial', description: 'Multiple object Input event with batched payload', module: 'source', - version: 'v1', + version: 'v2', input: { request: { body: [ { - event: [ - { - contact: { - _id: '633b2fd70a12be027e0b0xxx', - lang_locale: 'EN-US', - channels: { - email: { - address: 'johndoe@example.com', - subscribeStatus: 'none', + request: { + body: JSON.stringify([ + { + contact: { + _id: '633b2fd70a12be027e0b0xxx', + lang_locale: 'EN-US', + channels: { + email: { + address: 'johndoe@example.com', + subscribeStatus: 'none', + }, }, + createdAt: '2022-10-03T18:54:15+0000', + email_sha256_hash: + 'f959bdf883831ebb96612eb9xxxx1e0c9481780adf5f70xxx862155531bf61df', + first_name: 'john', + last_name: 'doe', + lastUpdateSource: 'cordial', + lastModified: '2024-07-24T07:52:46+0000', + cID: '633b2fd70a12be027e0b0xxx', }, - createdAt: '2022-10-03T18:54:15+0000', - email_sha256_hash: - 'f959bdf883831ebb96612eb9xxxx1e0c9481780adf5f70xxx862155531bf61df', - first_name: 'john', - last_name: 'doe', - lastUpdateSource: 'cordial', - lastModified: '2024-07-24T07:52:46+0000', - cID: '633b2fd70a12be027e0b0xxx', - }, - event: { - _id: '66a0b2ce5344b55fxxxc5a64', - cID: '633b2fd70a12be027e0b0xxx', - ts: '2024-07-24T07:52:46+00:00', - ats: '2024-07-24T07:52:39+0000', - g: { - countryISO: 'PL', - country: 'Poland', - state: 'MZ', - city: 'Warszawa', - postalCode: '00-686', - geoLoc: { - lat: 52.22744369506836, - lon: 21.009017944335938, + event: { + _id: '66a0b2ce5344b55fxxxc5a64', + cID: '633b2fd70a12be027e0b0xxx', + ts: '2024-07-24T07:52:46+00:00', + ats: '2024-07-24T07:52:39+0000', + g: { + countryISO: 'PL', + country: 'Poland', + state: 'MZ', + city: 'Warszawa', + postalCode: '00-686', + geoLoc: { + lat: 52.22744369506836, + lon: 21.009017944335938, + }, + tz: 'Europe/Warsaw', }, - tz: 'Europe/Warsaw', - }, - d: { - type: 'computer', - device: 'Macintosh', - platform: 'OS X', - browser: 'Chrome', - robot: false, - }, - a: 'browse', - UID: '471af949fffe749c2ebfxxx950ea73c', - sp: { - bid: 'cf6de7f1-cce5-40xx-ac9c-7c82a2xxc09e', - }, - tzo: -7, - rl: '6', - time: '2024-07-24T07:52:39+0000', - action: 'browse', - bmID: '', - first: 0, - properties: { - url: 'https://aaff-008.dx.commercecloud.salesforce.com/s/UGG-US/cart', - product_item_group_id: ['1094269'], - product_category: ['allproducts'], - product_name: ['wtp ab'], - product_group: ['women'], - }, - }, - }, - { - contact: { - _id: '633b2fd12312be027e0b0xxx', - lang_locale: 'EN-US', - channels: { - email: { - address: 'johndoe1@example.com', - subscribeStatus: 'none', + d: { + type: 'computer', + device: 'Macintosh', + platform: 'OS X', + browser: 'Chrome', + robot: false, + }, + a: 'browse', + UID: '471af949fffe749c2ebfxxx950ea73c', + sp: { bid: 'cf6de7f1-cce5-40xx-ac9c-7c82a2xxc09e' }, + tzo: -7, + rl: '6', + time: '2024-07-24T07:52:39+0000', + action: 'browse', + bmID: '', + first: 0, + properties: { + url: 'https://aaff-008.dx.commercecloud.salesforce.com/s/UGG-US/cart', + product_item_group_id: ['1094269'], + product_category: ['allproducts'], + product_name: ['wtp ab'], + product_group: ['women'], }, }, - createdAt: '2022-10-03T18:54:15+0000', - email_sha256_hash: - 'f95912b883831eab11612eb9xxxx1e0c9481780ad45770xxx862155531bf61df', - first_name: 'john', - last_name: 'doe', - lastUpdateSource: 'cordial', - lastModified: '2024-07-24T07:52:46+0000', - cID: '633b2fd12312be027e0b0xxx', }, - event: { - _id: '66aku0b2ce527b55fx1xc5a64', - cID: '633b2fd12312be027e0b0xxx', - ts: '2024-07-24T07:52:46+00:00', - ats: '2024-07-24T07:52:39+0000', - g: { - countryISO: 'PL', - country: 'Poland', - state: 'MZ', - city: 'Warszawa', - postalCode: '00-686', - geoLoc: { - lat: 52.22744369506836, - lon: 21.009017944335938, + { + contact: { + _id: '633b2fd12312be027e0b0xxx', + lang_locale: 'EN-US', + channels: { + email: { + address: 'johndoe1@example.com', + subscribeStatus: 'none', + }, }, - tz: 'Europe/Warsaw', - }, - d: { - type: 'computer', - device: 'Macintosh', - platform: 'OS X', - browser: 'Chrome', - robot: false, - }, - a: 'browse', - UID: '471af949fffe74sdh382ebfxxx950ea73c', - sp: { - bid: 'cf6de7f1-123ce5-20xx-ac9c-7c82a2xxc09e', + createdAt: '2022-10-03T18:54:15+0000', + email_sha256_hash: + 'f95912b883831eab11612eb9xxxx1e0c9481780ad45770xxx862155531bf61df', + first_name: 'john', + last_name: 'doe', + lastUpdateSource: 'cordial', + lastModified: '2024-07-24T07:52:46+0000', + cID: '633b2fd12312be027e0b0xxx', }, - tzo: -7, - rl: '6', - time: '2024-07-24T07:52:39+0000', - action: 'browse', - bmID: '', - first: 0, - properties: { - url: 'https://aaff-008.dx.commercecloud.salesforce.com/s/UGG-US/cart', - product_item_group_id: ['1094269'], - product_category: ['allproducts'], - product_name: ['wtp ab'], - product_group: ['women'], + event: { + _id: '66aku0b2ce527b55fx1xc5a64', + cID: '633b2fd12312be027e0b0xxx', + ts: '2024-07-24T07:52:46+00:00', + ats: '2024-07-24T07:52:39+0000', + g: { + countryISO: 'PL', + country: 'Poland', + state: 'MZ', + city: 'Warszawa', + postalCode: '00-686', + geoLoc: { + lat: 52.22744369506836, + lon: 21.009017944335938, + }, + tz: 'Europe/Warsaw', + }, + d: { + type: 'computer', + device: 'Macintosh', + platform: 'OS X', + browser: 'Chrome', + robot: false, + }, + a: 'browse', + UID: '471af949fffe74sdh382ebfxxx950ea73c', + sp: { bid: 'cf6de7f1-123ce5-20xx-ac9c-7c82a2xxc09e' }, + tzo: -7, + rl: '6', + time: '2024-07-24T07:52:39+0000', + action: 'browse', + bmID: '', + first: 0, + properties: { + url: 'https://aaff-008.dx.commercecloud.salesforce.com/s/UGG-US/cart', + product_item_group_id: ['1094269'], + product_category: ['allproducts'], + product_name: ['wtp ab'], + product_group: ['women'], + }, }, }, - }, - ], + ]), + }, source: {}, }, ], method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, + headers: { 'Content-Type': 'application/json' }, }, pathSuffix: '', }, @@ -302,13 +289,8 @@ export const data = [ batch: [ { context: { - library: { - name: 'unknown', - version: 'unknown', - }, - integration: { - name: 'Cordial', - }, + library: { name: 'unknown', version: 'unknown' }, + integration: { name: 'Cordial' }, traits: { userId: '633b2fd70a12be027e0b0xxx', email: 'johndoe@example.com', @@ -336,11 +318,14 @@ export const data = [ browser: 'Chrome', robot: false, }, - externalId: [{ id: '633b2fd70a12be027e0b0xxx', type: 'cordialContactId' }], - }, - integrations: { - Cordial: false, + externalId: [ + { + id: '633b2fd70a12be027e0b0xxx', + type: 'cordialContactId', + }, + ], }, + integrations: { Cordial: false }, type: 'track', event: 'browse', properties: { @@ -367,9 +352,7 @@ export const data = [ }, a: 'browse', UID: '471af949fffe749c2ebfxxx950ea73c', - sp: { - bid: 'cf6de7f1-cce5-40xx-ac9c-7c82a2xxc09e', - }, + sp: { bid: 'cf6de7f1-cce5-40xx-ac9c-7c82a2xxc09e' }, tzo: -7, rl: '6', time: '2024-07-24T07:52:39+0000', @@ -384,13 +367,8 @@ export const data = [ }, { context: { - library: { - name: 'unknown', - version: 'unknown', - }, - integration: { - name: 'Cordial', - }, + library: { name: 'unknown', version: 'unknown' }, + integration: { name: 'Cordial' }, traits: { userId: '633b2fd12312be027e0b0xxx', email: 'johndoe1@example.com', @@ -418,11 +396,14 @@ export const data = [ browser: 'Chrome', robot: false, }, - externalId: [{ id: '633b2fd12312be027e0b0xxx', type: 'cordialContactId' }], - }, - integrations: { - Cordial: false, + externalId: [ + { + id: '633b2fd12312be027e0b0xxx', + type: 'cordialContactId', + }, + ], }, + integrations: { Cordial: false }, type: 'track', event: 'browse', properties: { @@ -449,9 +430,7 @@ export const data = [ }, a: 'browse', UID: '471af949fffe74sdh382ebfxxx950ea73c', - sp: { - bid: 'cf6de7f1-123ce5-20xx-ac9c-7c82a2xxc09e', - }, + sp: { bid: 'cf6de7f1-123ce5-20xx-ac9c-7c82a2xxc09e' }, tzo: -7, rl: '6', time: '2024-07-24T07:52:39+0000', @@ -470,74 +449,69 @@ export const data = [ ], }, }, - mockFns: () => { - defaultMockFns(); - }, }, { name: 'cordial', description: 'Simple Single object Input event with no CId', module: 'source', - version: 'v1', + version: 'v2', input: { request: { body: [ { - event: { - contact: { - _id: '6690fe3655e334xx028xx1', - channels: { - email: { - address: 'jondoe@example.com', - subscribeStatus: 'subscribed', - subscribedAt: '2024-07-12T09:58:14+0000', + request: { + body: JSON.stringify({ + contact: { + _id: '6690fe3655e334xx028xx1', + channels: { + email: { + address: 'jondoe@example.com', + subscribeStatus: 'subscribed', + subscribedAt: '2024-07-12T09:58:14+0000', + }, }, + createdAt: '2024-07-12T09:58:14+0000', + address: { city: 'San Miego' }, + first_name: 'John', + last_name: 'Doe', + lastUpdateSource: 'api', + lastModified: '2024-07-12T13:00:49+0000', }, - createdAt: '2024-07-12T09:58:14+0000', - address: { - city: 'San Miego', - }, - first_name: 'John', - last_name: 'Doe', - lastUpdateSource: 'api', - lastModified: '2024-07-12T13:00:49+0000', - }, - event: { - _id: '669141857b8cxxx1ba0da2x1', - ts: '2024-07-12T14:45:25+00:00', - ats: '2024-07-12T14:45:25+0000', - d: { - type: 'computer', - device: false, - platform: false, - browser: false, - robot: true, - }, - a: 'browse', - tzo: -7, - rl: 'a', - UID: '4934ee07197xx3f74d5xxxx7b0076', - time: '2024-07-12T14:45:25+0000', - action: 'browse', - bmID: '', - first: 0, - properties: { - category: 'Shirts', - url: 'http://example.com/shirts', - description: 'A really cool khaki shirt.', - price: 9.99, - title: 'Khaki Shirt', - test_key: 'value', + event: { + _id: '669141857b8cxxx1ba0da2x1', + ts: '2024-07-12T14:45:25+00:00', + ats: '2024-07-12T14:45:25+0000', + d: { + type: 'computer', + device: false, + platform: false, + browser: false, + robot: true, + }, + a: 'browse', + tzo: -7, + rl: 'a', + UID: '4934ee07197xx3f74d5xxxx7b0076', + time: '2024-07-12T14:45:25+0000', + action: 'browse', + bmID: '', + first: 0, + properties: { + category: 'Shirts', + url: 'http://example.com/shirts', + description: 'A really cool khaki shirt.', + price: 9.99, + title: 'Khaki Shirt', + test_key: 'value', + }, }, - }, + }), }, source: {}, }, ], method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, + headers: { 'Content-Type': 'application/json' }, }, pathSuffix: '', }, @@ -550,13 +524,8 @@ export const data = [ batch: [ { context: { - library: { - name: 'unknown', - version: 'unknown', - }, - integration: { - name: 'Cordial', - }, + library: { name: 'unknown', version: 'unknown' }, + integration: { name: 'Cordial' }, traits: { userId: '6690fe3655e334xx028xx1', email: 'jondoe@example.com', @@ -569,9 +538,7 @@ export const data = [ }, }, createdAt: '2024-07-12T09:58:14+0000', - address: { - city: 'San Miego', - }, + address: { city: 'San Miego' }, first_name: 'John', last_name: 'Doe', lastUpdateSource: 'api', @@ -586,9 +553,7 @@ export const data = [ }, externalId: [], }, - integrations: { - Cordial: false, - }, + integrations: { Cordial: false }, type: 'track', event: 'browse', originalTimestamp: '2024-07-12T14:45:25+00:00', @@ -621,8 +586,10 @@ export const data = [ ], }, }, - mockFns: () => { - defaultMockFns(); - }, }, -]; +].map((tc) => ({ + ...tc, + mockFns: () => { + defaultMockFns(); + }, +})); diff --git a/test/integrations/sources/customerio/data.ts b/test/integrations/sources/customerio/data.ts index b831b1d0b07..ee4df648619 100644 --- a/test/integrations/sources/customerio/data.ts +++ b/test/integrations/sources/customerio/data.ts @@ -9,20 +9,25 @@ export const data = [ name: 'customerio', description: 'test-0', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - data: { - customer_id: '0200102', - identifiers: { id: '0200102' }, - email_address: 'test@example.com', + request: { + body: JSON.stringify({ + data: { + customer_id: '0200102', + identifiers: { id: '0200102' }, + email_address: 'test@example.com', + }, + event_id: '01E4C4CT6YDC7Y5M7FE1GWWPQJ', + object_type: 'customer', + metric: 'subscribed', + timestamp: 'abc', + }), }, - event_id: '01E4C4CT6YDC7Y5M7FE1GWWPQJ', - object_type: 'customer', - metric: 'subscribed', - timestamp: 'abc', + source: {}, }, ], method: 'POST', @@ -60,20 +65,25 @@ export const data = [ name: 'customerio', description: 'test-1', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - data: { - customer_id: '0200102', - identifiers: { id: '0200102' }, - email_address: 'test@example.com', + request: { + body: JSON.stringify({ + data: { + customer_id: '0200102', + identifiers: { id: '0200102' }, + email_address: 'test@example.com', + }, + event_id: '01E4C4CT6YDC7Y5M7FE1GWWPQJ', + object_type: 'customer', + metric: 'subscribed', + timestamp: '1585250199', + }), }, - event_id: '01E4C4CT6YDC7Y5M7FE1GWWPQJ', - object_type: 'customer', - metric: 'subscribed', - timestamp: '1585250199', + source: {}, }, ], method: 'POST', @@ -111,20 +121,25 @@ export const data = [ name: 'customerio', description: 'test-2', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - data: { - customer_id: '0200102', - identifiers: { id: '0200102' }, - email_address: 'test@example.com', + request: { + body: JSON.stringify({ + data: { + customer_id: '0200102', + identifiers: { id: '0200102' }, + email_address: 'test@example.com', + }, + event_id: '01E4C4CT6YDC7Y5M7FE1GWWPQJ', + object_type: 'customer', + metric: 'subscribed', + timestamp: 1585250199, + }), }, - event_id: '01E4C4CT6YDC7Y5M7FE1GWWPQJ', - object_type: 'customer', - metric: 'subscribed', - timestamp: 1585250199, + source: {}, }, ], method: 'POST', @@ -164,20 +179,25 @@ export const data = [ name: 'customerio', description: 'test-3', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - data: { - customer_id: '0200102', - identifiers: { id: '0200102' }, - email_address: 'test@example.com', + request: { + body: JSON.stringify({ + data: { + customer_id: '0200102', + identifiers: { id: '0200102' }, + email_address: 'test@example.com', + }, + event_id: '01E4C4C6P79C12J5A6KPE6XNFD', + object_type: 'customer', + metric: 'unsubscribed', + timestamp: 1585250179, + }), }, - event_id: '01E4C4C6P79C12J5A6KPE6XNFD', - object_type: 'customer', - metric: 'unsubscribed', - timestamp: 1585250179, + source: {}, }, ], method: 'POST', @@ -217,22 +237,27 @@ export const data = [ name: 'customerio', description: 'test-4', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - data: { - action_id: 36, - broadcast_id: 9, - customer_id: '0200102', - identifiers: { id: '0200102' }, - delivery_id: 'RPILAgABcRhIBqSp7kiPekGBIeVh', + request: { + body: JSON.stringify({ + data: { + action_id: 36, + broadcast_id: 9, + customer_id: '0200102', + identifiers: { id: '0200102' }, + delivery_id: 'RPILAgABcRhIBqSp7kiPekGBIeVh', + }, + event_id: '01E4C4G1S0AMNG0XVF2M7RPH5S', + object_type: 'email', + metric: 'drafted', + timestamp: 1585250305, + }), }, - event_id: '01E4C4G1S0AMNG0XVF2M7RPH5S', - object_type: 'email', - metric: 'drafted', - timestamp: 1585250305, + source: {}, }, ], method: 'POST', @@ -276,25 +301,30 @@ export const data = [ name: 'customerio', description: 'test-5', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - data: { - content_id: 1146, - customer_id: '0200102', - identifiers: { id: '0200102' }, - delivery_id: 'RMehBAAAAXE7r_ONUGXly9DBGkpq1JS31=', - failure_message: '550 5.5.0 Requested action not taken: mailbox unavailable', - newsletter_id: 736, - recipient: 'test@example.com', - subject: 'Thanks for joining!', + request: { + body: JSON.stringify({ + data: { + content_id: 1146, + customer_id: '0200102', + identifiers: { id: '0200102' }, + delivery_id: 'RMehBAAAAXE7r_ONUGXly9DBGkpq1JS31=', + failure_message: '550 5.5.0 Requested action not taken: mailbox unavailable', + newsletter_id: 736, + recipient: 'test@example.com', + subject: 'Thanks for joining!', + }, + event_id: '12ASDG7S9P6MAZPTJ78DAND9GDC', + object_type: 'email', + metric: 'bounced', + timestamp: 1234567890, + }), }, - event_id: '12ASDG7S9P6MAZPTJ78DAND9GDC', - object_type: 'email', - metric: 'bounced', - timestamp: 1234567890, + source: {}, }, ], method: 'POST', @@ -341,26 +371,31 @@ export const data = [ name: 'customerio', description: 'test-6', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - data: { - action_id: 36, - broadcast_id: 9, - customer_id: '0200102', - identifiers: { id: '0200102' }, - delivery_id: 'RPILAgABcRhIBqSp7kiPekGBIeVh', - href: 'http://google.com', - link_id: 1, - recipient: 'test@example.com', - subject: 'hello', + request: { + body: JSON.stringify({ + data: { + action_id: 36, + broadcast_id: 9, + customer_id: '0200102', + identifiers: { id: '0200102' }, + delivery_id: 'RPILAgABcRhIBqSp7kiPekGBIeVh', + href: 'http://google.com', + link_id: 1, + recipient: 'test@example.com', + subject: 'hello', + }, + event_id: '01E4C8BES5XT87ZWRJFTB35YJ3', + object_type: 'email', + metric: 'clicked', + timestamp: 1585254348, + }), }, - event_id: '01E4C8BES5XT87ZWRJFTB35YJ3', - object_type: 'email', - metric: 'clicked', - timestamp: 1585254348, + source: {}, }, ], method: 'POST', @@ -407,26 +442,31 @@ export const data = [ name: 'customerio', description: 'test-7', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - data: { - action_id: 42, - campaign_id: 23, - content: 'Welcome to the club, we are with you.', - customer_id: 'user-123', - delivery_id: 'RAECAAFwnUSneIa0ZXkmq8EdkAM==', - headers: { 'Custom-Header': ['custom-value'] }, - identifiers: { id: 'user-123' }, - recipient: 'test@example.com', - subject: 'Thanks for signing up', + request: { + body: JSON.stringify({ + data: { + action_id: 42, + campaign_id: 23, + content: 'Welcome to the club, we are with you.', + customer_id: 'user-123', + delivery_id: 'RAECAAFwnUSneIa0ZXkmq8EdkAM==', + headers: { 'Custom-Header': ['custom-value'] }, + identifiers: { id: 'user-123' }, + recipient: 'test@example.com', + subject: 'Thanks for signing up', + }, + event_id: '01E2EMRMM6TZ12TF9WGZN0WJQT', + metric: 'sent', + object_type: 'email', + timestamp: 1644227937, + }), }, - event_id: '01E2EMRMM6TZ12TF9WGZN0WJQT', - metric: 'sent', - object_type: 'email', - timestamp: 1644227937, + source: {}, }, ], method: 'POST', @@ -473,23 +513,28 @@ export const data = [ name: 'customerio', description: 'test-8', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - data: { - customer_id: 'user-123', - delivery_id: 'REAC4wUAAYYJgQgkyRqwwEPeOA6Nfv==', - identifiers: { cio_id: '7ef807109981', id: 'user-123' }, - recipient: 'test@example.com', - subject: 'Thanks for signing up', - transactional_message_id: 2, + request: { + body: JSON.stringify({ + data: { + customer_id: 'user-123', + delivery_id: 'REAC4wUAAYYJgQgkyRqwwEPeOA6Nfv==', + identifiers: { cio_id: '7ef807109981', id: 'user-123' }, + recipient: 'test@example.com', + subject: 'Thanks for signing up', + transactional_message_id: 2, + }, + event_id: '01ER4R5WB62QWCNREKFB4DYXGR', + metric: 'delivered', + object_type: 'email', + timestamp: 1675196819, + }), }, - event_id: '01ER4R5WB62QWCNREKFB4DYXGR', - metric: 'delivered', - object_type: 'email', - timestamp: 1675196819, + source: {}, }, ], method: 'POST', @@ -508,7 +553,10 @@ export const data = [ context: { library: { name: 'unknown', version: 'unknown' }, integration: { name: 'Customer.io' }, - traits: { cioId: '7ef807109981', email: 'test@example.com' }, + traits: { + cioId: '7ef807109981', + email: 'test@example.com', + }, }, integrations: { 'Customer.io': false }, type: 'track', @@ -534,23 +582,28 @@ export const data = [ name: 'customerio', description: 'test-9', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - data: { - action_id: 38, - campaign_id: 6, - customer_id: '0200102', - identifiers: { id: '0200102' }, - delivery_id: 'RAEABQFxN56fWzydfV4_EGvfobI=', - failure_message: 'NoDevicesSynced', + request: { + body: JSON.stringify({ + data: { + action_id: 38, + campaign_id: 6, + customer_id: '0200102', + identifiers: { id: '0200102' }, + delivery_id: 'RAEABQFxN56fWzydfV4_EGvfobI=', + failure_message: 'NoDevicesSynced', + }, + event_id: '01E4VSX8SZ0T9AQMH4Q16NRB89', + object_type: 'push', + metric: 'attempted', + timestamp: 1585776075, + }), }, - event_id: '01E4VSX8SZ0T9AQMH4Q16NRB89', - object_type: 'push', - metric: 'attempted', - timestamp: 1585776075, + source: {}, }, ], method: 'POST', @@ -595,29 +648,34 @@ export const data = [ name: 'customerio', description: 'test-10', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - data: { - action_id: 37, - broadcast_id: 9, - customer_id: '0200102', - identifiers: { id: '0200102' }, - delivery_id: 'RPILAgUBcRhIBqSfeiIwdIYJKxTY', - recipients: [ - { - device_id: - 'eeC2XC_NVPo:APA91bEYRSgmu-dAZcOWi7RzKBbT9gdY3WJACOpLQEMAmAOsChJMAZWirvSlSF3EuHxb7qdwlYeOyCWtbsnR14Vyx5nwBmg5J3SyPxfNn-ey1tNgXIj5UOq8IBk2VwzMApk-xzD4JJof', - device_platform: 'android', + request: { + body: JSON.stringify({ + data: { + action_id: 37, + broadcast_id: 9, + customer_id: '0200102', + identifiers: { id: '0200102' }, + delivery_id: 'RPILAgUBcRhIBqSfeiIwdIYJKxTY', + recipients: [ + { + device_id: + 'eeC2XC_NVPo:APA91bEYRSgmu-dAZcOWi7RzKBbT9gdY3WJACOpLQEMAmAOsChJMAZWirvSlSF3EuHxb7qdwlYeOyCWtbsnR14Vyx5nwBmg5J3SyPxfNn-ey1tNgXIj5UOq8IBk2VwzMApk-xzD4JJof', + device_platform: 'android', + }, + ], }, - ], + event_id: '01E4C4HDQ7P1X9KTKF0ZX7PWHE', + object_type: 'push', + metric: 'sent', + timestamp: 1585250350, + }), }, - event_id: '01E4C4HDQ7P1X9KTKF0ZX7PWHE', - object_type: 'push', - metric: 'sent', - timestamp: 1585250350, + source: {}, }, ], method: 'POST', @@ -668,30 +726,35 @@ export const data = [ name: 'customerio', description: 'test-11', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - data: { - action_id: 37, - broadcast_id: 9, - customer_id: '0200102', - identifiers: { id: '0200102' }, - delivery_id: 'RPILAgUBcRhIBqSfeiIwdIYJKxTY', - href: 'ciosas://product/2', - link_id: 1, - recipients: [ - { - device_id: - 'eeC2XC_NVPo:APA91bEYRSgmu-dAZcOWi7RzKBbT9gdY3WJACOpLQEMAmAOsChJMAZWirvSlSF3EuHxb7qdwlYeOyCWtbsnR14Vyx5nwBmg5J3SyPxfNn-ey1tNgXIj5UOq8IBk2VwzMApk-xzD4JJof', + request: { + body: JSON.stringify({ + data: { + action_id: 37, + broadcast_id: 9, + customer_id: '0200102', + identifiers: { id: '0200102' }, + delivery_id: 'RPILAgUBcRhIBqSfeiIwdIYJKxTY', + href: 'ciosas://product/2', + link_id: 1, + recipients: [ + { + device_id: + 'eeC2XC_NVPo:APA91bEYRSgmu-dAZcOWi7RzKBbT9gdY3WJACOpLQEMAmAOsChJMAZWirvSlSF3EuHxb7qdwlYeOyCWtbsnR14Vyx5nwBmg5J3SyPxfNn-ey1tNgXIj5UOq8IBk2VwzMApk-xzD4JJof', + }, + ], }, - ], + event_id: '01E4V2SBHYK4TNTG8WKMP39G9R', + object_type: 'push', + metric: 'clicked', + timestamp: 1585751829, + }), }, - event_id: '01E4V2SBHYK4TNTG8WKMP39G9R', - object_type: 'push', - metric: 'clicked', - timestamp: 1585751829, + source: {}, }, ], method: 'POST', @@ -742,24 +805,29 @@ export const data = [ name: 'customerio', description: 'test-12', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - data: { - action_id: 41, - campaign_id: 7, - customer_id: '0200102', - identifiers: { id: '0200102' }, - delivery_id: 'ROk1AAIBcR4iT6mueuxiDtzO8HXv', - failure_message: - "Twilio Error 21408: Permission to send an SMS has not been enabled for the region indicated by the 'To' number: +18008675309.", + request: { + body: JSON.stringify({ + data: { + action_id: 41, + campaign_id: 7, + customer_id: '0200102', + identifiers: { id: '0200102' }, + delivery_id: 'ROk1AAIBcR4iT6mueuxiDtzO8HXv', + failure_message: + "Twilio Error 21408: Permission to send an SMS has not been enabled for the region indicated by the 'To' number: +18008675309.", + }, + event_id: '01E4F3DCS83P8HT7R3E6DWQN1X', + object_type: 'sms', + metric: 'attempted', + timestamp: 1234567890, + }), }, - event_id: '01E4F3DCS83P8HT7R3E6DWQN1X', - object_type: 'sms', - metric: 'attempted', - timestamp: 1234567890, + source: {}, }, ], method: 'POST', @@ -805,25 +873,30 @@ export const data = [ name: 'customerio', description: 'test-13', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - data: { - action_id: 38, - broadcast_id: 9, - customer_id: '0200102', - identifiers: { id: '0200102' }, - delivery_id: 'RPILAgIBcRh6qzHz-8gKvscP2UZa', - href: 'https://app.com/verify', - link_id: 1, - recipient: '+18008675309', + request: { + body: JSON.stringify({ + data: { + action_id: 38, + broadcast_id: 9, + customer_id: '0200102', + identifiers: { id: '0200102' }, + delivery_id: 'RPILAgIBcRh6qzHz-8gKvscP2UZa', + href: 'https://app.com/verify', + link_id: 1, + recipient: '+18008675309', + }, + event_id: '01E4XXPN42JDF4B1ATQKTZ8WHV', + object_type: 'sms', + metric: 'clicked', + timestamp: 1585847161, + }), }, - event_id: '01E4XXPN42JDF4B1ATQKTZ8WHV', - object_type: 'sms', - metric: 'clicked', - timestamp: 1585847161, + source: {}, }, ], method: 'POST', @@ -869,23 +942,28 @@ export const data = [ name: 'customerio', description: 'test-14', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - data: { - action_id: 39, - broadcast_id: 9, - customer_id: '0200102', - identifiers: { id: '0200102' }, - delivery_id: 'RPILAgQBcRhNAufb0s30bmz5HD7Y', - recipient: '#signups', + request: { + body: JSON.stringify({ + data: { + action_id: 39, + broadcast_id: 9, + customer_id: '0200102', + identifiers: { id: '0200102' }, + delivery_id: 'RPILAgQBcRhNAufb0s30bmz5HD7Y', + recipient: '#signups', + }, + event_id: '01E4C4TQKD6KJ274870J5DE2HB', + object_type: 'slack', + metric: 'sent', + timestamp: 1585250655, + }), }, - event_id: '01E4C4TQKD6KJ274870J5DE2HB', - object_type: 'slack', - metric: 'sent', - timestamp: 1585250655, + source: {}, }, ], method: 'POST', @@ -930,25 +1008,30 @@ export const data = [ name: 'customerio', description: 'test-15', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - data: { - action_id: 39, - broadcast_id: 9, - customer_id: '0200102', - identifiers: { id: '0200102' }, - delivery_id: 'RPILAgQBcRhocpCJE3mFfwvRzNe6', - href: 'http://bing.com', - link_id: 1, - recipient: '#signups', + request: { + body: JSON.stringify({ + data: { + action_id: 39, + broadcast_id: 9, + customer_id: '0200102', + identifiers: { id: '0200102' }, + delivery_id: 'RPILAgQBcRhocpCJE3mFfwvRzNe6', + href: 'http://bing.com', + link_id: 1, + recipient: '#signups', + }, + event_id: '01E4C6HJTBNDX18XC4B88M3Y2G', + object_type: 'slack', + metric: 'clicked', + timestamp: 1585252451, + }), }, - event_id: '01E4C6HJTBNDX18XC4B88M3Y2G', - object_type: 'slack', - metric: 'clicked', - timestamp: 1585252451, + source: {}, }, ], method: 'POST', @@ -994,23 +1077,28 @@ export const data = [ name: 'customerio', description: 'test-16', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - data: { - action_id: 39, - broadcast_id: 9, - customer_id: '0200102', - identifiers: { id: '0200102' }, - delivery_id: 'RPILAgQBcRhIBqRiZAc0fyQiLvkC', - failure_message: 'value passed for channel was invalid', + request: { + body: JSON.stringify({ + data: { + action_id: 39, + broadcast_id: 9, + customer_id: '0200102', + identifiers: { id: '0200102' }, + delivery_id: 'RPILAgQBcRhIBqRiZAc0fyQiLvkC', + failure_message: 'value passed for channel was invalid', + }, + event_id: '01E4C4HDQ77BCN0X23Z3WBE764', + object_type: 'slack', + metric: 'failed', + timestamp: 1585250350, + }), }, - event_id: '01E4C4HDQ77BCN0X23Z3WBE764', - object_type: 'slack', - metric: 'failed', - timestamp: 1585250350, + source: {}, }, ], method: 'POST', @@ -1055,22 +1143,27 @@ export const data = [ name: 'customerio', description: 'test-17', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - data: { - action_id: 40, - broadcast_id: 9, - customer_id: '0200102', - identifiers: { id: '0200102' }, - delivery_id: 'RPILAgEBcRhIBqSrYcXDr2ks6Pj9', + request: { + body: JSON.stringify({ + data: { + action_id: 40, + broadcast_id: 9, + customer_id: '0200102', + identifiers: { id: '0200102' }, + delivery_id: 'RPILAgEBcRhIBqSrYcXDr2ks6Pj9', + }, + event_id: '01E4C4G1S04QCV1NASF4NWMQNR', + object_type: 'webhook', + metric: 'drafted', + timestamp: 1585250305, + }), }, - event_id: '01E4C4G1S04QCV1NASF4NWMQNR', - object_type: 'webhook', - metric: 'drafted', - timestamp: 1585250305, + source: {}, }, ], method: 'POST', @@ -1114,23 +1207,28 @@ export const data = [ name: 'customerio', description: 'test-18', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - data: { - action_id: 38, - broadcast_id: 6, - customer_id: '0200102', - identifiers: { id: '0200102' }, - delivery_id: 'RAECAQFxNeUBx6LqgjqrN1j-BJc=', - failure_message: "Variable 'customer.test' is missing", + request: { + body: JSON.stringify({ + data: { + action_id: 38, + broadcast_id: 6, + customer_id: '0200102', + identifiers: { id: '0200102' }, + delivery_id: 'RAECAQFxNeUBx6LqgjqrN1j-BJc=', + failure_message: "Variable 'customer.test' is missing", + }, + event_id: '01E4TYA2KA9T0XGHCRJ784B774', + object_type: 'webhook', + metric: 'attempted', + timestamp: 1585747134, + }), }, - event_id: '01E4TYA2KA9T0XGHCRJ784B774', - object_type: 'webhook', - metric: 'attempted', - timestamp: 1585747134, + source: {}, }, ], method: 'POST', @@ -1175,23 +1273,28 @@ export const data = [ name: 'customerio', description: 'test-19', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - data: { - action_id: 40, - broadcast_id: 9, - customer_id: '0200102', - identifiers: { id: '0200102' }, - delivery_id: 'RPILAgEBcRhNAufr2aU82jtDZEh6', - recipient: 'https://test.example.com/process', + request: { + body: JSON.stringify({ + data: { + action_id: 40, + broadcast_id: 9, + customer_id: '0200102', + identifiers: { id: '0200102' }, + delivery_id: 'RPILAgEBcRhNAufr2aU82jtDZEh6', + recipient: 'https://test.example.com/process', + }, + event_id: '01E4C6EP0HCKRHKFARMZ5XEH7A', + object_type: 'webhook', + metric: 'sent', + timestamp: 1585252357, + }), }, - event_id: '01E4C6EP0HCKRHKFARMZ5XEH7A', - object_type: 'webhook', - metric: 'sent', - timestamp: 1585252357, + source: {}, }, ], method: 'POST', @@ -1236,25 +1339,30 @@ export const data = [ name: 'customerio', description: 'test-20', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - data: { - action_id: 40, - broadcast_id: 9, - customer_id: '0200102', - identifiers: { id: '0200102' }, - delivery_id: 'RPILAgEBcRhNAufr2aU82jtDZEh6', - href: 'http://bing.com', - link_id: 1, - recipient: 'https://test.example.com/process', + request: { + body: JSON.stringify({ + data: { + action_id: 40, + broadcast_id: 9, + customer_id: '0200102', + identifiers: { id: '0200102' }, + delivery_id: 'RPILAgEBcRhNAufr2aU82jtDZEh6', + href: 'http://bing.com', + link_id: 1, + recipient: 'https://test.example.com/process', + }, + event_id: '01E4C6F5N1Y54TVGJTN64Y1ZS9', + object_type: 'webhook', + metric: 'clicked', + timestamp: 1585252373, + }), }, - event_id: '01E4C6F5N1Y54TVGJTN64Y1ZS9', - object_type: 'webhook', - metric: 'clicked', - timestamp: 1585252373, + source: {}, }, ], method: 'POST', @@ -1300,23 +1408,28 @@ export const data = [ name: 'customerio', description: 'test-21', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - data: { - action_id: 38, - broadcast_id: 6, - customer_id: '0200102', - identifiers: { id: '0200102' }, - delivery_id: 'RAECAQFxNeK3bC4SYqhQqFGBQrQ=', - failure_message: 'HTTP 404 Not Found []', + request: { + body: JSON.stringify({ + data: { + action_id: 38, + broadcast_id: 6, + customer_id: '0200102', + identifiers: { id: '0200102' }, + delivery_id: 'RAECAQFxNeK3bC4SYqhQqFGBQrQ=', + failure_message: 'HTTP 404 Not Found []', + }, + event_id: '01E4TY5FVB0ZQ4KVDKRME0XSYZ', + object_type: 'webhook', + metric: 'failed', + timestamp: 1585746984, + }), }, - event_id: '01E4TY5FVB0ZQ4KVDKRME0XSYZ', - object_type: 'webhook', - metric: 'failed', - timestamp: 1585746984, + source: {}, }, ], method: 'POST', @@ -1361,30 +1474,35 @@ export const data = [ name: 'customerio', description: 'test-22', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - data: { - action_id: 37, - broadcast_id: 9, - customer_id: '0200102', - identifiers: { id: '0200102' }, - delivery_id: 'RPILAgUBcRhIBqSfeiIwdIYJKxTY', - href: 'ciosas://product/2', - link_id: 1, - recipients: [ - { - device_id: - 'eeC2XC_NVPo:APA91bEYRSgmu-dAZcOWi7RzKBbT9gdY3WJACOpLQEMAmAOsChJMAZWirvSlSF3EuHxb7qdwlYeOyCWtbsnR14Vyx5nwBmg5J3SyPxfNn-ey1tNgXIj5UOq8IBk2VwzMApk-xzD4JJof', + request: { + body: JSON.stringify({ + data: { + action_id: 37, + broadcast_id: 9, + customer_id: '0200102', + identifiers: { id: '0200102' }, + delivery_id: 'RPILAgUBcRhIBqSfeiIwdIYJKxTY', + href: 'ciosas://product/2', + link_id: 1, + recipients: [ + { + device_id: + 'eeC2XC_NVPo:APA91bEYRSgmu-dAZcOWi7RzKBbT9gdY3WJACOpLQEMAmAOsChJMAZWirvSlSF3EuHxb7qdwlYeOyCWtbsnR14Vyx5nwBmg5J3SyPxfNn-ey1tNgXIj5UOq8IBk2VwzMApk-xzD4JJof', + }, + ], }, - ], + event_id: '01E4V2SBHYK4TNTG8WKMP39G9S', + object_type: 'push', + metric: 'delivered', + timestamp: 1585751830, + }), }, - event_id: '01E4V2SBHYK4TNTG8WKMP39G9S', - object_type: 'push', - metric: 'delivered', - timestamp: 1585751830, + source: {}, }, ], method: 'POST', @@ -1435,20 +1553,25 @@ export const data = [ name: 'customerio', description: 'test-23: email subscribed', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - data: { - customer_id: '0200102', - identifiers: { id: '0200102' }, - email_address: 'test@example.com', + request: { + body: JSON.stringify({ + data: { + customer_id: '0200102', + identifiers: { id: '0200102' }, + email_address: 'test@example.com', + }, + event_id: '01E4C4C6P79C12J5A6KPE6XNFD', + object_type: 'email', + metric: 'subscribed', + timestamp: 1585250179, + }), }, - event_id: '01E4C4C6P79C12J5A6KPE6XNFD', - object_type: 'email', - metric: 'subscribed', - timestamp: 1585250179, + source: {}, }, ], method: 'POST', diff --git a/test/integrations/sources/formsort/data.ts b/test/integrations/sources/formsort/data.ts index ef275f6c1c4..854ba8a72e5 100644 --- a/test/integrations/sources/formsort/data.ts +++ b/test/integrations/sources/formsort/data.ts @@ -3,23 +3,28 @@ export const data = [ name: 'formsort', description: 'when we receive finalized as false', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - answers: { - yes: true, - enter_email: 'test@user.com', - enter_name: '2022-11-17', - yes_or_no: false, + request: { + body: JSON.stringify({ + answers: { + yes: true, + enter_email: 'test@user.com', + enter_name: '2022-11-17', + yes_or_no: false, + }, + responder_uuid: '66a8e5bb-67e1-47ec-b55f-a26fd4be2dc7', + flow_label: 'new-flow-2022-11-25', + variant_label: 'main', + variant_uuid: '0828efa7-7215-4e7d-a7ab-6c1079010cea', + finalized: false, + created_at: '2022-11-25T14:41:22+00:00', + }), }, - responder_uuid: '66a8e5bb-67e1-47ec-b55f-a26fd4be2dc7', - flow_label: 'new-flow-2022-11-25', - variant_label: 'main', - variant_uuid: '0828efa7-7215-4e7d-a7ab-6c1079010cea', - finalized: false, - created_at: '2022-11-25T14:41:22+00:00', + source: {}, }, ], method: 'POST', @@ -65,23 +70,28 @@ export const data = [ name: 'formsort', description: 'when we receive finalized as true', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - answers: { - yes: true, - enter_email: 'test@user.com', - enter_name: '2022-11-17', - yes_or_no: false, + request: { + body: JSON.stringify({ + answers: { + yes: true, + enter_email: 'test@user.com', + enter_name: '2022-11-17', + yes_or_no: false, + }, + responder_uuid: '66a8e5bb-67e1-47ec-b55f-a26fd4be2dc7', + flow_label: 'new-flow-2022-11-25', + variant_label: 'main', + variant_uuid: '0828efa7-7215-4e7d-a7ab-6c1079010cea', + finalized: true, + created_at: '2022-11-25T14:41:22+00:00', + }), }, - responder_uuid: '66a8e5bb-67e1-47ec-b55f-a26fd4be2dc7', - flow_label: 'new-flow-2022-11-25', - variant_label: 'main', - variant_uuid: '0828efa7-7215-4e7d-a7ab-6c1079010cea', - finalized: true, - created_at: '2022-11-25T14:41:22+00:00', + source: {}, }, ], method: 'POST', diff --git a/test/integrations/sources/gainsightpx/data.ts b/test/integrations/sources/gainsightpx/data.ts index b3e3147ea9c..6f3bd56ee4a 100644 --- a/test/integrations/sources/gainsightpx/data.ts +++ b/test/integrations/sources/gainsightpx/data.ts @@ -3,95 +3,100 @@ export const data = [ name: 'gainsightpx', description: 'Identify Call', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - user: { - aptrinsicId: 'cab9c469-8602-4933-acdb-68338fbb9ab1', - identifyId: 'New!', - type: 'USER', - gender: 'EMPTY_GENDER', - email: 'userEmail@address.com', - firstName: 'test', - lastName: 'rudderlabs', - lastSeenDate: 1665582808669, - signUpDate: 1665582791753, - firstVisitDate: 1665582791753, - title: 'Mr.', - phone: '', - score: 0, - role: '', - subscriptionId: '', - accountId: 'IBM', - numberOfVisits: 1, - location: { - countryName: 'India', - countryCode: '', - stateName: '', - stateCode: '', - city: '', - street: '', - postalCode: '', - continent: '', - regionName: '', - timeZone: '', - coordinates: { latitude: 0, longitude: 0 }, - }, - propertyKeys: ['AP-EOXPSEZGC5LA-2-1'], - createDate: 1665582808376, - lastModifiedDate: 1665582808717, - customAttributes: null, - globalUnsubscribe: false, - sfdcContactId: '', - lastVisitedUserAgentData: null, - id: 'New!', - lastInferredLocation: null, - }, - account: { - id: 'IBM', - name: 'International Business Machine', - trackedSubscriptionId: '', - sfdcId: '', - lastSeenDate: 1665582808669, - dunsNumber: '', - industry: '', - numberOfEmployees: 0, - sicCode: '', - website: '', - naicsCode: '', - plan: '', - location: { - countryName: '', - countryCode: '', - stateName: '', - stateCode: '', - city: '', - street: '', - postalCode: '', - continent: '', - regionName: '', - timeZone: '', - coordinates: { latitude: 0, longitude: 0 }, - }, - numberOfUsers: 0, - propertyKeys: ['AP-EOXPSEZGC5LA-2-1'], - createDate: 1665578567565, - lastModifiedDate: 1665582808669, - customAttributes: null, - parentGroupId: '', - }, - event: { - eventType: 'SIGN_UP', - eventId: '1283c08b-f290-4bc4-9deb-75c7867d69ee', - propertyKey: 'AP-EOXPSEZGC5LA-2-1', - date: 1665582808376, - sessionId: 'AP-EOXPSEZGC5LA-2-1665582441084-16821368', - globalContext: {}, - userType: 'USER', + request: { + body: JSON.stringify({ + user: { + aptrinsicId: 'cab9c469-8602-4933-acdb-68338fbb9ab1', + identifyId: 'New!', + type: 'USER', + gender: 'EMPTY_GENDER', + email: 'userEmail@address.com', + firstName: 'test', + lastName: 'rudderlabs', + lastSeenDate: 1665582808669, + signUpDate: 1665582791753, + firstVisitDate: 1665582791753, + title: 'Mr.', + phone: '', + score: 0, + role: '', + subscriptionId: '', + accountId: 'IBM', + numberOfVisits: 1, + location: { + countryName: 'India', + countryCode: '', + stateName: '', + stateCode: '', + city: '', + street: '', + postalCode: '', + continent: '', + regionName: '', + timeZone: '', + coordinates: { latitude: 0, longitude: 0 }, + }, + propertyKeys: ['AP-EOXPSEZGC5LA-2-1'], + createDate: 1665582808376, + lastModifiedDate: 1665582808717, + customAttributes: null, + globalUnsubscribe: false, + sfdcContactId: '', + lastVisitedUserAgentData: null, + id: 'New!', + lastInferredLocation: null, + }, + account: { + id: 'IBM', + name: 'International Business Machine', + trackedSubscriptionId: '', + sfdcId: '', + lastSeenDate: 1665582808669, + dunsNumber: '', + industry: '', + numberOfEmployees: 0, + sicCode: '', + website: '', + naicsCode: '', + plan: '', + location: { + countryName: '', + countryCode: '', + stateName: '', + stateCode: '', + city: '', + street: '', + postalCode: '', + continent: '', + regionName: '', + timeZone: '', + coordinates: { latitude: 0, longitude: 0 }, + }, + numberOfUsers: 0, + propertyKeys: ['AP-EOXPSEZGC5LA-2-1'], + createDate: 1665578567565, + lastModifiedDate: 1665582808669, + customAttributes: null, + parentGroupId: '', + }, + event: { + eventType: 'SIGN_UP', + eventId: '1283c08b-f290-4bc4-9deb-75c7867d69ee', + propertyKey: 'AP-EOXPSEZGC5LA-2-1', + date: 1665582808376, + sessionId: 'AP-EOXPSEZGC5LA-2-1665582441084-16821368', + globalContext: {}, + userType: 'USER', + }, + configId: '32f07727-d231-4c9d-881e-fb50b80bad63', + }), }, - configId: '32f07727-d231-4c9d-881e-fb50b80bad63', + source: {}, }, ], method: 'POST', @@ -155,105 +160,110 @@ export const data = [ name: 'gainsightpx', description: 'Custom Track Call ', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - user: { - aptrinsicId: 'cab9c469-8602-4933-acdb-68338fbb9ab1', - identifyId: 'New!', - type: 'USER', - gender: 'EMPTY_GENDER', - email: 'userEmail@address.com', - firstName: 'test', - lastName: 'rudderlabs', - lastSeenDate: 1665582808669, - signUpDate: 1665582791753, - firstVisitDate: 1665582791753, - title: 'Mr.', - phone: '', - score: 0, - role: '', - subscriptionId: '', - accountId: 'IBM', - numberOfVisits: 1, - location: { - countryName: 'India', - countryCode: '', - stateName: '', - stateCode: '', - city: '', - street: '', - postalCode: '', - continent: '', - regionName: '', - timeZone: '', - coordinates: { latitude: 0, longitude: 0 }, - }, - propertyKeys: ['AP-EOXPSEZGC5LA-2-1'], - createDate: 1665582808376, - lastModifiedDate: 1665582808717, - customAttributes: null, - globalUnsubscribe: false, - sfdcContactId: '', - lastVisitedUserAgentData: null, - id: 'New!', - lastInferredLocation: null, - }, - account: { - id: 'IBM', - name: 'International Business Machine', - trackedSubscriptionId: '', - sfdcId: '', - lastSeenDate: 1665582808669, - dunsNumber: '', - industry: '', - numberOfEmployees: 0, - sicCode: '', - website: '', - naicsCode: '', - plan: '', - location: { - countryName: '', - countryCode: '', - stateName: '', - stateCode: '', - city: '', - street: '', - postalCode: '', - continent: '', - regionName: '', - timeZone: '', - coordinates: { latitude: 0, longitude: 0 }, - }, - numberOfUsers: 0, - propertyKeys: ['AP-EOXPSEZGC5LA-2-1'], - createDate: 1665578567565, - lastModifiedDate: 1665582808669, - customAttributes: null, - parentGroupId: '', - }, - event: { - eventType: 'CUSTOM', - eventId: 'df58cbd6-2736-4f8a-ad26-6049eac2e150', - propertyKey: 'AP-EOXPSEZGC5LA-2-1', - date: 1665656881448, - sessionId: 'AP-EOXPSEZGC5LA-2-1665656622955-48127533', - globalContext: {}, - userType: 'USER', - eventName: 'Product Clicked', - attributes: { - 'Audience Size': 5000, - name: 'TESTing TRACK CALL FIRST', - 'Launched date': 1520532660000, - Launched: true, - }, - url: 'http://127.0.0.1:5501/GPXTEST2.html', - referrer: '', - remoteHost: '122.161.66.140', + request: { + body: JSON.stringify({ + user: { + aptrinsicId: 'cab9c469-8602-4933-acdb-68338fbb9ab1', + identifyId: 'New!', + type: 'USER', + gender: 'EMPTY_GENDER', + email: 'userEmail@address.com', + firstName: 'test', + lastName: 'rudderlabs', + lastSeenDate: 1665582808669, + signUpDate: 1665582791753, + firstVisitDate: 1665582791753, + title: 'Mr.', + phone: '', + score: 0, + role: '', + subscriptionId: '', + accountId: 'IBM', + numberOfVisits: 1, + location: { + countryName: 'India', + countryCode: '', + stateName: '', + stateCode: '', + city: '', + street: '', + postalCode: '', + continent: '', + regionName: '', + timeZone: '', + coordinates: { latitude: 0, longitude: 0 }, + }, + propertyKeys: ['AP-EOXPSEZGC5LA-2-1'], + createDate: 1665582808376, + lastModifiedDate: 1665582808717, + customAttributes: null, + globalUnsubscribe: false, + sfdcContactId: '', + lastVisitedUserAgentData: null, + id: 'New!', + lastInferredLocation: null, + }, + account: { + id: 'IBM', + name: 'International Business Machine', + trackedSubscriptionId: '', + sfdcId: '', + lastSeenDate: 1665582808669, + dunsNumber: '', + industry: '', + numberOfEmployees: 0, + sicCode: '', + website: '', + naicsCode: '', + plan: '', + location: { + countryName: '', + countryCode: '', + stateName: '', + stateCode: '', + city: '', + street: '', + postalCode: '', + continent: '', + regionName: '', + timeZone: '', + coordinates: { latitude: 0, longitude: 0 }, + }, + numberOfUsers: 0, + propertyKeys: ['AP-EOXPSEZGC5LA-2-1'], + createDate: 1665578567565, + lastModifiedDate: 1665582808669, + customAttributes: null, + parentGroupId: '', + }, + event: { + eventType: 'CUSTOM', + eventId: 'df58cbd6-2736-4f8a-ad26-6049eac2e150', + propertyKey: 'AP-EOXPSEZGC5LA-2-1', + date: 1665656881448, + sessionId: 'AP-EOXPSEZGC5LA-2-1665656622955-48127533', + globalContext: {}, + userType: 'USER', + eventName: 'Product Clicked', + attributes: { + 'Audience Size': 5000, + name: 'TESTing TRACK CALL FIRST', + 'Launched date': 1520532660000, + Launched: true, + }, + url: 'http://127.0.0.1:5501/GPXTEST2.html', + referrer: '', + remoteHost: '122.161.66.140', + }, + configId: '32f07727-d231-4c9d-881e-fb50b80bad63', + }), }, - configId: '32f07727-d231-4c9d-881e-fb50b80bad63', + source: {}, }, ], method: 'POST', @@ -329,101 +339,106 @@ export const data = [ name: 'gainsightpx', description: 'Feedback Track Call ', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - user: { - aptrinsicId: 'cab9c469-8602-4933-acdb-68338fbb9ab1', - identifyId: 'New!', - type: 'USER', - gender: 'EMPTY_GENDER', - email: 'userEmail@address.com', - firstName: 'test', - lastName: 'rudderlabs', - lastSeenDate: 1665582808669, - signUpDate: 1665582791753, - firstVisitDate: 1665582791753, - title: 'Mr.', - phone: '', - score: 0, - role: '', - subscriptionId: '', - accountId: 'IBM', - numberOfVisits: 1, - location: { - countryName: 'India', - countryCode: '', - stateName: '', - stateCode: '', - city: '', - street: '', - postalCode: '', - continent: '', - regionName: '', - timeZone: '', - coordinates: { latitude: 0, longitude: 0 }, - }, - propertyKeys: ['AP-EOXPSEZGC5LA-2-1'], - createDate: 1665582808376, - lastModifiedDate: 1665582808717, - customAttributes: null, - globalUnsubscribe: false, - sfdcContactId: '', - lastVisitedUserAgentData: null, - id: 'New!', - lastInferredLocation: null, - }, - account: { - id: 'IBM', - name: 'International Business Machine', - trackedSubscriptionId: '', - sfdcId: '', - lastSeenDate: 1665582808669, - dunsNumber: '', - industry: '', - numberOfEmployees: 0, - sicCode: '', - website: '', - naicsCode: '', - plan: '', - location: { - countryName: '', - countryCode: '', - stateName: '', - stateCode: '', - city: '', - street: '', - postalCode: '', - continent: '', - regionName: '', - timeZone: '', - coordinates: { latitude: 0, longitude: 0 }, - }, - numberOfUsers: 0, - propertyKeys: ['AP-EOXPSEZGC5LA-2-1'], - createDate: 1665578567565, - lastModifiedDate: 1665582808669, - customAttributes: null, - parentGroupId: '', - }, - event: { - eventType: 'FEEDBACK', - eventId: 'd007bd76-decb-4a77-8456-d84fb15c6a83', - propertyKey: 'AP-E9VUBBLZ6BIS-2-1', - date: 1665415753621, - sessionId: 'AP-E9VUBBLZ6BIS-2-1665415678379-45445457', - globalContext: null, - userType: 'USER', - subject: 'feedback title', - category: 'Labels test', - description: 'feedback body', - labels: ['492120f5-3573-11ec-bef0-42010a800545'], - remoteHost: '122.161.66.140', - source: 'Knowledge Center Bot', + request: { + body: JSON.stringify({ + user: { + aptrinsicId: 'cab9c469-8602-4933-acdb-68338fbb9ab1', + identifyId: 'New!', + type: 'USER', + gender: 'EMPTY_GENDER', + email: 'userEmail@address.com', + firstName: 'test', + lastName: 'rudderlabs', + lastSeenDate: 1665582808669, + signUpDate: 1665582791753, + firstVisitDate: 1665582791753, + title: 'Mr.', + phone: '', + score: 0, + role: '', + subscriptionId: '', + accountId: 'IBM', + numberOfVisits: 1, + location: { + countryName: 'India', + countryCode: '', + stateName: '', + stateCode: '', + city: '', + street: '', + postalCode: '', + continent: '', + regionName: '', + timeZone: '', + coordinates: { latitude: 0, longitude: 0 }, + }, + propertyKeys: ['AP-EOXPSEZGC5LA-2-1'], + createDate: 1665582808376, + lastModifiedDate: 1665582808717, + customAttributes: null, + globalUnsubscribe: false, + sfdcContactId: '', + lastVisitedUserAgentData: null, + id: 'New!', + lastInferredLocation: null, + }, + account: { + id: 'IBM', + name: 'International Business Machine', + trackedSubscriptionId: '', + sfdcId: '', + lastSeenDate: 1665582808669, + dunsNumber: '', + industry: '', + numberOfEmployees: 0, + sicCode: '', + website: '', + naicsCode: '', + plan: '', + location: { + countryName: '', + countryCode: '', + stateName: '', + stateCode: '', + city: '', + street: '', + postalCode: '', + continent: '', + regionName: '', + timeZone: '', + coordinates: { latitude: 0, longitude: 0 }, + }, + numberOfUsers: 0, + propertyKeys: ['AP-EOXPSEZGC5LA-2-1'], + createDate: 1665578567565, + lastModifiedDate: 1665582808669, + customAttributes: null, + parentGroupId: '', + }, + event: { + eventType: 'FEEDBACK', + eventId: 'd007bd76-decb-4a77-8456-d84fb15c6a83', + propertyKey: 'AP-E9VUBBLZ6BIS-2-1', + date: 1665415753621, + sessionId: 'AP-E9VUBBLZ6BIS-2-1665415678379-45445457', + globalContext: null, + userType: 'USER', + subject: 'feedback title', + category: 'Labels test', + description: 'feedback body', + labels: ['492120f5-3573-11ec-bef0-42010a800545'], + remoteHost: '122.161.66.140', + source: 'Knowledge Center Bot', + }, + configId: '32f07727-d231-4c9d-881e-fb50b80bad63', + }), }, - configId: '32f07727-d231-4c9d-881e-fb50b80bad63', + source: {}, }, ], method: 'POST', @@ -500,96 +515,102 @@ export const data = [ name: 'gainsightpx', description: 'Feature Match Track Call ', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - user: { - aptrinsicId: 'cab9c469-8602-4933-acdb-68338fbb9ab1', - identifyId: 'New!', - type: 'USER', - gender: 'EMPTY_GENDER', - email: 'userEmail@address.com', - firstName: 'test', - lastName: 'rudderlabs', - lastSeenDate: 1665582808669, - signUpDate: 1665582791753, - firstVisitDate: 1665582791753, - title: 'Mr.', - phone: '', - score: 0, - role: '', - subscriptionId: '', - accountId: 'IBM', - numberOfVisits: 1, - location: { - countryName: 'India', - countryCode: '', - stateName: '', - stateCode: '', - city: '', - street: '', - postalCode: '', - continent: '', - regionName: '', - timeZone: '', - coordinates: { latitude: 0, longitude: 0 }, - }, - propertyKeys: ['AP-EOXPSEZGC5LA-2-1'], - createDate: 1665582808376, - lastModifiedDate: 1665582808717, - customAttributes: null, - globalUnsubscribe: false, - sfdcContactId: '', - lastVisitedUserAgentData: null, - id: 'New!', - lastInferredLocation: null, - }, - account: { - id: 'IBM', - name: 'International Business Machine', - trackedSubscriptionId: '', - sfdcId: '', - lastSeenDate: 1665582808669, - dunsNumber: '', - industry: '', - numberOfEmployees: 0, - sicCode: '', - website: '', - naicsCode: '', - plan: '', - location: { - countryName: '', - countryCode: '', - stateName: '', - stateCode: '', - city: '', - street: '', - postalCode: '', - continent: '', - regionName: '', - timeZone: '', - coordinates: { latitude: 0, longitude: 0 }, - }, - numberOfUsers: 0, - propertyKeys: ['AP-EOXPSEZGC5LA-2-1'], - createDate: 1665578567565, - lastModifiedDate: 1665582808669, - customAttributes: null, - parentGroupId: '', - }, - event: { - eventType: 'FEATURE_MATCH', - eventId: 'ae1e5538-1736-4088-86d1-e90a10ffe901-05951b40-944f-4052-9a4a-51c74683f658', - propertyKey: 'AP-8MF5LPSWUBFW-2-1', - date: 1665582808376, - sessionId: 'AP-8MF5LPSWUBFW-2-1601303023809-98881162', - globalContext: { role: 'Admin' }, - userType: 'USER', - featureId: '05951b40-944f-4052-9a4a-51c74683f658', - featureName: 'Charts', + request: { + body: JSON.stringify({ + user: { + aptrinsicId: 'cab9c469-8602-4933-acdb-68338fbb9ab1', + identifyId: 'New!', + type: 'USER', + gender: 'EMPTY_GENDER', + email: 'userEmail@address.com', + firstName: 'test', + lastName: 'rudderlabs', + lastSeenDate: 1665582808669, + signUpDate: 1665582791753, + firstVisitDate: 1665582791753, + title: 'Mr.', + phone: '', + score: 0, + role: '', + subscriptionId: '', + accountId: 'IBM', + numberOfVisits: 1, + location: { + countryName: 'India', + countryCode: '', + stateName: '', + stateCode: '', + city: '', + street: '', + postalCode: '', + continent: '', + regionName: '', + timeZone: '', + coordinates: { latitude: 0, longitude: 0 }, + }, + propertyKeys: ['AP-EOXPSEZGC5LA-2-1'], + createDate: 1665582808376, + lastModifiedDate: 1665582808717, + customAttributes: null, + globalUnsubscribe: false, + sfdcContactId: '', + lastVisitedUserAgentData: null, + id: 'New!', + lastInferredLocation: null, + }, + account: { + id: 'IBM', + name: 'International Business Machine', + trackedSubscriptionId: '', + sfdcId: '', + lastSeenDate: 1665582808669, + dunsNumber: '', + industry: '', + numberOfEmployees: 0, + sicCode: '', + website: '', + naicsCode: '', + plan: '', + location: { + countryName: '', + countryCode: '', + stateName: '', + stateCode: '', + city: '', + street: '', + postalCode: '', + continent: '', + regionName: '', + timeZone: '', + coordinates: { latitude: 0, longitude: 0 }, + }, + numberOfUsers: 0, + propertyKeys: ['AP-EOXPSEZGC5LA-2-1'], + createDate: 1665578567565, + lastModifiedDate: 1665582808669, + customAttributes: null, + parentGroupId: '', + }, + event: { + eventType: 'FEATURE_MATCH', + eventId: + 'ae1e5538-1736-4088-86d1-e90a10ffe901-05951b40-944f-4052-9a4a-51c74683f658', + propertyKey: 'AP-8MF5LPSWUBFW-2-1', + date: 1665582808376, + sessionId: 'AP-8MF5LPSWUBFW-2-1601303023809-98881162', + globalContext: { role: 'Admin' }, + userType: 'USER', + featureId: '05951b40-944f-4052-9a4a-51c74683f658', + featureName: 'Charts', + }, + }), }, + source: {}, }, ], method: 'POST', @@ -660,95 +681,100 @@ export const data = [ name: 'gainsightpx', description: 'Segment Match Track Call and no userId and yes anonymousId as event.sessionId', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - user: { - aptrinsicId: 'cab9c469-8602-4933-acdb-68338fbb9ab1', - type: 'USER', - gender: 'EMPTY_GENDER', - email: 'userEmail@address.com', - firstName: 'test', - lastName: 'rudderlabs', - lastSeenDate: 1665582808669, - signUpDate: 1665582791753, - firstVisitDate: 1665582791753, - title: 'Mr.', - phone: '', - score: 0, - role: '', - subscriptionId: '', - accountId: 'IBM', - numberOfVisits: 1, - location: { - countryName: 'India', - countryCode: '', - stateName: '', - stateCode: '', - city: '', - street: '', - postalCode: '', - continent: '', - regionName: '', - timeZone: '', - coordinates: { latitude: 0, longitude: 0 }, - }, - propertyKeys: ['AP-EOXPSEZGC5LA-2-1'], - createDate: 1665582808376, - lastModifiedDate: 1665582808717, - customAttributes: null, - globalUnsubscribe: false, - sfdcContactId: '', - lastVisitedUserAgentData: null, - id: 'New!', - lastInferredLocation: null, - }, - account: { - id: 'IBM', - name: 'International Business Machine', - trackedSubscriptionId: '', - sfdcId: '', - lastSeenDate: 1665582808669, - dunsNumber: '', - industry: '', - numberOfEmployees: 0, - sicCode: '', - website: '', - naicsCode: '', - plan: '', - location: { - countryName: '', - countryCode: '', - stateName: '', - stateCode: '', - city: '', - street: '', - postalCode: '', - continent: '', - regionName: '', - timeZone: '', - coordinates: { latitude: 0, longitude: 0 }, - }, - numberOfUsers: 0, - propertyKeys: ['AP-EOXPSEZGC5LA-2-1'], - createDate: 1665578567565, - lastModifiedDate: 1665582808669, - customAttributes: null, - parentGroupId: '', - }, - event: { - eventType: 'SEGMENT', - eventId: 'ddb9ca94-beb1-449c-bdcd-b53190f8e784', - propertyKey: 'AP-8MF5LPSWUBFW-2-1', - date: 1665582808376, - sessionId: 'AP-8MF5LPSWUBFW-2-1601303023809-98881162', - globalContext: { role: 'Admin' }, - userType: 'USER', - segmentId: 'e3ab2e48-24f9-4602-ab92-b9f1f4343845', - segmentName: 'Linux User', + request: { + body: JSON.stringify({ + user: { + aptrinsicId: 'cab9c469-8602-4933-acdb-68338fbb9ab1', + type: 'USER', + gender: 'EMPTY_GENDER', + email: 'userEmail@address.com', + firstName: 'test', + lastName: 'rudderlabs', + lastSeenDate: 1665582808669, + signUpDate: 1665582791753, + firstVisitDate: 1665582791753, + title: 'Mr.', + phone: '', + score: 0, + role: '', + subscriptionId: '', + accountId: 'IBM', + numberOfVisits: 1, + location: { + countryName: 'India', + countryCode: '', + stateName: '', + stateCode: '', + city: '', + street: '', + postalCode: '', + continent: '', + regionName: '', + timeZone: '', + coordinates: { latitude: 0, longitude: 0 }, + }, + propertyKeys: ['AP-EOXPSEZGC5LA-2-1'], + createDate: 1665582808376, + lastModifiedDate: 1665582808717, + customAttributes: null, + globalUnsubscribe: false, + sfdcContactId: '', + lastVisitedUserAgentData: null, + id: 'New!', + lastInferredLocation: null, + }, + account: { + id: 'IBM', + name: 'International Business Machine', + trackedSubscriptionId: '', + sfdcId: '', + lastSeenDate: 1665582808669, + dunsNumber: '', + industry: '', + numberOfEmployees: 0, + sicCode: '', + website: '', + naicsCode: '', + plan: '', + location: { + countryName: '', + countryCode: '', + stateName: '', + stateCode: '', + city: '', + street: '', + postalCode: '', + continent: '', + regionName: '', + timeZone: '', + coordinates: { latitude: 0, longitude: 0 }, + }, + numberOfUsers: 0, + propertyKeys: ['AP-EOXPSEZGC5LA-2-1'], + createDate: 1665578567565, + lastModifiedDate: 1665582808669, + customAttributes: null, + parentGroupId: '', + }, + event: { + eventType: 'SEGMENT', + eventId: 'ddb9ca94-beb1-449c-bdcd-b53190f8e784', + propertyKey: 'AP-8MF5LPSWUBFW-2-1', + date: 1665582808376, + sessionId: 'AP-8MF5LPSWUBFW-2-1601303023809-98881162', + globalContext: { role: 'Admin' }, + userType: 'USER', + segmentId: 'e3ab2e48-24f9-4602-ab92-b9f1f4343845', + segmentName: 'Linux User', + }, + }), }, + source: {}, }, ], method: 'POST', @@ -819,22 +845,27 @@ export const data = [ name: 'gainsightpx', description: 'No Match Track Call ', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - event: { - eventType: 'Unavailable', - eventId: 'ddb9ca94-beb1-449c-bdcd-b53190f8e784', - propertyKey: 'AP-8MF5LPSWUBFW-2-1', - date: 1601303075964, - sessionId: 'AP-8MF5LPSWUBFW-2-1601303023809-98881162', - globalContext: { role: 'Admin' }, - userType: 'USER', - segmentId: 'e3ab2e48-24f9-4602-ab92-b9f1f4343845', - segmentName: 'Linux User', + request: { + body: JSON.stringify({ + event: { + eventType: 'Unavailable', + eventId: 'ddb9ca94-beb1-449c-bdcd-b53190f8e784', + propertyKey: 'AP-8MF5LPSWUBFW-2-1', + date: 1601303075964, + sessionId: 'AP-8MF5LPSWUBFW-2-1601303023809-98881162', + globalContext: { role: 'Admin' }, + userType: 'USER', + segmentId: 'e3ab2e48-24f9-4602-ab92-b9f1f4343845', + segmentName: 'Linux User', + }, + }), }, + source: {}, }, ], method: 'POST', @@ -866,115 +897,120 @@ export const data = [ name: 'gainsightpx', description: 'Survey Track Call -> Multi Question Survey ', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - user: { - aptrinsicId: 'cab9c469-8602-4933-acdb-68338fbb9ab1', - identifyId: 'New!', - type: 'USER', - gender: 'EMPTY_GENDER', - email: 'userEmail@address.com', - firstName: 'test', - lastName: 'rudderlabs', - lastSeenDate: 1665582808669, - signUpDate: 1665582791753, - firstVisitDate: 1665582791753, - title: 'Mr.', - phone: '', - score: 0, - role: '', - subscriptionId: '', - accountId: 'IBM', - numberOfVisits: 1, - location: { - countryName: 'India', - countryCode: '', - stateName: '', - stateCode: '', - city: '', - street: '', - postalCode: '', - continent: '', - regionName: '', - timeZone: '', - coordinates: { latitude: 0, longitude: 0 }, - }, - propertyKeys: ['AP-EOXPSEZGC5LA-2-1'], - createDate: 1665582808376, - lastModifiedDate: 1665582808717, - customAttributes: null, - globalUnsubscribe: false, - sfdcContactId: '', - lastVisitedUserAgentData: null, - id: 'New!', - lastInferredLocation: null, - }, - account: { - id: 'IBM', - name: 'International Business Machine', - trackedSubscriptionId: '', - sfdcId: '', - lastSeenDate: 1665582808669, - dunsNumber: '', - industry: '', - numberOfEmployees: 0, - sicCode: '', - website: '', - naicsCode: '', - plan: '', - location: { - countryName: '', - countryCode: '', - stateName: '', - stateCode: '', - city: '', - street: '', - postalCode: '', - continent: '', - regionName: '', - timeZone: '', - coordinates: { latitude: 0, longitude: 0 }, - }, - numberOfUsers: 0, - propertyKeys: ['AP-EOXPSEZGC5LA-2-1'], - createDate: 1665578567565, - lastModifiedDate: 1665582808669, - customAttributes: null, - parentGroupId: '', - }, - event: { - eventType: 'SURVEY', - eventId: 'c9883e3b-05d4-4f96-8b9c-e2ce10430493', - propertyKey: 'AP-N6SV00EVMR1E-2-1', - date: 1601303075964, - sessionId: 'AP-N6SV00EVMR1E-2-1605265939566-23853426', - globalContext: { role: 'Admin' }, - userType: 'EMPTY_USER_TYPE', - contentType: 'IN_APP_MULTIPLE_QUESTION_SURVEY', - engagementId: 'e5362226-75da-4ef6-999a-823727e3d7a7', - engagementName: 'Quarterly Survey', - surveyType: 'Multi Question', - interaction: 'SINGLE_STEP_SURVEY_RESPONDED', - score: 0, - activation: 'Auto', - executionId: '1ad2d383-d1fa-425d-84f0-2a531e17a5d9', - executionDate: 1605265939965, - questionType: 'Multi choice', - questionId: 'de9e6bf1-351c-46ec-907d-c985bd420c2b', - questionHtml: - '
Favorite travel destinations
', - questionText: 'Favorite travel destinations', - answers: [ - { - answerId: '563e2103-2906-4088-869f-bcccd185f288', - answerHtml: '
Europe
', - answerText: 'Europe', + request: { + body: JSON.stringify({ + user: { + aptrinsicId: 'cab9c469-8602-4933-acdb-68338fbb9ab1', + identifyId: 'New!', + type: 'USER', + gender: 'EMPTY_GENDER', + email: 'userEmail@address.com', + firstName: 'test', + lastName: 'rudderlabs', + lastSeenDate: 1665582808669, + signUpDate: 1665582791753, + firstVisitDate: 1665582791753, + title: 'Mr.', + phone: '', + score: 0, + role: '', + subscriptionId: '', + accountId: 'IBM', + numberOfVisits: 1, + location: { + countryName: 'India', + countryCode: '', + stateName: '', + stateCode: '', + city: '', + street: '', + postalCode: '', + continent: '', + regionName: '', + timeZone: '', + coordinates: { latitude: 0, longitude: 0 }, + }, + propertyKeys: ['AP-EOXPSEZGC5LA-2-1'], + createDate: 1665582808376, + lastModifiedDate: 1665582808717, + customAttributes: null, + globalUnsubscribe: false, + sfdcContactId: '', + lastVisitedUserAgentData: null, + id: 'New!', + lastInferredLocation: null, }, - ], + account: { + id: 'IBM', + name: 'International Business Machine', + trackedSubscriptionId: '', + sfdcId: '', + lastSeenDate: 1665582808669, + dunsNumber: '', + industry: '', + numberOfEmployees: 0, + sicCode: '', + website: '', + naicsCode: '', + plan: '', + location: { + countryName: '', + countryCode: '', + stateName: '', + stateCode: '', + city: '', + street: '', + postalCode: '', + continent: '', + regionName: '', + timeZone: '', + coordinates: { latitude: 0, longitude: 0 }, + }, + numberOfUsers: 0, + propertyKeys: ['AP-EOXPSEZGC5LA-2-1'], + createDate: 1665578567565, + lastModifiedDate: 1665582808669, + customAttributes: null, + parentGroupId: '', + }, + event: { + eventType: 'SURVEY', + eventId: 'c9883e3b-05d4-4f96-8b9c-e2ce10430493', + propertyKey: 'AP-N6SV00EVMR1E-2-1', + date: 1601303075964, + sessionId: 'AP-N6SV00EVMR1E-2-1605265939566-23853426', + globalContext: { role: 'Admin' }, + userType: 'EMPTY_USER_TYPE', + contentType: 'IN_APP_MULTIPLE_QUESTION_SURVEY', + engagementId: 'e5362226-75da-4ef6-999a-823727e3d7a7', + engagementName: 'Quarterly Survey', + surveyType: 'Multi Question', + interaction: 'SINGLE_STEP_SURVEY_RESPONDED', + score: 0, + activation: 'Auto', + executionId: '1ad2d383-d1fa-425d-84f0-2a531e17a5d9', + executionDate: 1605265939965, + questionType: 'Multi choice', + questionId: 'de9e6bf1-351c-46ec-907d-c985bd420c2b', + questionHtml: + '
Favorite travel destinations
', + questionText: 'Favorite travel destinations', + answers: [ + { + answerId: '563e2103-2906-4088-869f-bcccd185f288', + answerHtml: '
Europe
', + answerText: 'Europe', + }, + ], + }, + }), }, + source: {}, }, ], method: 'POST', @@ -1064,110 +1100,119 @@ export const data = [ name: 'gainsightpx', description: 'Survey Track Call -> NPS ', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - user: { - aptrinsicId: 'cab9c469-8602-4933-acdb-68338fbb9ab1', - identifyId: 'New!', - type: 'USER', - gender: 'EMPTY_GENDER', - email: 'userEmail@address.com', - firstName: 'test', - lastName: 'rudderlabs', - lastSeenDate: 1665582808669, - signUpDate: 1665582791753, - firstVisitDate: 1665582791753, - title: 'Mr.', - phone: '', - score: 0, - role: '', - subscriptionId: '', - accountId: 'IBM', - numberOfVisits: 1, - location: { - countryName: 'India', - countryCode: '', - stateName: '', - stateCode: '', - city: '', - street: '', - postalCode: '', - continent: '', - regionName: '', - timeZone: '', - coordinates: { latitude: 0, longitude: 0 }, - }, - propertyKeys: ['AP-EOXPSEZGC5LA-2-1'], - createDate: 1665582808376, - lastModifiedDate: 1665582808717, - customAttributes: null, - globalUnsubscribe: false, - sfdcContactId: '', - lastVisitedUserAgentData: null, - id: 'New!', - lastInferredLocation: null, - }, - account: { - id: 'IBM', - name: 'International Business Machine', - trackedSubscriptionId: '', - sfdcId: '', - lastSeenDate: 1665582808669, - dunsNumber: '', - industry: '', - numberOfEmployees: 0, - sicCode: '', - website: '', - naicsCode: '', - plan: '', - location: { - countryName: '', - countryCode: '', - stateName: '', - stateCode: '', - city: '', - street: '', - postalCode: '', - continent: '', - regionName: '', - timeZone: '', - coordinates: { latitude: 0, longitude: 0 }, - }, - numberOfUsers: 0, - propertyKeys: ['AP-EOXPSEZGC5LA-2-1'], - createDate: 1665578567565, - lastModifiedDate: 1665582808669, - customAttributes: null, - parentGroupId: '', - }, - event: { - eventType: 'SURVEY', - eventId: 'c9883e3b-05d4-4f96-8b9c-e2ce10430493', - propertyKey: 'AP-N6SV00EVMR1E-2-1', - date: 1601303075964, - sessionId: 'AP-N6SV00EVMR1E-2-1605265939566-23853426', - globalContext: { role: 'Admin' }, - userType: 'EMPTY_USER_TYPE', - contentType: 'IN_APP_MULTIPLE_QUESTION_SURVEY', - engagementId: 'e5362226-75da-4ef6-999a-823727e3d7a7', - engagementName: 'Quarterly Survey', - surveyType: 'Multi Question', - interaction: 'SINGLE_STEP_SURVEY_RESPONDED', - score: 0, - scoreType: null, - stepNumber: null, - userInput: 'I like new features', - activation: 'Auto', - executionId: '1ad2d383-d1fa-425d-84f0-2a531e17a5d9', - executionDate: 1605265939965, - questionType: 'Open text question', - questionHtml: - '
\n
\n How was your experience?\n
\n
\n', - questionText: 'How was your experience?', + request: { + body: JSON.stringify({ + user: { + aptrinsicId: 'cab9c469-8602-4933-acdb-68338fbb9ab1', + identifyId: 'New!', + type: 'USER', + gender: 'EMPTY_GENDER', + email: 'userEmail@address.com', + firstName: 'test', + lastName: 'rudderlabs', + lastSeenDate: 1665582808669, + signUpDate: 1665582791753, + firstVisitDate: 1665582791753, + title: 'Mr.', + phone: '', + score: 0, + role: '', + subscriptionId: '', + accountId: 'IBM', + numberOfVisits: 1, + location: { + countryName: 'India', + countryCode: '', + stateName: '', + stateCode: '', + city: '', + street: '', + postalCode: '', + continent: '', + regionName: '', + timeZone: '', + coordinates: { latitude: 0, longitude: 0 }, + }, + propertyKeys: ['AP-EOXPSEZGC5LA-2-1'], + createDate: 1665582808376, + lastModifiedDate: 1665582808717, + customAttributes: null, + globalUnsubscribe: false, + sfdcContactId: '', + lastVisitedUserAgentData: null, + id: 'New!', + lastInferredLocation: null, + }, + account: { + id: 'IBM', + name: 'International Business Machine', + trackedSubscriptionId: '', + sfdcId: '', + lastSeenDate: 1665582808669, + dunsNumber: '', + industry: '', + numberOfEmployees: 0, + sicCode: '', + website: '', + naicsCode: '', + plan: '', + location: { + countryName: '', + countryCode: '', + stateName: '', + stateCode: '', + city: '', + street: '', + postalCode: '', + continent: '', + regionName: '', + timeZone: '', + coordinates: { latitude: 0, longitude: 0 }, + }, + numberOfUsers: 0, + propertyKeys: ['AP-EOXPSEZGC5LA-2-1'], + createDate: 1665578567565, + lastModifiedDate: 1665582808669, + customAttributes: null, + parentGroupId: '', + }, + event: { + eventType: 'SURVEY', + eventId: 'c9883e3b-05d4-4f96-8b9c-e2ce10430493', + propertyKey: 'AP-N6SV00EVMR1E-2-1', + date: 1601303075964, + sessionId: 'AP-N6SV00EVMR1E-2-1605265939566-23853426', + globalContext: { role: 'Admin' }, + userType: 'EMPTY_USER_TYPE', + contentType: 'IN_APP_MULTIPLE_QUESTION_SURVEY', + engagementId: 'e5362226-75da-4ef6-999a-823727e3d7a7', + engagementName: 'Quarterly Survey', + surveyType: 'Multi Question', + interaction: 'SINGLE_STEP_SURVEY_RESPONDED', + score: 0, + scoreType: null, + stepNumber: null, + userInput: 'I like new features', + activation: 'Auto', + executionId: '1ad2d383-d1fa-425d-84f0-2a531e17a5d9', + executionDate: 1605265939965, + questionType: 'Open text question', + questionHtml: + '
\n' + + '
\n' + + ' How was your experience?\n' + + '
\n' + + '
\n', + questionText: 'How was your experience?', + }, + }), }, + source: {}, }, ], method: 'POST', @@ -1229,7 +1274,11 @@ export const data = [ questionType: 'Open text question', score: 0, questionHtml: - '
\n
\n How was your experience?\n
\n
\n', + '
\n' + + '
\n' + + ' How was your experience?\n' + + '
\n' + + '
\n', questionText: 'How was your experience?', }, }, @@ -1250,103 +1299,108 @@ export const data = [ name: 'gainsightpx', description: 'Engagement Track Call ', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - user: { - aptrinsicId: 'cab9c469-8602-4933-acdb-68338fbb9ab1', - identifyId: 'New!', - type: 'USER', - gender: 'EMPTY_GENDER', - email: 'userEmail@address.com', - firstName: 'test', - lastName: 'rudderlabs', - lastSeenDate: 1665582808669, - signUpDate: 1665582791753, - firstVisitDate: 1665582791753, - title: 'Mr.', - phone: '', - score: 0, - role: '', - subscriptionId: '', - accountId: 'IBM', - numberOfVisits: 1, - location: { - countryName: 'India', - countryCode: '', - stateName: '', - stateCode: '', - city: '', - street: '', - postalCode: '', - continent: '', - regionName: '', - timeZone: '', - coordinates: { latitude: 0, longitude: 0 }, - }, - propertyKeys: ['AP-EOXPSEZGC5LA-2-1'], - createDate: 1665582808376, - lastModifiedDate: 1665582808717, - customAttributes: null, - globalUnsubscribe: false, - sfdcContactId: '', - lastVisitedUserAgentData: null, - id: 'New!', - lastInferredLocation: null, - }, - account: { - id: 'IBM', - name: 'International Business Machine', - trackedSubscriptionId: '', - sfdcId: '', - lastSeenDate: 1665582808669, - dunsNumber: '', - industry: '', - numberOfEmployees: 0, - sicCode: '', - website: '', - naicsCode: '', - plan: '', - location: { - countryName: '', - countryCode: '', - stateName: '', - stateCode: '', - city: '', - street: '', - postalCode: '', - continent: '', - regionName: '', - timeZone: '', - coordinates: { latitude: 0, longitude: 0 }, - }, - numberOfUsers: 0, - propertyKeys: ['AP-EOXPSEZGC5LA-2-1'], - createDate: 1665578567565, - lastModifiedDate: 1665582808669, - customAttributes: null, - parentGroupId: '', - }, - event: { - eventType: 'ENGAGEMENT', - eventId: '6494e73a-976b-4ee5-b8a8-de9effff7e80', - propertyKey: 'AP-N6SV00EVMR1E-2-1', - date: 1605262539389, - sessionId: 'AP-N6SV00EVMR1E-2-1605262502068-24197555', - globalContext: { role: 'Admin' }, - userType: 'EMPTY_USER_TYPE', - contentType: 'IN_APP_DIALOG', - engagementId: '83c30d4e-88c3-4054-a0fa-33451a6ea7fc', - engagementType: 'Dialog', - engagementName: 'Release Announcement', - interaction: 'VIEWED', - stepNumber: 1, - activation: 'Auto', - executionId: 'b633945f-d4a5-404a-ae39-5ced5b542240', - executionDate: 1605262539389, + request: { + body: JSON.stringify({ + user: { + aptrinsicId: 'cab9c469-8602-4933-acdb-68338fbb9ab1', + identifyId: 'New!', + type: 'USER', + gender: 'EMPTY_GENDER', + email: 'userEmail@address.com', + firstName: 'test', + lastName: 'rudderlabs', + lastSeenDate: 1665582808669, + signUpDate: 1665582791753, + firstVisitDate: 1665582791753, + title: 'Mr.', + phone: '', + score: 0, + role: '', + subscriptionId: '', + accountId: 'IBM', + numberOfVisits: 1, + location: { + countryName: 'India', + countryCode: '', + stateName: '', + stateCode: '', + city: '', + street: '', + postalCode: '', + continent: '', + regionName: '', + timeZone: '', + coordinates: { latitude: 0, longitude: 0 }, + }, + propertyKeys: ['AP-EOXPSEZGC5LA-2-1'], + createDate: 1665582808376, + lastModifiedDate: 1665582808717, + customAttributes: null, + globalUnsubscribe: false, + sfdcContactId: '', + lastVisitedUserAgentData: null, + id: 'New!', + lastInferredLocation: null, + }, + account: { + id: 'IBM', + name: 'International Business Machine', + trackedSubscriptionId: '', + sfdcId: '', + lastSeenDate: 1665582808669, + dunsNumber: '', + industry: '', + numberOfEmployees: 0, + sicCode: '', + website: '', + naicsCode: '', + plan: '', + location: { + countryName: '', + countryCode: '', + stateName: '', + stateCode: '', + city: '', + street: '', + postalCode: '', + continent: '', + regionName: '', + timeZone: '', + coordinates: { latitude: 0, longitude: 0 }, + }, + numberOfUsers: 0, + propertyKeys: ['AP-EOXPSEZGC5LA-2-1'], + createDate: 1665578567565, + lastModifiedDate: 1665582808669, + customAttributes: null, + parentGroupId: '', + }, + event: { + eventType: 'ENGAGEMENT', + eventId: '6494e73a-976b-4ee5-b8a8-de9effff7e80', + propertyKey: 'AP-N6SV00EVMR1E-2-1', + date: 1605262539389, + sessionId: 'AP-N6SV00EVMR1E-2-1605262502068-24197555', + globalContext: { role: 'Admin' }, + userType: 'EMPTY_USER_TYPE', + contentType: 'IN_APP_DIALOG', + engagementId: '83c30d4e-88c3-4054-a0fa-33451a6ea7fc', + engagementType: 'Dialog', + engagementName: 'Release Announcement', + interaction: 'VIEWED', + stepNumber: 1, + activation: 'Auto', + executionId: 'b633945f-d4a5-404a-ae39-5ced5b542240', + executionDate: 1605262539389, + }, + }), }, + source: {}, }, ], method: 'POST', @@ -1421,120 +1475,125 @@ export const data = [ name: 'gainsightpx', description: 'SegmentIO S2S Track Call ', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - user: { - aptrinsicId: 'cab9c469-8602-4933-acdb-68338fbb9ab1', - identifyId: 'New!', - type: 'USER', - gender: 'EMPTY_GENDER', - email: 'userEmail@address.com', - firstName: 'test', - lastName: 'rudderlabs', - lastSeenDate: 1665582808669, - signUpDate: 1665582791753, - firstVisitDate: 1665582791753, - title: 'Mr.', - phone: '', - score: 0, - role: '', - subscriptionId: '', - accountId: 'IBM', - numberOfVisits: 1, - location: { - countryName: 'India', - countryCode: '', - stateName: '', - stateCode: '', - city: '', - street: '', - postalCode: '', - continent: '', - regionName: '', - timeZone: '', - coordinates: { latitude: 0, longitude: 0 }, - }, - propertyKeys: ['AP-EOXPSEZGC5LA-2-1'], - createDate: 1665582808376, - lastModifiedDate: 1665582808717, - customAttributes: null, - globalUnsubscribe: false, - sfdcContactId: '', - lastVisitedUserAgentData: null, - id: 'New!', - lastInferredLocation: null, - }, - account: { - id: 'IBM', - name: 'International Business Machine', - trackedSubscriptionId: '', - sfdcId: '', - lastSeenDate: 1665582808669, - dunsNumber: '', - industry: '', - numberOfEmployees: 0, - sicCode: '', - website: '', - naicsCode: '', - plan: '', - location: { - countryName: '', - countryCode: '', - stateName: '', - stateCode: '', - city: '', - street: '', - postalCode: '', - continent: '', - regionName: '', - timeZone: '', - coordinates: { latitude: 0, longitude: 0 }, - }, - numberOfUsers: 0, - propertyKeys: ['AP-EOXPSEZGC5LA-2-1'], - createDate: 1665578567565, - lastModifiedDate: 1665582808669, - customAttributes: null, - parentGroupId: '', - }, - event: { - eventType: 'SEGMENT_IO', - eventId: 'ajs-next-69810a17571dc115ccead5281cc3fb7d', - propertyKey: 'AP-EOXPSEZGC5LA-2-1', - date: 1666687235178, - sessionId: '31a524fa-1490-48db-9600-adfb1fa95333', - globalContext: {}, - userType: 'USER', - segmentIOEvent: { - pxPropertyKey: 'AP-EOXPSEZGC5LA-2', - type: 'group', - userId: '1001', - anonymousId: 'a4303a13-eb10-46d8-8935-d787daf1cfbd', - context: { - ip: '122.161.67.121', - library: { name: 'analytics.js', version: 'next-1.45.0' }, - locale: 'en-GB', - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36', - page: { - path: '/abc.html', - title: 'Engage Testing', - url: 'http://127.0.0.1:5501/abc.html', + request: { + body: JSON.stringify({ + user: { + aptrinsicId: 'cab9c469-8602-4933-acdb-68338fbb9ab1', + identifyId: 'New!', + type: 'USER', + gender: 'EMPTY_GENDER', + email: 'userEmail@address.com', + firstName: 'test', + lastName: 'rudderlabs', + lastSeenDate: 1665582808669, + signUpDate: 1665582791753, + firstVisitDate: 1665582791753, + title: 'Mr.', + phone: '', + score: 0, + role: '', + subscriptionId: '', + accountId: 'IBM', + numberOfVisits: 1, + location: { + countryName: 'India', + countryCode: '', + stateName: '', + stateCode: '', + city: '', + street: '', + postalCode: '', + continent: '', + regionName: '', + timeZone: '', + coordinates: { latitude: 0, longitude: 0 }, + }, + propertyKeys: ['AP-EOXPSEZGC5LA-2-1'], + createDate: 1665582808376, + lastModifiedDate: 1665582808717, + customAttributes: null, + globalUnsubscribe: false, + sfdcContactId: '', + lastVisitedUserAgentData: null, + id: 'New!', + lastInferredLocation: null, + }, + account: { + id: 'IBM', + name: 'International Business Machine', + trackedSubscriptionId: '', + sfdcId: '', + lastSeenDate: 1665582808669, + dunsNumber: '', + industry: '', + numberOfEmployees: 0, + sicCode: '', + website: '', + naicsCode: '', + plan: '', + location: { + countryName: '', + countryCode: '', + stateName: '', + stateCode: '', + city: '', + street: '', + postalCode: '', + continent: '', + regionName: '', + timeZone: '', + coordinates: { latitude: 0, longitude: 0 }, + }, + numberOfUsers: 0, + propertyKeys: ['AP-EOXPSEZGC5LA-2-1'], + createDate: 1665578567565, + lastModifiedDate: 1665582808669, + customAttributes: null, + parentGroupId: '', + }, + event: { + eventType: 'SEGMENT_IO', + eventId: 'ajs-next-69810a17571dc115ccead5281cc3fb7d', + propertyKey: 'AP-EOXPSEZGC5LA-2-1', + date: 1666687235178, + sessionId: '31a524fa-1490-48db-9600-adfb1fa95333', + globalContext: {}, + userType: 'USER', + segmentIOEvent: { + pxPropertyKey: 'AP-EOXPSEZGC5LA-2', + type: 'group', + userId: '1001', + anonymousId: 'a4303a13-eb10-46d8-8935-d787daf1cfbd', + context: { + ip: '122.161.67.121', + library: { name: 'analytics.js', version: 'next-1.45.0' }, + locale: 'en-GB', + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36', + page: { + path: '/abc.html', + title: 'Engage Testing', + url: 'http://127.0.0.1:5501/abc.html', + }, + }, + messageId: 'ajs-next-69810a17571dc115ccead5281cc3fb7d', + receivedAt: '2022-10-25T08:40:35.184Z', + sentAt: '2022-10-25T08:40:34.809Z', + timestamp: '2022-10-25T08:40:35.178Z', + traits: { name: 'International Business Machine' }, + version: 2, + channel: 'client', + groupId: 'IBM', }, }, - messageId: 'ajs-next-69810a17571dc115ccead5281cc3fb7d', - receivedAt: '2022-10-25T08:40:35.184Z', - sentAt: '2022-10-25T08:40:34.809Z', - timestamp: '2022-10-25T08:40:35.178Z', - traits: { name: 'International Business Machine' }, - version: 2, - channel: 'client', - groupId: 'IBM', - }, + }), }, + source: {}, }, ], method: 'POST', diff --git a/test/integrations/sources/iterable/data.ts b/test/integrations/sources/iterable/data.ts index e544cd2bc33..1f38695e5a0 100644 --- a/test/integrations/sources/iterable/data.ts +++ b/test/integrations/sources/iterable/data.ts @@ -3,23 +3,28 @@ export const data = [ name: 'iterable', description: 'test-0', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - email: 'test@rudderstack.com', - eventName: 'emailSubscribe', - dataFields: { - profileUpdatedAt: '2022-04-19 03:33:50 +00:00', - publicIdString: 'ad474bf7-e785-480f-b9d0-861b85ab5bf5', - signupSource: 'WebForm', - email: 'test@rudderstack.com', - createdAt: '2022-04-19 03:33:50 +00:00', - messageTypeIds: [], - emailListIds: [1589748], - channelIds: [], + request: { + body: JSON.stringify({ + email: 'test@rudderstack.com', + eventName: 'emailSubscribe', + dataFields: { + profileUpdatedAt: '2022-04-19 03:33:50 +00:00', + publicIdString: 'ad474bf7-e785-480f-b9d0-861b85ab5bf5', + signupSource: 'WebForm', + email: 'test@rudderstack.com', + createdAt: '2022-04-19 03:33:50 +00:00', + messageTypeIds: [], + emailListIds: [1589748], + channelIds: [], + }, + }), }, + source: {}, }, ], method: 'POST', @@ -67,22 +72,27 @@ export const data = [ name: 'iterable', description: 'test-1', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - eventName: 'emailSubscribe', - dataFields: { - profileUpdatedAt: '2022-04-19 03:33:50 +00:00', - publicIdString: 'ad474bf7-e785-480f-b9d0-861b85ab5bf5', - signupSource: 'WebForm', - email: 'test@abcd.com', - createdAt: '2022-04-19 03:33:50 +00:00', - messageTypeIds: [], - emailListIds: [1589748], - channelIds: [], + request: { + body: JSON.stringify({ + eventName: 'emailSubscribe', + dataFields: { + profileUpdatedAt: '2022-04-19 03:33:50 +00:00', + publicIdString: 'ad474bf7-e785-480f-b9d0-861b85ab5bf5', + signupSource: 'WebForm', + email: 'test@abcd.com', + createdAt: '2022-04-19 03:33:50 +00:00', + messageTypeIds: [], + emailListIds: [1589748], + channelIds: [], + }, + }), }, + source: {}, }, ], method: 'POST', @@ -114,20 +124,25 @@ export const data = [ name: 'iterable', description: 'test-2', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - email: 'test@ruddstack.com', - eventTitle: 'smsReceived', - dataFields: { - fromPhoneNumber: '+16503926753', - toPhoneNumber: '+14155824541', - smsMessage: 'Message text', - email: 'docs@iterable.com', - createdAt: '2016-12-05 22:51:25 +00:00', + request: { + body: JSON.stringify({ + email: 'test@ruddstack.com', + eventTitle: 'smsReceived', + dataFields: { + fromPhoneNumber: '+16503926753', + toPhoneNumber: '+14155824541', + smsMessage: 'Message text', + email: 'docs@iterable.com', + createdAt: '2016-12-05 22:51:25 +00:00', + }, + }), }, + source: {}, }, ], method: 'POST', @@ -159,10 +174,20 @@ export const data = [ name: 'iterable', description: 'test-3', module: 'source', - version: 'v0', + version: 'v2', input: { request: { - body: [{ email: 'test@rudderstack.com', eventName: 'inAppSendSkip' }], + body: [ + { + request: { + body: JSON.stringify({ + email: 'test@rudderstack.com', + eventName: 'inAppSendSkip', + }), + }, + source: {}, + }, + ], method: 'POST', headers: { 'Content-Type': 'application/json' }, }, @@ -197,30 +222,35 @@ export const data = [ name: 'iterable', description: 'test-4', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - email: 'test@rudderstack.com', - eventName: 'emailSend', - dataFields: { - contentId: 331201, - email: 'test@rudderstack.com', - createdAt: '2016-12-02 20:21:04 +00:00', - campaignId: 59667, - templateId: 93849, - messageId: 'd0aa7801f91f4824997a631f3ed583c3', - emailSubject: 'My subject', - campaignName: 'My campaign name', - workflowId: null, - workflowName: null, - templateName: 'My template name', - channelId: 3420, - messageTypeId: 3866, - experimentId: null, - emailId: 'c59667:t93849:docs@iterable.com', + request: { + body: JSON.stringify({ + email: 'test@rudderstack.com', + eventName: 'emailSend', + dataFields: { + contentId: 331201, + email: 'test@rudderstack.com', + createdAt: '2016-12-02 20:21:04 +00:00', + campaignId: 59667, + templateId: 93849, + messageId: 'd0aa7801f91f4824997a631f3ed583c3', + emailSubject: 'My subject', + campaignName: 'My campaign name', + workflowId: null, + workflowName: null, + templateName: 'My template name', + channelId: 3420, + messageTypeId: 3866, + experimentId: null, + emailId: 'c59667:t93849:docs@iterable.com', + }, + }), }, + source: {}, }, ], method: 'POST', @@ -275,30 +305,35 @@ export const data = [ name: 'iterable', description: 'test-5', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - email: 'invalid_email@iterable.com', - eventName: 'emailBounce', - dataFields: { - emailSubject: 'My subject', - campaignName: 'My campaign name', - workflowId: null, - workflowName: null, - templateName: 'My template name', - channelId: 2598, - messageTypeId: 2870, - experimentId: null, - recipientState: 'HardBounce', - templateId: 167484, - email: 'invalid_email@iterable.com', - createdAt: '2017-05-15 23:59:47 +00:00', - campaignId: 114746, - messageId: 'd0aa7801f91f4824997a631f3ed583c3', - emailId: 'c114746:t167484:invalid_email@iterable.com', + request: { + body: JSON.stringify({ + email: 'invalid_email@iterable.com', + eventName: 'emailBounce', + dataFields: { + emailSubject: 'My subject', + campaignName: 'My campaign name', + workflowId: null, + workflowName: null, + templateName: 'My template name', + channelId: 2598, + messageTypeId: 2870, + experimentId: null, + recipientState: 'HardBounce', + templateId: 167484, + email: 'invalid_email@iterable.com', + createdAt: '2017-05-15 23:59:47 +00:00', + campaignId: 114746, + messageId: 'd0aa7801f91f4824997a631f3ed583c3', + emailId: 'c114746:t167484:invalid_email@iterable.com', + }, + }), }, + source: {}, }, ], method: 'POST', @@ -353,39 +388,44 @@ export const data = [ name: 'iterable', description: 'test-6', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - email: 'docs@iterable.com', - eventName: 'emailClick', - dataFields: { - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36', - ip: '162.245.22.184', - templateId: 93849, - userAgentDevice: 'Mac', - url: 'https://www.iterable.com', - canonicalUrlId: '3145668988', - city: 'San Francisco', - region: 'CA', - email: 'docs@iterable.com', - createdAt: '2016-12-02 20:31:39 +00:00', - campaignId: 59667, - messageId: 'd0aa7801f91f4824997a631f3ed583c3', - emailSubject: 'My subject', - campaignName: 'My campaign name', - workflowId: null, - workflowName: null, - templateName: 'My template name', - channelId: 3420, - messageTypeId: 3866, - experimentId: null, - linkUrl: 'https://www.iterable.com', - linkId: '3145668988', - emailId: 'c59667:t93849:docs@iterable.com', + request: { + body: JSON.stringify({ + email: 'docs@iterable.com', + eventName: 'emailClick', + dataFields: { + userAgent: + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36', + ip: '162.245.22.184', + templateId: 93849, + userAgentDevice: 'Mac', + url: 'https://www.iterable.com', + canonicalUrlId: '3145668988', + city: 'San Francisco', + region: 'CA', + email: 'docs@iterable.com', + createdAt: '2016-12-02 20:31:39 +00:00', + campaignId: 59667, + messageId: 'd0aa7801f91f4824997a631f3ed583c3', + emailSubject: 'My subject', + campaignName: 'My campaign name', + workflowId: null, + workflowName: null, + templateName: 'My template name', + channelId: 3420, + messageTypeId: 3866, + experimentId: null, + linkUrl: 'https://www.iterable.com', + linkId: '3145668988', + emailId: 'c59667:t93849:docs@iterable.com', + }, + }), }, + source: {}, }, ], method: 'POST', @@ -449,30 +489,35 @@ export const data = [ name: 'iterable', description: 'test-7', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - email: 'docs@iterable.com', - eventName: 'emailComplaint', - dataFields: { - recipientState: 'Complaint', - templateId: 79190, - email: 'docs@iterable.com', - createdAt: '2016-12-09 18:52:19 +00:00', - campaignId: 49313, - messageId: 'd3c44d47b4994306b4db8d16a94db025', - emailSubject: 'My subject', - campaignName: 'My campaign name', - workflowId: null, - workflowName: null, - templateName: 'test template', - channelId: 3420, - messageTypeId: 3866, - experimentId: null, - emailId: 'c49313:t79190:docs@iterable.com', + request: { + body: JSON.stringify({ + email: 'docs@iterable.com', + eventName: 'emailComplaint', + dataFields: { + recipientState: 'Complaint', + templateId: 79190, + email: 'docs@iterable.com', + createdAt: '2016-12-09 18:52:19 +00:00', + campaignId: 49313, + messageId: 'd3c44d47b4994306b4db8d16a94db025', + emailSubject: 'My subject', + campaignName: 'My campaign name', + workflowId: null, + workflowName: null, + templateName: 'test template', + channelId: 3420, + messageTypeId: 3866, + experimentId: null, + emailId: 'c49313:t79190:docs@iterable.com', + }, + }), }, + source: {}, }, ], method: 'POST', @@ -527,34 +572,39 @@ export const data = [ name: 'iterable', description: 'test-8', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - email: 'docs@iterable.com', - eventName: 'emailOpen', - dataFields: { - userAgent: - 'Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0 (via ggpht.com GoogleImageProxy)', - proxySource: 'Gmail', - ip: '66.249.84.204', - templateId: 79190, - device: 'Gmail', - email: 'docs@iterable.com', - createdAt: '2016-12-02 18:51:45 +00:00', - campaignId: 49313, - messageId: '210badf49fe54f2591d64ad0d055f4fb', - emailSubject: 'My subject', - campaignName: 'My campaign name', - workflowId: null, - workflowName: null, - templateName: 'My template name', - channelId: 3420, - messageTypeId: 3866, - experimentId: null, - emailId: 'c49313:t79190:docs@iterable.com', + request: { + body: JSON.stringify({ + email: 'docs@iterable.com', + eventName: 'emailOpen', + dataFields: { + userAgent: + 'Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0 (via ggpht.com GoogleImageProxy)', + proxySource: 'Gmail', + ip: '66.249.84.204', + templateId: 79190, + device: 'Gmail', + email: 'docs@iterable.com', + createdAt: '2016-12-02 18:51:45 +00:00', + campaignId: 49313, + messageId: '210badf49fe54f2591d64ad0d055f4fb', + emailSubject: 'My subject', + campaignName: 'My campaign name', + workflowId: null, + workflowName: null, + templateName: 'My template name', + channelId: 3420, + messageTypeId: 3866, + experimentId: null, + emailId: 'c49313:t79190:docs@iterable.com', + }, + }), }, + source: {}, }, ], method: 'POST', @@ -613,20 +663,25 @@ export const data = [ name: 'iterable', description: 'test-9', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - email: 'docs@iterable.com', - eventName: 'emailSendSkip', - dataFields: { - createdAt: '2019-08-07 18:56:10 +00:00', - reason: 'DuplicateMarketingMessage', - campaignId: 721398, - messageId: '98430abe1b9842c991ce221010121553', - email: 'docs@iterable.com', + request: { + body: JSON.stringify({ + email: 'docs@iterable.com', + eventName: 'emailSendSkip', + dataFields: { + createdAt: '2019-08-07 18:56:10 +00:00', + reason: 'DuplicateMarketingMessage', + campaignId: 721398, + messageId: '98430abe1b9842c991ce221010121553', + email: 'docs@iterable.com', + }, + }), }, + source: {}, }, ], method: 'POST', @@ -671,23 +726,28 @@ export const data = [ name: 'iterable', description: 'test-10', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - email: 'test@rudderstack.com', - eventName: 'emailSubscribe', - dataFields: { - profileUpdatedAt: '2022-04-19 03:33:50 +00:00', - publicIdString: 'ad474bf7-e785-480f-b9d0-861b85ab5bf5', - signupSource: 'WebForm', - email: 'test@abcd.com', - createdAt: '2022-04-19 03:33:50 +00:00', - messageTypeIds: [], - emailListIds: [1589748], - channelIds: [], + request: { + body: JSON.stringify({ + email: 'test@rudderstack.com', + eventName: 'emailSubscribe', + dataFields: { + profileUpdatedAt: '2022-04-19 03:33:50 +00:00', + publicIdString: 'ad474bf7-e785-480f-b9d0-861b85ab5bf5', + signupSource: 'WebForm', + email: 'test@abcd.com', + createdAt: '2022-04-19 03:33:50 +00:00', + messageTypeIds: [], + emailListIds: [1589748], + channelIds: [], + }, + }), }, + source: {}, }, ], method: 'POST', @@ -735,35 +795,40 @@ export const data = [ name: 'iterable', description: 'test-11', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - email: 'docs@iterable.com', - eventName: 'emailUnSubscribe', - dataFields: { - campaignId: 1089024, - messageId: 'bf008db8ab194b65816398c05bf30f99', - emailId: 'c1089024:t1526112:docs@iterable.com', - workflowName: 'My test workflow', - messageTypeIds: [], - locale: null, - templateId: 1526112, - emailSubject: 'Upcoming events!', - labels: [], - unsubSource: 'EmailLink', - createdAt: '2020-03-20 23:34:15 +00:00', - templateName: 'My test template', - emailListIds: [], - messageTypeId: 31082, - experimentId: null, - channelIds: [27447], - campaignName: 'My test campaign', - workflowId: 76786, - email: 'docs@iterable.com', - channelId: 27447, + request: { + body: JSON.stringify({ + email: 'docs@iterable.com', + eventName: 'emailUnSubscribe', + dataFields: { + campaignId: 1089024, + messageId: 'bf008db8ab194b65816398c05bf30f99', + emailId: 'c1089024:t1526112:docs@iterable.com', + workflowName: 'My test workflow', + messageTypeIds: [], + locale: null, + templateId: 1526112, + emailSubject: 'Upcoming events!', + labels: [], + unsubSource: 'EmailLink', + createdAt: '2020-03-20 23:34:15 +00:00', + templateName: 'My test template', + emailListIds: [], + messageTypeId: 31082, + experimentId: null, + channelIds: [27447], + campaignName: 'My test campaign', + workflowId: 76786, + email: 'docs@iterable.com', + channelId: 27447, + }, + }), }, + source: {}, }, ], method: 'POST', @@ -823,40 +888,45 @@ export const data = [ name: 'iterable', description: 'test-12', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - email: 'docs@iterable.com', - userId: '1', - eventName: 'hostedUnsubscribeClick', - dataFields: { - country: 'United States', - city: 'San Jose', - campaignId: 1074721, - ip: '192.168.0.1', - userAgentDevice: 'Mac', - messageId: 'ceb3d4d929fc406ca93b28a0ef1efff1', - emailId: 'c1074721:t1506266:docs@iterable.com', - 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', - workflowName: 'My workflow', - locale: null, - templateId: 1506266, - emailSubject: 'My email subject', - url: 'https://iterable.com', - labels: [], - createdAt: '2020-03-21 00:24:08 +00:00', - templateName: 'My email template', - messageTypeId: 13406, - experimentId: null, - region: 'CA', - campaignName: 'My email campaign', - workflowId: 60102, - email: 'docs@iterable.com', - channelId: 12466, + request: { + body: JSON.stringify({ + email: 'docs@iterable.com', + userId: '1', + eventName: 'hostedUnsubscribeClick', + dataFields: { + country: 'United States', + city: 'San Jose', + campaignId: 1074721, + ip: '192.168.0.1', + userAgentDevice: 'Mac', + messageId: 'ceb3d4d929fc406ca93b28a0ef1efff1', + emailId: 'c1074721:t1506266:docs@iterable.com', + 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', + workflowName: 'My workflow', + locale: null, + templateId: 1506266, + emailSubject: 'My email subject', + url: 'https://iterable.com', + labels: [], + createdAt: '2020-03-21 00:24:08 +00:00', + templateName: 'My email template', + messageTypeId: 13406, + experimentId: null, + region: 'CA', + campaignName: 'My email campaign', + workflowId: 60102, + email: 'docs@iterable.com', + channelId: 12466, + }, + }), }, + source: {}, }, ], method: 'POST', @@ -920,18 +990,23 @@ export const data = [ name: 'iterable', description: 'test-13', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - email: 'docs@iterable.com', - eventName: 'inAppClick', - dataFields: { - email: 'docs@iterable.com', - createdAt: '2018-03-27 00:44:40 +00:00', - campaignId: 269450, + request: { + body: JSON.stringify({ + email: 'docs@iterable.com', + eventName: 'inAppClick', + dataFields: { + email: 'docs@iterable.com', + createdAt: '2018-03-27 00:44:40 +00:00', + campaignId: 269450, + }, + }), }, + source: {}, }, ], method: 'POST', @@ -955,7 +1030,10 @@ export const data = [ }, event: 'inAppClick', integrations: { Iterable: false }, - properties: { createdAt: '2018-03-27 00:44:40 +00:00', campaignId: 269450 }, + properties: { + createdAt: '2018-03-27 00:44:40 +00:00', + campaignId: 269450, + }, receivedAt: '2018-03-27T00:44:40.000Z', timestamp: '2018-03-27T00:44:40.000Z', type: 'track', @@ -971,18 +1049,23 @@ export const data = [ name: 'iterable', description: 'test-14', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - email: 'docs@iterable.com', - eventName: 'inAppOpen', - dataFields: { - email: 'docs@iterable.com', - createdAt: '2018-03-27 00:44:30 +00:00', - campaignId: 269450, + request: { + body: JSON.stringify({ + email: 'docs@iterable.com', + eventName: 'inAppOpen', + dataFields: { + email: 'docs@iterable.com', + createdAt: '2018-03-27 00:44:30 +00:00', + campaignId: 269450, + }, + }), }, + source: {}, }, ], method: 'POST', @@ -1006,7 +1089,10 @@ export const data = [ }, event: 'inAppOpen', integrations: { Iterable: false }, - properties: { createdAt: '2018-03-27 00:44:30 +00:00', campaignId: 269450 }, + properties: { + createdAt: '2018-03-27 00:44:30 +00:00', + campaignId: 269450, + }, receivedAt: '2018-03-27T00:44:30.000Z', timestamp: '2018-03-27T00:44:30.000Z', type: 'track', @@ -1022,34 +1108,39 @@ export const data = [ name: 'iterable', description: 'test-15', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - email: 'docs@iterable.com', - eventName: 'inAppSend', - dataFields: { - messageContext: { saveToInbox: false, trigger: 'immediate' }, - campaignId: 732678, - contentId: 18997, - messageId: 'vA16d48VVi4LQ5hMuZuquKzL0BXTdQJJUMJRjKnL1', - workflowName: null, - emailId: 'c732678:t1032729:docs@iterable.com', - locale: null, - templateId: 1032729, - inAppBody: '', - email: 'docs@iterable.com', - createdAt: '2016-12-10 01:00:38 +00:00', - campaignId: 74768, - templateId: 113554, - pushMessage: 'Push message text', - campaignName: 'My campaign name', - workflowId: null, - workflowName: null, - templateName: 'My template name', - channelId: 2203, - messageTypeId: 2439, - experimentId: null, - payload: { path: 'yourpath/subpath' }, - sound: '', - badge: null, - contentAvailable: false, - deeplink: null, - locale: null, + request: { + body: JSON.stringify({ + email: 'docs@iterable.com', + eventName: 'pushBounce', + dataFields: { + platformEndpoint: '', + email: 'docs@iterable.com', + createdAt: '2016-12-10 01:00:38 +00:00', + campaignId: 74768, + templateId: 113554, + pushMessage: 'Push message text', + campaignName: 'My campaign name', + workflowId: null, + workflowName: null, + templateName: 'My template name', + channelId: 2203, + messageTypeId: 2439, + experimentId: null, + payload: { path: 'yourpath/subpath' }, + sound: '', + badge: null, + contentAvailable: false, + deeplink: null, + locale: null, + }, + }), }, + source: {}, }, ], method: 'POST', @@ -1280,34 +1381,39 @@ export const data = [ name: 'iterable', description: 'test-18', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - email: 'docs@iterable.com', - eventName: 'pushOpen', - dataFields: { - appAlreadyRunning: false, - email: 'docs@iterable.com', - createdAt: '2016-12-08 01:25:22 +00:00', - campaignId: 74768, - templateId: 113554, - pushMessage: 'Push message text', - campaignName: 'My campaign name', - workflowId: null, - workflowName: null, - templateName: 'My template name', - channelId: 2203, - messageTypeId: 2439, - experimentId: null, - payload: { path: 'shop_home' }, - sound: null, - badge: null, - contentAvailable: false, - deeplink: null, - locale: null, + request: { + body: JSON.stringify({ + email: 'docs@iterable.com', + eventName: 'pushOpen', + dataFields: { + appAlreadyRunning: false, + email: 'docs@iterable.com', + createdAt: '2016-12-08 01:25:22 +00:00', + campaignId: 74768, + templateId: 113554, + pushMessage: 'Push message text', + campaignName: 'My campaign name', + workflowId: null, + workflowName: null, + templateName: 'My template name', + channelId: 2203, + messageTypeId: 2439, + experimentId: null, + payload: { path: 'shop_home' }, + sound: null, + badge: null, + contentAvailable: false, + deeplink: null, + locale: null, + }, + }), }, + source: {}, }, ], method: 'POST', @@ -1366,36 +1472,41 @@ export const data = [ name: 'iterable', description: 'test-19', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - email: 'docs@iterable.com', - eventName: 'pushSend', - dataFields: { - contentId: 6724, - platformEndpoint: '', - email: 'docs@iterable.com', - createdAt: '2016-12-08 00:53:11 +00:00', - campaignId: 74758, - templateId: 113541, - messageId: '73f2d3f13cd04db0b56c6143b179adc5', - pushMessage: 'Push message text', - campaignName: 'My campaign name', - workflowId: null, - workflowName: null, - templateName: 'My template name', - channelId: 1744, - messageTypeId: 1759, - experimentId: null, - payload: { a: '2' }, - sound: '', - badge: '', - contentAvailable: false, - deeplink: null, - locale: null, + request: { + body: JSON.stringify({ + email: 'docs@iterable.com', + eventName: 'pushSend', + dataFields: { + contentId: 6724, + platformEndpoint: '', + email: 'docs@iterable.com', + createdAt: '2016-12-08 00:53:11 +00:00', + campaignId: 74758, + templateId: 113541, + messageId: '73f2d3f13cd04db0b56c6143b179adc5', + pushMessage: 'Push message text', + campaignName: 'My campaign name', + workflowId: null, + workflowName: null, + templateName: 'My template name', + channelId: 1744, + messageTypeId: 1759, + experimentId: null, + payload: { a: '2' }, + sound: '', + badge: '', + contentAvailable: false, + deeplink: null, + locale: null, + }, + }), }, + source: {}, }, ], method: 'POST', @@ -1456,20 +1567,25 @@ export const data = [ name: 'iterable', description: 'test-20', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - email: 'docs@iterable.com', - eventName: 'pushSendSkip', - dataFields: { - createdAt: '2019-08-07 22:28:51 +00:00', - reason: 'DuplicateMarketingMessage', - campaignId: 732667, - messageId: '8306ae0c74324635b7554947c5ec0e56', - email: 'docs@iterable.com', + request: { + body: JSON.stringify({ + email: 'docs@iterable.com', + eventName: 'pushSendSkip', + dataFields: { + createdAt: '2019-08-07 22:28:51 +00:00', + reason: 'DuplicateMarketingMessage', + campaignId: 732667, + messageId: '8306ae0c74324635b7554947c5ec0e56', + email: 'docs@iterable.com', + }, + }), }, + source: {}, }, ], method: 'POST', @@ -1514,36 +1630,41 @@ export const data = [ name: 'iterable', description: 'test-21', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - email: 'docs@iterable.com', - eventName: 'pushUninstall', - dataFields: { - isGhostPush: false, - platformEndpoint: '', - email: 'docs@iterable.com', - createdAt: '2016-12-09 20:50:54 +00:00', - campaignId: 74768, - templateId: 113554, - messageId: '73f2d3f13cd04db0b56c6143b179adc5', - pushMessage: 'Push message text', - campaignName: 'My campaign name', - workflowId: null, - workflowName: null, - templateName: 'My template name', - channelId: 2203, - messageTypeId: 2439, - experimentId: null, - payload: { path: 'your_folder/30' }, - sound: '', - badge: null, - contentAvailable: false, - deeplink: null, - locale: null, + request: { + body: JSON.stringify({ + email: 'docs@iterable.com', + eventName: 'pushUninstall', + dataFields: { + isGhostPush: false, + platformEndpoint: '', + email: 'docs@iterable.com', + createdAt: '2016-12-09 20:50:54 +00:00', + campaignId: 74768, + templateId: 113554, + messageId: '73f2d3f13cd04db0b56c6143b179adc5', + pushMessage: 'Push message text', + campaignName: 'My campaign name', + workflowId: null, + workflowName: null, + templateName: 'My template name', + channelId: 2203, + messageTypeId: 2439, + experimentId: null, + payload: { path: 'your_folder/30' }, + sound: '', + badge: null, + contentAvailable: false, + deeplink: null, + locale: null, + }, + }), }, + source: {}, }, ], method: 'POST', @@ -1604,38 +1725,43 @@ export const data = [ name: 'iterable', description: 'test-22', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - email: 'docs@iterable.com', - eventName: 'smsBounce', - dataFields: { - smsProviderResponse: { - status: 404, - message: - 'The requested resource /2010-04-01/Accounts/ACCOUNT_NUMBER/Messages.json was not found', - code: 20404, - more_info: 'https://www.twilio.com/docs/errors/20404', - }, - email: 'docs@iterable.com', - createdAt: '2016-12-05 22:43:24 +00:00', - campaignId: 74003, - templateId: 112561, - smsMessage: "Here is example message, please respond with 'received'", - campaignName: 'My campaign name', - workflowId: null, - workflowName: null, - templateName: 'My template name', - channelId: 4270, - messageTypeId: 4769, - experimentId: null, - fromPhoneNumberId: 268, - imageUrl: null, - locale: null, - emailId: 'c74003:t112561:docs@iterable.com', + request: { + body: JSON.stringify({ + email: 'docs@iterable.com', + eventName: 'smsBounce', + dataFields: { + smsProviderResponse: { + status: 404, + message: + 'The requested resource /2010-04-01/Accounts/ACCOUNT_NUMBER/Messages.json was not found', + code: 20404, + more_info: 'https://www.twilio.com/docs/errors/20404', + }, + email: 'docs@iterable.com', + createdAt: '2016-12-05 22:43:24 +00:00', + campaignId: 74003, + templateId: 112561, + smsMessage: "Here is example message, please respond with 'received'", + campaignName: 'My campaign name', + workflowId: null, + workflowName: null, + templateName: 'My template name', + channelId: 4270, + messageTypeId: 4769, + experimentId: null, + fromPhoneNumberId: 268, + imageUrl: null, + locale: null, + emailId: 'c74003:t112561:docs@iterable.com', + }, + }), }, + source: {}, }, ], method: 'POST', @@ -1698,34 +1824,39 @@ export const data = [ name: 'iterable', description: 'test-23', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - email: 'docs@iterable.com', - eventName: 'smsClick', - dataFields: { - campaignId: 1234567, - campaignName: 'My test campaign', - workflowId: null, - workflowName: null, - templateName: 'My template', - locale: null, - channelId: 98765, - messageTypeId: 43210, - experimentId: null, - labels: [], - smsMessage: 'Test SMS! https://www.example.com', - fromPhoneNumberId: 1234, - imageUrl: null, - clickedUrl: 'https://www.example.com', - email: 'docs@iterable.com', - createdAt: '2022-03-10 05:00:14 +00:00', - templateId: 1112222, - messageId: 'ebd8f3cfc1f74353b423c5e0f3dd8b39', - emailId: 'c1234567:t9876543:docs@iterable.com', + request: { + body: JSON.stringify({ + email: 'docs@iterable.com', + eventName: 'smsClick', + dataFields: { + campaignId: 1234567, + campaignName: 'My test campaign', + workflowId: null, + workflowName: null, + templateName: 'My template', + locale: null, + channelId: 98765, + messageTypeId: 43210, + experimentId: null, + labels: [], + smsMessage: 'Test SMS! https://www.example.com', + fromPhoneNumberId: 1234, + imageUrl: null, + clickedUrl: 'https://www.example.com', + email: 'docs@iterable.com', + createdAt: '2022-03-10 05:00:14 +00:00', + templateId: 1112222, + messageId: 'ebd8f3cfc1f74353b423c5e0f3dd8b39', + emailId: 'c1234567:t9876543:docs@iterable.com', + }, + }), }, + source: {}, }, ], method: 'POST', @@ -1784,20 +1915,25 @@ export const data = [ name: 'iterable', description: 'test-24', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - email: 'docs@iterable.com', - eventName: 'smsReceived', - dataFields: { - fromPhoneNumber: '+16503926753', - toPhoneNumber: '+14155824541', - smsMessage: 'Message text', - email: 'docs@iterable.com', - createdAt: '2016-12-05 22:51:25 +00:00', + request: { + body: JSON.stringify({ + email: 'docs@iterable.com', + eventName: 'smsReceived', + dataFields: { + fromPhoneNumber: '+16503926753', + toPhoneNumber: '+14155824541', + smsMessage: 'Message text', + email: 'docs@iterable.com', + createdAt: '2016-12-05 22:51:25 +00:00', + }, + }), }, + source: {}, }, ], method: 'POST', @@ -1842,34 +1978,39 @@ export const data = [ name: 'iterable', description: 'test-25', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - email: 'docs@iterable.com', - eventName: 'smsSend', - dataFields: { - toPhoneNumber: '+16503926753', - fromSMSSenderId: 258, - contentId: 2086, - email: 'docs@iterable.com', - createdAt: '2016-12-05 21:50:32 +00:00', - campaignId: 73974, - templateId: 112523, - smsMessage: 'Message text', - campaignName: 'My campaign name', - workflowId: null, - workflowName: null, - templateName: 'My template name', - channelId: 4270, - messageTypeId: 4769, - experimentId: null, - fromPhoneNumberId: 258, - imageUrl: null, - locale: null, - emailId: 'c73974:t112523:docs@iterable.com', + request: { + body: JSON.stringify({ + email: 'docs@iterable.com', + eventName: 'smsSend', + dataFields: { + toPhoneNumber: '+16503926753', + fromSMSSenderId: 258, + contentId: 2086, + email: 'docs@iterable.com', + createdAt: '2016-12-05 21:50:32 +00:00', + campaignId: 73974, + templateId: 112523, + smsMessage: 'Message text', + campaignName: 'My campaign name', + workflowId: null, + workflowName: null, + templateName: 'My template name', + channelId: 4270, + messageTypeId: 4769, + experimentId: null, + fromPhoneNumberId: 258, + imageUrl: null, + locale: null, + emailId: 'c73974:t112523:docs@iterable.com', + }, + }), }, + source: {}, }, ], method: 'POST', @@ -1928,20 +2069,25 @@ export const data = [ name: 'iterable', description: 'test-26', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - email: 'docs@iterable.com', - eventName: 'smsSendSkip', - dataFields: { - createdAt: '2019-08-07 18:49:48 +00:00', - reason: 'DuplicateMarketingMessage', - campaignId: 729390, - messageId: '2c780bf42f26485db0fc6571d2e0f6a0', - email: 'docs@iterable.com', + request: { + body: JSON.stringify({ + email: 'docs@iterable.com', + eventName: 'smsSendSkip', + dataFields: { + createdAt: '2019-08-07 18:49:48 +00:00', + reason: 'DuplicateMarketingMessage', + campaignId: 729390, + messageId: '2c780bf42f26485db0fc6571d2e0f6a0', + email: 'docs@iterable.com', + }, + }), }, + source: {}, }, ], method: 'POST', @@ -1986,34 +2132,39 @@ export const data = [ name: 'iterable', description: 'test-27', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - email: 'docs@iterable.com', - eventName: 'emailSend', - dataFields: { - contentId: 274222, - email: 'docs@iterable.com', - createdAt: '2016-12-02 18:51:40 +00:00', - campaignId: 49313, - transactionalData: { - __comment: - 'transactionalData lists the fields contained in the dataFields property of the API call or event used to trigger the email, campaign, or workflow. transactionalData must contain no more than 12k characters in total.', - }, - templateId: 79190, - messageId: '210badf49fe54f2591d64ad0d055f4fb', - emailSubject: 'My subject', - campaignName: 'My campaign name', - workflowId: null, - workflowName: null, - templateName: 'My template name', - channelId: 3420, - messageTypeId: 3866, - experimentId: null, - emailId: 'c49313:t79190:docs@iterable.com', + request: { + body: JSON.stringify({ + email: 'docs@iterable.com', + eventName: 'emailSend', + dataFields: { + contentId: 274222, + email: 'docs@iterable.com', + createdAt: '2016-12-02 18:51:40 +00:00', + campaignId: 49313, + transactionalData: { + __comment: + 'transactionalData lists the fields contained in the dataFields property of the API call or event used to trigger the email, campaign, or workflow. transactionalData must contain no more than 12k characters in total.', + }, + templateId: 79190, + messageId: '210badf49fe54f2591d64ad0d055f4fb', + emailSubject: 'My subject', + campaignName: 'My campaign name', + workflowId: null, + workflowName: null, + templateName: 'My template name', + channelId: 3420, + messageTypeId: 3866, + experimentId: null, + emailId: 'c49313:t79190:docs@iterable.com', + }, + }), }, + source: {}, }, ], method: 'POST', @@ -2072,37 +2223,42 @@ export const data = [ name: 'iterable', description: 'test-28', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - email: 'docs@iterable.com', - eventName: 'webPushSend', - dataFields: { - campaignId: 723636, - browserToken: - 'cZn_inqLGPk:APA91bHsn5jo0-4V55RB38eCeLHj8ZXVJYciU7k6Kipbit3lrRlEe2Dt6bNzR4lSf6r2YNVdWY8l90hV0jmb_Y7y5ufcJ68xNI7wbsH6Q2jbEghA_Qo4kWbtu6A4NZN4gxc1xsEbyh7b', - contentId: 3681, - messageId: 'af4c726ae76b48c7871b6d0d7760d47c', - workflowName: 'My workflow name', - emailId: 'c723636:t1020396:docs@iterable.com', - locale: null, - webPushIcon: null, - templateId: 1020396, - labels: [], - createdAt: '2019-08-07 23:43:02 +00:00', - templateName: 'My template name', - webPushMessage: '', - messageTypeId: 9106, - webPushBody: null, - experimentId: null, - webPushClickAction: null, - campaignName: 'My campaign name', - workflowId: 53505, - channelId: 8539, - email: 'docs@iterable.com', + request: { + body: JSON.stringify({ + email: 'docs@iterable.com', + eventName: 'webPushSend', + dataFields: { + campaignId: 723636, + browserToken: + 'cZn_inqLGPk:APA91bHsn5jo0-4V55RB38eCeLHj8ZXVJYciU7k6Kipbit3lrRlEe2Dt6bNzR4lSf6r2YNVdWY8l90hV0jmb_Y7y5ufcJ68xNI7wbsH6Q2jbEghA_Qo4kWbtu6A4NZN4gxc1xsEbyh7b', + contentId: 3681, + messageId: 'af4c726ae76b48c7871b6d0d7760d47c', + workflowName: 'My workflow name', + emailId: 'c723636:t1020396:docs@iterable.com', + locale: null, + webPushIcon: null, + templateId: 1020396, + labels: [], + createdAt: '2019-08-07 23:43:02 +00:00', + templateName: 'My template name', + webPushMessage: '', + messageTypeId: 9106, + webPushBody: null, + experimentId: null, + webPushClickAction: null, + campaignName: 'My campaign name', + workflowId: 53505, + channelId: 8539, + email: 'docs@iterable.com', + }, + }), }, + source: {}, }, ], method: 'POST', @@ -2164,20 +2320,25 @@ export const data = [ name: 'iterable', description: 'test-29', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - email: 'docs@iterable.com', - eventName: 'webPushSendSkip', - dataFields: { - createdAt: '2019-08-07 23:43:48 +00:00', - reason: 'DuplicateMarketingMessage', - campaignId: 723636, - messageId: '4238c918b20a41dfbe9a910275b76f12', - email: 'docs@iterable.com', + request: { + body: JSON.stringify({ + email: 'docs@iterable.com', + eventName: 'webPushSendSkip', + dataFields: { + createdAt: '2019-08-07 23:43:48 +00:00', + reason: 'DuplicateMarketingMessage', + campaignId: 723636, + messageId: '4238c918b20a41dfbe9a910275b76f12', + email: 'docs@iterable.com', + }, + }), }, + source: {}, }, ], method: 'POST', diff --git a/test/integrations/sources/mailjet/data.ts b/test/integrations/sources/mailjet/data.ts index 2a8f3eaf460..cc66aedbd94 100644 --- a/test/integrations/sources/mailjet/data.ts +++ b/test/integrations/sources/mailjet/data.ts @@ -3,25 +3,30 @@ export const data = [ name: 'mailjet', description: 'MailJet email open event', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - event: 'open', - time: 1664443614, - MessageID: 94857068804950690, - Message_GUID: '54d6cdec-f659-4547-8926-13d9c4126b82', - email: 'test@rudderstack.com', - mj_campaign_id: 108760, - mj_contact_id: 399962859, - customcampaign: 'mj.nl=58424', - ip: '66.249.84.231', - geo: 'US', - agent: - 'Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0 (via ggpht.com GoogleImageProxy)', - CustomID: '', - Payload: '', + request: { + body: JSON.stringify({ + event: 'open', + time: 1664443614, + MessageID: 94857068804950690, + Message_GUID: '54d6cdec-f659-4547-8926-13d9c4126b82', + email: 'test@rudderstack.com', + mj_campaign_id: 108760, + mj_contact_id: 399962859, + customcampaign: 'mj.nl=58424', + ip: '66.249.84.231', + geo: 'US', + agent: + 'Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0 (via ggpht.com GoogleImageProxy)', + CustomID: '', + Payload: '', + }), + }, + source: {}, }, ], method: 'POST', @@ -69,23 +74,28 @@ export const data = [ name: 'mailjet', description: 'MailJet email bounce event where input event is of type ', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - event: 'bounce', - time: 1664444171, - MessageID: 55169098999352350, - Message_GUID: '447d7eab-3335-4aba-9a51-09454bc14b81', - email: 'test@rudderstack.com', - mj_campaign_id: 108892, - mj_contact_id: 373142816, - customcampaign: 'mj.nl=58486', - blocked: false, - hard_bounce: false, - error_related_to: 'system', - error: 'connection issue', + request: { + body: JSON.stringify({ + event: 'bounce', + time: 1664444171, + MessageID: 55169098999352350, + Message_GUID: '447d7eab-3335-4aba-9a51-09454bc14b81', + email: 'test@rudderstack.com', + mj_campaign_id: 108892, + mj_contact_id: 373142816, + customcampaign: 'mj.nl=58486', + blocked: false, + hard_bounce: false, + error_related_to: 'system', + error: 'connection issue', + }), + }, + source: {}, }, ], method: 'POST', @@ -110,7 +120,10 @@ export const data = [ integrations: { MailJet: false }, type: 'track', event: 'bounce', - properties: { customcampaign: 'mj.nl=58486', mj_campaign_id: 108892 }, + properties: { + customcampaign: 'mj.nl=58486', + mj_campaign_id: 108892, + }, originalTimestamp: '2022-09-29T09:36:11.000Z', userId: '5b6a3426dba2cb24e4f0aeec43bee9d7', }, @@ -125,21 +138,26 @@ export const data = [ name: 'mailjet', description: 'MailJet email sent event', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - event: 'sent', - time: 1664444171, - MessageID: 92886743924596480, - Message_GUID: '0230c73a-2b77-4aea-8ef2-ed15d0edc5fd', - email: 'test@rudderstack.com', - mj_campaign_id: 108892, - mj_contact_id: 372651182, - customcampaign: 'mj.nl=58486', - smtp_reply: - '250 2.0.0 OK DMARC:Quarantine 1664444171 u17-20020adfdd51000000b0022cc3f2bf13si3225188wrm.271 - gsmtp', + request: { + body: JSON.stringify({ + event: 'sent', + time: 1664444171, + MessageID: 92886743924596480, + Message_GUID: '0230c73a-2b77-4aea-8ef2-ed15d0edc5fd', + email: 'test@rudderstack.com', + mj_campaign_id: 108892, + mj_contact_id: 372651182, + customcampaign: 'mj.nl=58486', + smtp_reply: + '250 2.0.0 OK DMARC:Quarantine 1664444171 u17-20020adfdd51000000b0022cc3f2bf13si3225188wrm.271 - gsmtp', + }), + }, + source: {}, }, ], method: 'POST', @@ -164,7 +182,10 @@ export const data = [ integrations: { MailJet: false }, type: 'track', event: 'sent', - properties: { customcampaign: 'mj.nl=58486', mj_campaign_id: 108892 }, + properties: { + customcampaign: 'mj.nl=58486', + mj_campaign_id: 108892, + }, originalTimestamp: '2022-09-29T09:36:11.000Z', userId: '5b6a3426dba2cb24e4f0aeec43bee9d7', }, @@ -179,23 +200,28 @@ export const data = [ name: 'mailjet', description: 'MailJet email bounce event', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - event: 'bounce', - time: 1664444170, - MessageID: 56013522696710744, - Message_GUID: 'dbe4f0a3-4a5a-4784-a724-a9794d3c0444', - email: 'test@rudderstack.com', - mj_campaign_id: 108892, - mj_contact_id: 373142182, - customcampaign: 'mj.nl=58486', - blocked: false, - hard_bounce: false, - error_related_to: 'system', - error: 'connection issue', + request: { + body: JSON.stringify({ + event: 'bounce', + time: 1664444170, + MessageID: 56013522696710744, + Message_GUID: 'dbe4f0a3-4a5a-4784-a724-a9794d3c0444', + email: 'test@rudderstack.com', + mj_campaign_id: 108892, + mj_contact_id: 373142182, + customcampaign: 'mj.nl=58486', + blocked: false, + hard_bounce: false, + error_related_to: 'system', + error: 'connection issue', + }), + }, + source: {}, }, ], method: 'POST', @@ -220,7 +246,10 @@ export const data = [ integrations: { MailJet: false }, type: 'track', event: 'bounce', - properties: { customcampaign: 'mj.nl=58486', mj_campaign_id: 108892 }, + properties: { + customcampaign: 'mj.nl=58486', + mj_campaign_id: 108892, + }, originalTimestamp: '2022-09-29T09:36:10.000Z', userId: '5b6a3426dba2cb24e4f0aeec43bee9d7', }, @@ -235,23 +264,28 @@ export const data = [ name: 'mailjet', description: 'MailJet when no email is present', module: 'source', - version: 'v0', + version: 'v2', skipGo: 'FIXME', input: { request: { body: [ { - event: 'bounce', - time: 1664444170, - MessageID: 56013522696710744, - Message_GUID: 'dbe4f0a3-4a5a-4784-a724-a9794d3c0444', - mj_campaign_id: 108892, - mj_contact_id: 373142182, - customcampaign: 'mj.nl=58486', - blocked: false, - hard_bounce: false, - error_related_to: 'system', - error: 'connection issue', + request: { + body: JSON.stringify({ + event: 'bounce', + time: 1664444170, + MessageID: 56013522696710744, + Message_GUID: 'dbe4f0a3-4a5a-4784-a724-a9794d3c0444', + mj_campaign_id: 108892, + mj_contact_id: 373142182, + customcampaign: 'mj.nl=58486', + blocked: false, + hard_bounce: false, + error_related_to: 'system', + error: 'connection issue', + }), + }, + source: {}, }, ], method: 'POST', @@ -275,7 +309,10 @@ export const data = [ integrations: { MailJet: false }, type: 'track', event: 'bounce', - properties: { customcampaign: 'mj.nl=58486', mj_campaign_id: 108892 }, + properties: { + customcampaign: 'mj.nl=58486', + mj_campaign_id: 108892, + }, originalTimestamp: '2022-09-29T09:36:10.000Z', }, ], @@ -289,37 +326,47 @@ export const data = [ name: 'mailjet', description: 'MailJet Multiple payloads in single request', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - event: 'open', - time: 1704458040, - MessageID: 987654, - Message_GUID: '876r-oihugyf-7tfygh', - email: 'abc@r.com', - mj_campaign_id: 321, - mj_contact_id: 123, - customcampaign: 'test_campaign', - url: 'https://www.example.com/', - ip: 'ip_info', - geo: 'some geo info', - agent: 'mailjet api test', + request: { + body: JSON.stringify({ + event: 'open', + time: 1704458040, + MessageID: 987654, + Message_GUID: '876r-oihugyf-7tfygh', + email: 'abc@r.com', + mj_campaign_id: 321, + mj_contact_id: 123, + customcampaign: 'test_campaign', + url: 'https://www.example.com/', + ip: 'ip_info', + geo: 'some geo info', + agent: 'mailjet api test', + }), + }, + source: {}, }, { - event: 'click', - time: 1704458041, - MessageID: 12345234567, - Message_GUID: '12345-kjhgfd-2efv', - email: 'abc@r.com', - mj_campaign_id: 12, - mj_contact_id: 32532, - customcampaign: 'test_campaign', - url: 'https://www.example.com/', - ip: 'ip_info', - geo: 'some geo info', - agent: 'mailjet api test', + request: { + body: JSON.stringify({ + event: 'click', + time: 1704458041, + MessageID: 12345234567, + Message_GUID: '12345-kjhgfd-2efv', + email: 'abc@r.com', + mj_campaign_id: 12, + mj_contact_id: 32532, + customcampaign: 'test_campaign', + url: 'https://www.example.com/', + ip: 'ip_info', + geo: 'some geo info', + agent: 'mailjet api test', + }), + }, + source: {}, }, ], method: 'POST', diff --git a/test/integrations/sources/mailmodo/data.ts b/test/integrations/sources/mailmodo/data.ts index aa34363831c..0b6d857dcf0 100644 --- a/test/integrations/sources/mailmodo/data.ts +++ b/test/integrations/sources/mailmodo/data.ts @@ -3,21 +3,26 @@ export const data = [ name: 'mailmodo', description: 'test-0', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - triggerData: { - data: {}, - triggerSource: 'CsvList', - email: 'gouhgc@mailmodo.com', - triggerDetails: - 'file:1a69df39hfbfg4e0b-8b5c-73776157aa37/7647792f-4ebc-4f9d-ac79-05fb0356137e', - userId: 'd3775892hvh4f2f-b9d5-e49810eb2cae', - journeyId: '1a69df39hgvh4e0b-8b5c-73776157aa37', - eventProperty: {}, + request: { + body: JSON.stringify({ + triggerData: { + data: {}, + triggerSource: 'CsvList', + email: 'gouhgc@mailmodo.com', + triggerDetails: + 'file:1a69df39hfbfg4e0b-8b5c-73776157aa37/7647792f-4ebc-4f9d-ac79-05fb0356137e', + userId: 'd3775892hvh4f2f-b9d5-e49810eb2cae', + journeyId: '1a69df39hgvh4e0b-8b5c-73776157aa37', + eventProperty: {}, + }, + }), }, + source: {}, }, ], method: 'POST', @@ -36,7 +41,10 @@ export const data = [ anonymousId: 'f43848cce166e51b097cbed2851adc16ed9d4c341928f1c790215c50cefb59b0', context: { externalId: [ - { id: 'd3775892hvh4f2f-b9d5-e49810eb2cae', type: 'mailmodoUserId' }, + { + id: 'd3775892hvh4f2f-b9d5-e49810eb2cae', + type: 'mailmodoUserId', + }, ], traits: { email: 'gouhgc@mailmodo.com' }, integration: { name: 'Mailmodo', version: '1.0.0' }, @@ -63,27 +71,37 @@ export const data = [ name: 'mailmodo', description: 'test-1', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - fuuid: '27905', - 'next-step-id': 'success', - 'total-steps': '3', - responseId: 'b9a5d224-cc5a-4e64-9800-5a3db9515fdf', - recipientEmail: 'test.rudderlabs21997@gmail.com', - formId: 'formosztd5', - recordedAt: { ts: 1662695704, date: '2022-09-09', hour: 9, minute: 25 }, - submissionSource: 'amp', - elementjbtz42: 'Everything ', - element8jzo13: ['Reliable', 'High Quality', 'Useful'], - recipientData: { email: 'test.rudderlabs21997@gmail.com' }, - recommend: '9', - liking: 'upvote', - satisfaction: '4', - campaignId: '0b53e1bf-84ae-4198-9184-8a4d6e1fa3dd', - campaignName: 'Campaign-testing', + request: { + body: JSON.stringify({ + fuuid: '27905', + 'next-step-id': 'success', + 'total-steps': '3', + responseId: 'b9a5d224-cc5a-4e64-9800-5a3db9515fdf', + recipientEmail: 'test.rudderlabs21997@gmail.com', + formId: 'formosztd5', + recordedAt: { + ts: 1662695704, + date: '2022-09-09', + hour: 9, + minute: 25, + }, + submissionSource: 'amp', + elementjbtz42: 'Everything ', + element8jzo13: ['Reliable', 'High Quality', 'Useful'], + recipientData: { email: 'test.rudderlabs21997@gmail.com' }, + recommend: '9', + liking: 'upvote', + satisfaction: '4', + campaignId: '0b53e1bf-84ae-4198-9184-8a4d6e1fa3dd', + campaignName: 'Campaign-testing', + }), + }, + source: {}, }, ], method: 'POST', @@ -138,19 +156,24 @@ export const data = [ name: 'mailmodo', description: 'test-2', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - triggerData: { - data: {}, - triggerSource: 'Manual Add To List', - email: 'gou****@mailmodo.com', - userId: 'd3775892-****-4f2f-b9d5-e49810eb2cae', - journeyId: '349e986e-f56c-****-bc3b-b5f13c3e34da', - eventProperty: {}, + request: { + body: JSON.stringify({ + triggerData: { + data: {}, + triggerSource: 'Manual Add To List', + email: 'gou****@mailmodo.com', + userId: 'd3775892-****-4f2f-b9d5-e49810eb2cae', + journeyId: '349e986e-f56c-****-bc3b-b5f13c3e34da', + eventProperty: {}, + }, + }), }, + source: {}, }, ], method: 'POST', @@ -169,7 +192,10 @@ export const data = [ anonymousId: '26c9ad4b531287858155ffa834be13dddc2c45df6e29af7230408953d732dd92', context: { externalId: [ - { id: 'd3775892-****-4f2f-b9d5-e49810eb2cae', type: 'mailmodoUserId' }, + { + id: 'd3775892-****-4f2f-b9d5-e49810eb2cae', + type: 'mailmodoUserId', + }, ], traits: { email: 'gou****@mailmodo.com' }, integration: { name: 'Mailmodo', version: '1.0.0' }, @@ -194,19 +220,24 @@ export const data = [ name: 'mailmodo', description: 'test-3', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - triggerData: { - data: {}, - triggerSource: 'Dashboard-change in property: first_name', - email: 'gou****@mailmodo.com', - userId: 'cc56708d-****-****-8c07-a4bfa5a7b79b', - journeyId: 'a78d7221-de34-47d8-81c6-5ad70cf4ee38', - eventProperty: {}, + request: { + body: JSON.stringify({ + triggerData: { + data: {}, + triggerSource: 'Dashboard-change in property: first_name', + email: 'gou****@mailmodo.com', + userId: 'cc56708d-****-****-8c07-a4bfa5a7b79b', + journeyId: 'a78d7221-de34-47d8-81c6-5ad70cf4ee38', + eventProperty: {}, + }, + }), }, + source: {}, }, ], method: 'POST', @@ -225,7 +256,10 @@ export const data = [ anonymousId: '26c9ad4b531287858155ffa834be13dddc2c45df6e29af7230408953d732dd92', context: { externalId: [ - { id: 'cc56708d-****-****-8c07-a4bfa5a7b79b', type: 'mailmodoUserId' }, + { + id: 'cc56708d-****-****-8c07-a4bfa5a7b79b', + type: 'mailmodoUserId', + }, ], traits: { email: 'gou****@mailmodo.com' }, integration: { name: 'Mailmodo', version: '1.0.0' }, @@ -250,31 +284,41 @@ export const data = [ name: 'mailmodo', description: 'test-4', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - triggerData: { - data: {}, - formSubmissionData: { - element6ehxt3: 'Te**', - element6jkcy4: 'Bang****', - fuuid: '47949', - 'next-step-id': 'step7tr7n2', - 'total-steps': '3', - responseId: '4a8bfda7-****-4a8c-9cd1-a30d30a6dab9', - recipientEmail: 'gou****@mailmodo.com', - formId: 'formmqxnu2', - recordedAt: { ts: 1657097786, date: '2022-07-06', hour: 14, minute: 26 }, - submissionSource: 'amp', - }, - email: 'gou****@mailmodo.com', - triggerSource: 'form submission', - userId: '11bff3e8-****-4e93-a533-fd8f9defc768', - journeyId: '03664747-****-412e-8790-de9e9abe96a5', - eventProperty: {}, + request: { + body: JSON.stringify({ + triggerData: { + data: {}, + formSubmissionData: { + element6ehxt3: 'Te**', + element6jkcy4: 'Bang****', + fuuid: '47949', + 'next-step-id': 'step7tr7n2', + 'total-steps': '3', + responseId: '4a8bfda7-****-4a8c-9cd1-a30d30a6dab9', + recipientEmail: 'gou****@mailmodo.com', + formId: 'formmqxnu2', + recordedAt: { + ts: 1657097786, + date: '2022-07-06', + hour: 14, + minute: 26, + }, + submissionSource: 'amp', + }, + email: 'gou****@mailmodo.com', + triggerSource: 'form submission', + userId: '11bff3e8-****-4e93-a533-fd8f9defc768', + journeyId: '03664747-****-412e-8790-de9e9abe96a5', + eventProperty: {}, + }, + }), }, + source: {}, }, ], method: 'POST', @@ -293,7 +337,10 @@ export const data = [ anonymousId: '26c9ad4b531287858155ffa834be13dddc2c45df6e29af7230408953d732dd92', context: { externalId: [ - { id: '11bff3e8-****-4e93-a533-fd8f9defc768', type: 'mailmodoUserId' }, + { + id: '11bff3e8-****-4e93-a533-fd8f9defc768', + type: 'mailmodoUserId', + }, ], traits: { email: 'gou****@mailmodo.com' }, integration: { name: 'Mailmodo', version: '1.0.0' }, @@ -328,25 +375,30 @@ export const data = [ name: 'mailmodo', description: 'test-5', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - triggerData: { - data: {}, - eventProperty: { - Name: 'APPLE iPhone 13 (Blue, 128 GB)', - Category: 'Mobiles', - 'Is Purchased': 'false', - Price: '829', - Currency: 'USD', - }, - triggerSource: 'New Custom Event Trigger - Product Viewed', - email: 'gou****@mailmodo.com', - userId: 'd3775892-****-4f2f-b9d5-e49810eb2cae', - journeyId: '3f135bf7-****-4e31-b265-f61cfe1bd423', + request: { + body: JSON.stringify({ + triggerData: { + data: {}, + eventProperty: { + Name: 'APPLE iPhone 13 (Blue, 128 GB)', + Category: 'Mobiles', + 'Is Purchased': 'false', + Price: '829', + Currency: 'USD', + }, + triggerSource: 'New Custom Event Trigger - Product Viewed', + email: 'gou****@mailmodo.com', + userId: 'd3775892-****-4f2f-b9d5-e49810eb2cae', + journeyId: '3f135bf7-****-4e31-b265-f61cfe1bd423', + }, + }), }, + source: {}, }, ], method: 'POST', @@ -365,7 +417,10 @@ export const data = [ anonymousId: '26c9ad4b531287858155ffa834be13dddc2c45df6e29af7230408953d732dd92', context: { externalId: [ - { id: 'd3775892-****-4f2f-b9d5-e49810eb2cae', type: 'mailmodoUserId' }, + { + id: 'd3775892-****-4f2f-b9d5-e49810eb2cae', + type: 'mailmodoUserId', + }, ], traits: { email: 'gou****@mailmodo.com' }, integration: { name: 'Mailmodo', version: '1.0.0' }, @@ -395,19 +450,24 @@ export const data = [ name: 'mailmodo', description: 'test-6', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - triggerData: { - email: 'gou****@mailmodo.com', - data: {}, - userId: 'd3775892-****-4f2f-b9d5-e49810eb2cae', - journeyId: 'b1ee6bf6-****-4b5a-b7b5-0637853cd8c3', - triggerSource: 'Api', - eventProperty: {}, + request: { + body: JSON.stringify({ + triggerData: { + email: 'gou****@mailmodo.com', + data: {}, + userId: 'd3775892-****-4f2f-b9d5-e49810eb2cae', + journeyId: 'b1ee6bf6-****-4b5a-b7b5-0637853cd8c3', + triggerSource: 'Api', + eventProperty: {}, + }, + }), }, + source: {}, }, ], method: 'POST', @@ -426,7 +486,10 @@ export const data = [ anonymousId: '26c9ad4b531287858155ffa834be13dddc2c45df6e29af7230408953d732dd92', context: { externalId: [ - { id: 'd3775892-****-4f2f-b9d5-e49810eb2cae', type: 'mailmodoUserId' }, + { + id: 'd3775892-****-4f2f-b9d5-e49810eb2cae', + type: 'mailmodoUserId', + }, ], traits: { email: 'gou****@mailmodo.com' }, integration: { name: 'Mailmodo', version: '1.0.0' }, @@ -451,24 +514,29 @@ export const data = [ name: 'mailmodo', description: 'test-7', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - eventData: { type: 'html' }, - triggerData: { - data: {}, - triggerSource: 'CsvList', - email: 'gou****@mailmodo.com', - triggerDetails: - 'file:5d31c2b4-****-4a84-acd3-834cae80231b/5a61e0b8-b6f6-4d7d-abf2-90357d6638af', - userId: 'cc56708d-****-4fea-8c07-a4bfa5a7b79b', - journeyId: '5d31c2b4-****-4a84-acd3-834cae80231b', - eventProperty: {}, + request: { + body: JSON.stringify({ + eventData: { type: 'html' }, + triggerData: { + data: {}, + triggerSource: 'CsvList', + email: 'gou****@mailmodo.com', + triggerDetails: + 'file:5d31c2b4-****-4a84-acd3-834cae80231b/5a61e0b8-b6f6-4d7d-abf2-90357d6638af', + userId: 'cc56708d-****-4fea-8c07-a4bfa5a7b79b', + journeyId: '5d31c2b4-****-4a84-acd3-834cae80231b', + eventProperty: {}, + }, + lastCampaignEmailRef: '064c76e7-****-4780-a001-226c066aaa12', + lastCampaignId: '31422f76-****-4a72-a630-dd6f9f615bc3', + }), }, - lastCampaignEmailRef: '064c76e7-****-4780-a001-226c066aaa12', - lastCampaignId: '31422f76-****-4a72-a630-dd6f9f615bc3', + source: {}, }, ], method: 'POST', @@ -487,7 +555,10 @@ export const data = [ anonymousId: '26c9ad4b531287858155ffa834be13dddc2c45df6e29af7230408953d732dd92', context: { externalId: [ - { id: 'cc56708d-****-4fea-8c07-a4bfa5a7b79b', type: 'mailmodoUserId' }, + { + id: 'cc56708d-****-4fea-8c07-a4bfa5a7b79b', + type: 'mailmodoUserId', + }, ], traits: { email: 'gou****@mailmodo.com' }, integration: { name: 'Mailmodo', version: '1.0.0' }, @@ -517,27 +588,37 @@ export const data = [ name: 'mailmodo', description: 'test-8', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - fuuid: '98255', - 'next-step-id': 'success', - 'total-steps': '3', - responseId: 'ad20a980-4fce-44b6-887d-2236df514a76', - recipientEmail: 'test@rudderstack.com', - formId: 'formosztd5', - recordedAt: { ts: 1662695887, date: '2022-09-09', hour: 9, minute: 28 }, - submissionSource: 'amp', - elementjbtz42: 'peace', - element8jzo13: ['Useful'], - recipientData: { email: 'test@rudderstack.com', first_name: 'abcda' }, - recommend: '1', - liking: 'downvote', - satisfaction: '1', - campaignId: '0b53e1bf-84ae-4198-9184-8a4d6e1fa3dd', - campaignName: 'Campaign-testing', + request: { + body: JSON.stringify({ + fuuid: '98255', + 'next-step-id': 'success', + 'total-steps': '3', + responseId: 'ad20a980-4fce-44b6-887d-2236df514a76', + recipientEmail: 'test@rudderstack.com', + formId: 'formosztd5', + recordedAt: { + ts: 1662695887, + date: '2022-09-09', + hour: 9, + minute: 28, + }, + submissionSource: 'amp', + elementjbtz42: 'peace', + element8jzo13: ['Useful'], + recipientData: { email: 'test@rudderstack.com', first_name: 'abcda' }, + recommend: '1', + liking: 'downvote', + satisfaction: '1', + campaignId: '0b53e1bf-84ae-4198-9184-8a4d6e1fa3dd', + campaignName: 'Campaign-testing', + }), + }, + source: {}, }, ], method: 'POST', @@ -557,7 +638,10 @@ export const data = [ context: { integration: { name: 'Mailmodo', version: '1.0.0' }, library: { name: 'unknown', version: 'unknown' }, - traits: { email: 'test@rudderstack.com', first_name: 'abcda' }, + traits: { + email: 'test@rudderstack.com', + first_name: 'abcda', + }, }, event: 'Form Submitted', integrations: { Mailmodo: false }, diff --git a/test/integrations/sources/moengage/data.ts b/test/integrations/sources/moengage/data.ts index c307959121f..50c127f4830 100644 --- a/test/integrations/sources/moengage/data.ts +++ b/test/integrations/sources/moengage/data.ts @@ -1,132 +1,126 @@ -const data = [ +export const data = [ { name: 'moengage', description: 'Simple track call', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - anonymousId: '4eb021e9-a2af-4926-ae82-fe996d12f3c5', - channel: 'web', - context: { - timezone: 'Wrong/Timezone', - app: { - build: '1.0.0', - name: 'RudderLabs JavaScript SDK', - namespace: 'com.rudderlabs.javascript', - version: '1.1.6', - }, - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.1.6', - }, - locale: 'en-GB', - os: { - name: '', - version: '', - }, - page: { - path: '/testing/script-test.html', - referrer: '', - search: '', - title: '', - url: 'http://localhost:3243/testing/script-test.html', - }, - screen: { - density: 2, - }, - traits: { - company: { - id: 'abc123', - }, - createdAt: 'Thu Mar 24 2016 17:46:45 GMT+0000 (UTC)', - email: 'rudderTest@gmail.com', - name: 'Rudder Test', - plan: 'Enterprise', - }, - 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', - }, - event: 'Order Completed', - integrations: { - All: true, - }, - messageId: 'a0adfab9-baf7-4e09-a2ce-bbe2844c324a', - originalTimestamp: '2020-10-16T08:10:12.782Z', - properties: { - checkout_id: 'what is checkout id here??', - coupon: 'APPARELSALE', - currency: 'GBP', - order_id: 'transactionId', - products: [ - { - brand: '', - category: 'Merch', - currency: 'GBP', - image_url: 'https://www.example.com/product/bacon-jam.jpg', - name: 'Food/Drink', - position: 1, - price: 3, - product_id: 'product-bacon-jam', - quantity: 2, - sku: 'sku-1', - typeOfProduct: 'Food', - url: 'https://www.example.com/product/bacon-jam', - value: 6, - variant: 'Extra topped', - }, - { - brand: 'Levis', - category: 'Merch', - currency: 'GBP', - image_url: 'https://www.example.com/product/t-shirt.jpg', - name: 'T-Shirt', - position: 2, - price: 12.99, - product_id: 'product-t-shirt', - quantity: 1, - sku: 'sku-2', - typeOfProduct: 'Shirt', - url: 'https://www.example.com/product/t-shirt', - value: 12.99, - variant: 'White', + request: { + body: JSON.stringify({ + anonymousId: '4eb021e9-a2af-4926-ae82-fe996d12f3c5', + channel: 'web', + context: { + timezone: 'Wrong/Timezone', + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.6', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.6', + }, + locale: 'en-GB', + os: { name: '', version: '' }, + page: { + path: '/testing/script-test.html', + referrer: '', + search: '', + title: '', + url: 'http://localhost:3243/testing/script-test.html', + }, + screen: { density: 2 }, + traits: { + company: { id: 'abc123' }, + createdAt: 'Thu Mar 24 2016 17:46:45 GMT+0000 (UTC)', + email: 'rudderTest@gmail.com', + name: 'Rudder Test', + plan: 'Enterprise', + }, + 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', }, - { - brand: 'Levis', - category: 'Merch', + event: 'Order Completed', + integrations: { All: true }, + messageId: 'a0adfab9-baf7-4e09-a2ce-bbe2844c324a', + originalTimestamp: '2020-10-16T08:10:12.782Z', + properties: { + checkout_id: 'what is checkout id here??', coupon: 'APPARELSALE', currency: 'GBP', - image_url: 'https://www.example.com/product/offer-t-shirt.jpg', - name: 'T-Shirt-on-offer', - position: 1, - price: 12.99, - product_id: 'offer-t-shirt', - quantity: 1, - sku: 'sku-3', - typeOfProduct: 'Shirt', - url: 'https://www.example.com/product/offer-t-shirt', - value: 12.99, - variant: 'Black', + order_id: 'transactionId', + products: [ + { + brand: '', + category: 'Merch', + currency: 'GBP', + image_url: 'https://www.example.com/product/bacon-jam.jpg', + name: 'Food/Drink', + position: 1, + price: 3, + product_id: 'product-bacon-jam', + quantity: 2, + sku: 'sku-1', + typeOfProduct: 'Food', + url: 'https://www.example.com/product/bacon-jam', + value: 6, + variant: 'Extra topped', + }, + { + brand: 'Levis', + category: 'Merch', + currency: 'GBP', + image_url: 'https://www.example.com/product/t-shirt.jpg', + name: 'T-Shirt', + position: 2, + price: 12.99, + product_id: 'product-t-shirt', + quantity: 1, + sku: 'sku-2', + typeOfProduct: 'Shirt', + url: 'https://www.example.com/product/t-shirt', + value: 12.99, + variant: 'White', + }, + { + brand: 'Levis', + category: 'Merch', + coupon: 'APPARELSALE', + currency: 'GBP', + image_url: 'https://www.example.com/product/offer-t-shirt.jpg', + name: 'T-Shirt-on-offer', + position: 1, + price: 12.99, + product_id: 'offer-t-shirt', + quantity: 1, + sku: 'sku-3', + typeOfProduct: 'Shirt', + url: 'https://www.example.com/product/offer-t-shirt', + value: 12.99, + variant: 'Black', + }, + ], + revenue: 31.98, + shipping: 4, + value: 31.98, }, - ], - revenue: 31.98, - shipping: 4, - value: 31.98, + receivedAt: '2020-10-16T13:40:12.792+05:30', + request_ip: '[::1]', + sentAt: '2020-10-16T08:10:12.783Z', + timestamp: '2020-10-16T13:40:12.791+05:30', + type: 'track', + userId: 'rudder123', + }), }, - receivedAt: '2020-10-16T13:40:12.792+05:30', - request_ip: '[::1]', - sentAt: '2020-10-16T08:10:12.783Z', - timestamp: '2020-10-16T13:40:12.791+05:30', - type: 'track', - userId: 'rudder123', + source: {}, }, ], method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, + headers: { 'Content-Type': 'application/json' }, }, pathSuffix: '', }, @@ -153,10 +147,7 @@ const data = [ version: '1.1.6', }, locale: 'en-GB', - os: { - name: '', - version: '', - }, + os: { name: '', version: '' }, page: { path: '/testing/script-test.html', referrer: '', @@ -164,13 +155,9 @@ 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,9 +167,7 @@ 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: { @@ -263,204 +248,196 @@ const data = [ name: 'moengage', description: 'Batch of events', module: 'source', - version: 'v0', + version: 'v2', overrideReceivedAt: true, overrideRequestIP: true, input: { request: { body: [ { - batch: [ - { - type: 'page', - event: 'home', - sentAt: '2020-11-12T21:12:54.117Z', - userId: 'sajal', - channel: 'mobile', - context: { - traits: {}, - library: { - name: 'rudder-sdk-ruby-sync', - version: '1.0.7', - }, - page: { - path: '/Rectified.html', - referrer: 'http://localhost:1112/', - search: '', - title: '', - url: 'http://localhost:1112/Rectified.html', - }, - userAgent: - 'Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.3.0.QFKINXM)', - }, - rudderId: 'asdfasdfsadf', - properties: { - name: 'asdfsadf', - }, - timestamp: '2020-11-12T21:12:41.320Z', - anonymousId: '123123123123', - }, - { - anonymousId: '4eb021e9-a2af-4926-ae82-fe996d12f3c5', - channel: 'web', - context: { - timezone: 'Asia/Tokyo', - app: { - build: '1.0.0', - name: 'RudderLabs JavaScript SDK', - namespace: 'com.rudderlabs.javascript', - version: '1.1.6', - }, - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.1.6', - }, - locale: 'en-GB', - os: { - name: '', - version: '', - }, - page: { - path: '/testing/script-test.html', - referrer: '', - search: '', - title: '', - url: 'http://localhost:3243/testing/script-test.html', - }, - screen: { - density: 2, - }, - traits: { - company: { - id: 'abc123', + request: { + body: JSON.stringify({ + batch: [ + { + type: 'page', + event: 'home', + sentAt: '2020-11-12T21:12:54.117Z', + userId: 'sajal', + channel: 'mobile', + context: { + traits: {}, + library: { + name: 'rudder-sdk-ruby-sync', + version: '1.0.7', + }, + page: { + path: '/Rectified.html', + referrer: 'http://localhost:1112/', + search: '', + title: '', + url: 'http://localhost:1112/Rectified.html', + }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.3.0.QFKINXM)', }, - createdAt: 'Thu Mar 24 2016 17:46:45 GMT+0000 (UTC)', - email: 'rudderTest@gmail.com', - name: 'Rudder Test', - plan: 'Enterprise', + rudderId: 'asdfasdfsadf', + properties: { name: 'asdfsadf' }, + timestamp: '2020-11-12T21:12:41.320Z', + anonymousId: '123123123123', }, - 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', - }, - event: 'Order Completed', - integrations: { - All: true, - }, - messageId: 'a0adfab9-baf7-4e09-a2ce-bbe2844c324a', - originalTimestamp: '2020-10-16T08:10:12.782Z', - properties: { - checkout_id: 'what is checkout id here??', - coupon: 'APPARELSALE', - currency: 'GBP', - order_id: 'transactionId', - category: 'some category', - originalArray: [ - { - nested_field: 'nested value', - tags: ['tag_1', 'tag_2', 'tag_3'], - }, - { - nested_field: 'nested value', - tags: ['tag_1', 'tag_2', 'tag_3'], - }, - { - nested_field: 'nested value', - tags: ['tag_1', 'tag_2', 'tag_3'], - }, - { - nested_field: 'nested value', - tags: ['tag_1', 'tag_2', 'tag_3'], - }, - { - nested_field: 'nested value', - tags: ['tag_1', 'tag_2', 'tag_3'], - }, - { - nested_field: 'nested value', - tags: ['tag_1', 'tag_2', 'tag_3'], - }, - { - nested_field: 'nested value', - tags: ['tag_1', 'tag_2', 'tag_3'], - }, - { - nested_field: 'nested value', - tags: ['tag_1', 'tag_2', 'tag_3'], - }, - { - nested_field: 'nested value', - tags: ['tag_1', 'tag_2', 'tag_3'], - }, - ], - products: [ - { - brand: '', - category: 'Merch', - currency: 'GBP', - image_url: 'https://www.example.com/product/bacon-jam.jpg', - name: 'Food/Drink', - position: 1, - price: 3, - product_id: 'product-bacon-jam', - quantity: 2, - sku: 'sku-1', - typeOfProduct: 'Food', - url: 'https://www.example.com/product/bacon-jam', - value: 6, - variant: 'Extra topped', - }, - { - brand: 'Levis', - category: 'Merch', - currency: 'GBP', - image_url: 'https://www.example.com/product/t-shirt.jpg', - name: 'T-Shirt', - position: 2, - price: 12.99, - product_id: 'product-t-shirt', - quantity: 1, - sku: 'sku-2', - typeOfProduct: 'Shirt', - url: 'https://www.example.com/product/t-shirt', - value: 12.99, - variant: 'White', + { + anonymousId: '4eb021e9-a2af-4926-ae82-fe996d12f3c5', + channel: 'web', + context: { + timezone: 'Asia/Tokyo', + app: { + build: '1.0.0', + name: 'RudderLabs JavaScript SDK', + namespace: 'com.rudderlabs.javascript', + version: '1.1.6', + }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.1.6', + }, + locale: 'en-GB', + os: { name: '', version: '' }, + page: { + path: '/testing/script-test.html', + referrer: '', + search: '', + title: '', + url: 'http://localhost:3243/testing/script-test.html', + }, + screen: { density: 2 }, + traits: { + company: { id: 'abc123' }, + createdAt: 'Thu Mar 24 2016 17:46:45 GMT+0000 (UTC)', + email: 'rudderTest@gmail.com', + name: 'Rudder Test', + plan: 'Enterprise', + }, + 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', }, - { - brand: 'Levis', - category: 'Merch', + event: 'Order Completed', + integrations: { All: true }, + messageId: 'a0adfab9-baf7-4e09-a2ce-bbe2844c324a', + originalTimestamp: '2020-10-16T08:10:12.782Z', + properties: { + checkout_id: 'what is checkout id here??', coupon: 'APPARELSALE', currency: 'GBP', - image_url: 'https://www.example.com/product/offer-t-shirt.jpg', - name: 'T-Shirt-on-offer', - position: 1, - price: 12.99, - product_id: 'offer-t-shirt', - quantity: 1, - sku: 'sku-3', - typeOfProduct: 'Shirt', - url: 'https://www.example.com/product/offer-t-shirt', - value: 12.99, - variant: 'Black', + order_id: 'transactionId', + category: 'some category', + originalArray: [ + { + nested_field: 'nested value', + tags: ['tag_1', 'tag_2', 'tag_3'], + }, + { + nested_field: 'nested value', + tags: ['tag_1', 'tag_2', 'tag_3'], + }, + { + nested_field: 'nested value', + tags: ['tag_1', 'tag_2', 'tag_3'], + }, + { + nested_field: 'nested value', + tags: ['tag_1', 'tag_2', 'tag_3'], + }, + { + nested_field: 'nested value', + tags: ['tag_1', 'tag_2', 'tag_3'], + }, + { + nested_field: 'nested value', + tags: ['tag_1', 'tag_2', 'tag_3'], + }, + { + nested_field: 'nested value', + tags: ['tag_1', 'tag_2', 'tag_3'], + }, + { + nested_field: 'nested value', + tags: ['tag_1', 'tag_2', 'tag_3'], + }, + { + nested_field: 'nested value', + tags: ['tag_1', 'tag_2', 'tag_3'], + }, + ], + products: [ + { + brand: '', + category: 'Merch', + currency: 'GBP', + image_url: 'https://www.example.com/product/bacon-jam.jpg', + name: 'Food/Drink', + position: 1, + price: 3, + product_id: 'product-bacon-jam', + quantity: 2, + sku: 'sku-1', + typeOfProduct: 'Food', + url: 'https://www.example.com/product/bacon-jam', + value: 6, + variant: 'Extra topped', + }, + { + brand: 'Levis', + category: 'Merch', + currency: 'GBP', + image_url: 'https://www.example.com/product/t-shirt.jpg', + name: 'T-Shirt', + position: 2, + price: 12.99, + product_id: 'product-t-shirt', + quantity: 1, + sku: 'sku-2', + typeOfProduct: 'Shirt', + url: 'https://www.example.com/product/t-shirt', + value: 12.99, + variant: 'White', + }, + { + brand: 'Levis', + category: 'Merch', + coupon: 'APPARELSALE', + currency: 'GBP', + image_url: 'https://www.example.com/product/offer-t-shirt.jpg', + name: 'T-Shirt-on-offer', + position: 1, + price: 12.99, + product_id: 'offer-t-shirt', + quantity: 1, + sku: 'sku-3', + typeOfProduct: 'Shirt', + url: 'https://www.example.com/product/offer-t-shirt', + value: 12.99, + variant: 'Black', + }, + ], + revenue: 31.98, + shipping: 4, + value: 31.98, }, - ], - revenue: 31.98, - shipping: 4, - value: 31.98, - }, - receivedAt: '2020-10-16T13:40:12.792+05:30', - request_ip: '[::1]', - sentAt: '2020-10-16T08:10:12.783Z', - timestamp: '2020-10-16T13:40:12.791+05:30', - type: 'track', - userId: 'rudder123', - }, - ], + receivedAt: '2020-10-16T13:40:12.792+05:30', + request_ip: '[::1]', + sentAt: '2020-10-16T08:10:12.783Z', + timestamp: '2020-10-16T13:40:12.791+05:30', + type: 'track', + userId: 'rudder123', + }, + ], + }), + }, + source: {}, }, ], method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, + headers: { 'Content-Type': 'application/json' }, }, pathSuffix: '', }, @@ -479,10 +456,7 @@ const data = [ channel: 'mobile', context: { traits: {}, - library: { - name: 'rudder-sdk-ruby-sync', - version: '1.0.7', - }, + library: { name: 'rudder-sdk-ruby-sync', version: '1.0.7' }, page: { path: '/Rectified.html', referrer: 'http://localhost:1112/', @@ -494,9 +468,7 @@ const data = [ 'Dalvik/2.1.0 (Linux; U; Android 10; Redmi K20 Pro MIUI/V12.0.3.0.QFKINXM)', }, rudderId: 'asdfasdfsadf', - properties: { - name: 'asdfsadf', - }, + properties: { name: 'asdfsadf' }, timestamp: '2020-11-12T21:12:41.320Z', anonymousId: '123123123123', }, @@ -516,10 +488,7 @@ const data = [ version: '1.1.6', }, locale: 'en-GB', - os: { - name: '', - version: '', - }, + os: { name: '', version: '' }, page: { path: '/testing/script-test.html', referrer: '', @@ -527,13 +496,9 @@ 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', @@ -543,9 +508,7 @@ 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: { @@ -662,7 +625,3 @@ const data = [ }, }, ]; - -module.exports = { - data, -}; diff --git a/test/integrations/sources/monday/data.ts b/test/integrations/sources/monday/data.ts index 1bb26930901..a57794ca40d 100644 --- a/test/integrations/sources/monday/data.ts +++ b/test/integrations/sources/monday/data.ts @@ -3,28 +3,33 @@ export const data = [ name: 'monday', description: 'test-0', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - event: { - userId: 33556506, - originalTriggerUuid: null, - boardId: 3139815405, - pulseId: 3160188786, - pulseName: 'New Sprint Item', - groupId: 'topics', - groupName: 'Group Title', - groupColor: '#579bfc', - isTopGroup: true, - columnValues: {}, - app: 'monday', - type: 'create_pulse', - triggerTime: '2022-08-30T09:02:39.191Z', - subscriptionId: 150881106, - triggerUuid: '049869226bf6711705c62e301a2c3eee', + request: { + body: JSON.stringify({ + event: { + userId: 33556506, + originalTriggerUuid: null, + boardId: 3139815405, + pulseId: 3160188786, + pulseName: 'New Sprint Item', + groupId: 'topics', + groupName: 'Group Title', + groupColor: '#579bfc', + isTopGroup: true, + columnValues: {}, + app: 'monday', + type: 'create_pulse', + triggerTime: '2022-08-30T09:02:39.191Z', + subscriptionId: 150881106, + triggerUuid: '049869226bf6711705c62e301a2c3eee', + }, + }), }, + source: {}, }, ], method: 'POST', @@ -78,23 +83,28 @@ export const data = [ name: 'monday', description: 'test-1', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - event: { - userId: 33556506, - originalTriggerUuid: null, - boardId: 3139815405, - itemId: 3160188786, - itemName: 'New Sprint Item', - app: 'monday', - type: 'delete_pulse', - triggerTime: '2022-08-30T09:06:09.176Z', - subscriptionId: 150882006, - triggerUuid: '4e4f87c8255c4ba4ba2f5e9934cb6d40', + request: { + body: JSON.stringify({ + event: { + userId: 33556506, + originalTriggerUuid: null, + boardId: 3139815405, + itemId: 3160188786, + itemName: 'New Sprint Item', + app: 'monday', + type: 'delete_pulse', + triggerTime: '2022-08-30T09:06:09.176Z', + subscriptionId: 150882006, + triggerUuid: '4e4f87c8255c4ba4ba2f5e9934cb6d40', + }, + }), }, + source: {}, }, ], method: 'POST', @@ -143,39 +153,48 @@ export const data = [ name: 'monday', description: 'test-2', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - event: { - userId: 33556506, - originalTriggerUuid: null, - boardId: 3139815405, - groupId: 'topics', - pulseId: 3160181387, - pulseName: 'New Sprint Item', - columnId: 'status', - columnType: 'color', - columnTitle: 'Status', - value: { - label: { - index: 1, - text: 'Done', - style: { color: '#00c875', border: '#00B461', var_name: 'green-shadow' }, - is_done: true, + request: { + body: JSON.stringify({ + event: { + userId: 33556506, + originalTriggerUuid: null, + boardId: 3139815405, + groupId: 'topics', + pulseId: 3160181387, + pulseName: 'New Sprint Item', + columnId: 'status', + columnType: 'color', + columnTitle: 'Status', + value: { + label: { + index: 1, + text: 'Done', + style: { + color: '#00c875', + border: '#00B461', + var_name: 'green-shadow', + }, + is_done: true, + }, + post_id: null, + }, + previousValue: null, + changedAt: 1661859406.8970098, + isTopGroup: true, + app: 'monday', + type: 'update_column_value', + triggerTime: '2022-08-30T11:36:47.406Z', + subscriptionId: 150894742, + triggerUuid: '51730730740a9d00ec45203bd392a9bd', }, - post_id: null, - }, - previousValue: null, - changedAt: 1661859406.8970098, - isTopGroup: true, - app: 'monday', - type: 'update_column_value', - triggerTime: '2022-08-30T11:36:47.406Z', - subscriptionId: 150894742, - triggerUuid: '51730730740a9d00ec45203bd392a9bd', + }), }, + source: {}, }, ], method: 'POST', @@ -206,7 +225,11 @@ export const data = [ label: { text: 'Done', index: 1, - style: { color: '#00c875', border: '#00B461', var_name: 'green-shadow' }, + style: { + color: '#00c875', + border: '#00B461', + var_name: 'green-shadow', + }, is_done: true, }, post_id: null, @@ -240,25 +263,30 @@ export const data = [ name: 'monday', description: 'test-3', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - event: { - userId: 33556506, - originalTriggerUuid: null, - boardId: 3139815405, - groupId: 'topics', - pulseId: 3160181387, - value: { name: 'New Sprint Item renamed' }, - previousValue: { name: 'New Sprint Item' }, - app: 'monday', - type: 'update_name', - triggerTime: '2022-08-30T11:40:17.351Z', - subscriptionId: 150910867, - triggerUuid: '05ce13d32d0256c4fb7dd5de25b1a1ba', + request: { + body: JSON.stringify({ + event: { + userId: 33556506, + originalTriggerUuid: null, + boardId: 3139815405, + groupId: 'topics', + pulseId: 3160181387, + value: { name: 'New Sprint Item renamed' }, + previousValue: { name: 'New Sprint Item' }, + app: 'monday', + type: 'update_name', + triggerTime: '2022-08-30T11:40:17.351Z', + subscriptionId: 150910867, + triggerUuid: '05ce13d32d0256c4fb7dd5de25b1a1ba', + }, + }), }, + source: {}, }, ], method: 'POST', @@ -309,31 +337,36 @@ export const data = [ name: 'monday', description: 'test-4', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - event: { - userId: 33556506, - originalTriggerUuid: null, - boardId: 3160805239, - pulseId: 3161163765, - pulseName: 'new subitem', - groupId: 'topics', - groupName: 'Subitems', - groupColor: '#579bfc', - isTopGroup: true, - columnValues: {}, - app: 'monday', - type: 'create_pulse', - triggerTime: '2022-08-30T12:56:27.281Z', - subscriptionId: 150911592, - triggerUuid: '70a2219427804e47a508a91b5c244543', - parentItemId: '3160181387', - parentItemBoardId: '3139815405', - itemId: 3161163765, + request: { + body: JSON.stringify({ + event: { + userId: 33556506, + originalTriggerUuid: null, + boardId: 3160805239, + pulseId: 3161163765, + pulseName: 'new subitem', + groupId: 'topics', + groupName: 'Subitems', + groupColor: '#579bfc', + isTopGroup: true, + columnValues: {}, + app: 'monday', + type: 'create_pulse', + triggerTime: '2022-08-30T12:56:27.281Z', + subscriptionId: 150911592, + triggerUuid: '70a2219427804e47a508a91b5c244543', + parentItemId: '3160181387', + parentItemBoardId: '3139815405', + itemId: 3161163765, + }, + }), }, + source: {}, }, ], method: 'POST', @@ -390,23 +423,28 @@ export const data = [ name: 'monday', description: 'test-5', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - event: { - userId: 33556506, - originalTriggerUuid: null, - boardId: 3139815405, - itemId: 3160181387, - itemName: 'New Sprint Item renamed', - app: 'monday', - type: 'archive_pulse', - triggerTime: '2022-08-30T12:58:15.844Z', - subscriptionId: 150925947, - triggerUuid: 'aa8bd5dbb6fd592aedd57322dd776379', + request: { + body: JSON.stringify({ + event: { + userId: 33556506, + originalTriggerUuid: null, + boardId: 3139815405, + itemId: 3160181387, + itemName: 'New Sprint Item renamed', + app: 'monday', + type: 'archive_pulse', + triggerTime: '2022-08-30T12:58:15.844Z', + subscriptionId: 150925947, + triggerUuid: 'aa8bd5dbb6fd592aedd57322dd776379', + }, + }), }, + source: {}, }, ], method: 'POST', diff --git a/test/integrations/sources/olark/data.ts b/test/integrations/sources/olark/data.ts index 3486e849076..f3262dc1a28 100644 --- a/test/integrations/sources/olark/data.ts +++ b/test/integrations/sources/olark/data.ts @@ -3,34 +3,42 @@ export const data = [ name: 'olark', description: 'Olark webhook response', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - kind: 'Conversation', - id: 'ho6HrHxoabmm6q0G103JU0JFaor0BobA', - manuallySubmitted: false, - items: [ - { - kind: 'OfflineMessage', - timestamp: '1669285628.796693', - body: 'name: test rudderlabs\nemail: ruddertest@gmail.com\nMessage: I am Fine', - }, - ], - tags: [], - visitor: { - kind: 'Visitor', - id: '45WjM9eMYwJ7cJMo103JU0JaForAA6Db', - fullName: 'test', - emailAddress: 'ruddertest@gmail.com', - ip: '', - country: 'India', - countryCode: 'IN', - browser: 'Chrome 105.0.0.0', - operatingSystem: 'Macintosh', - conversationBeginPage: 'http://localhost:5503/', + request: { + body: JSON.stringify({ + kind: 'Conversation', + id: 'ho6HrHxoabmm6q0G103JU0JFaor0BobA', + manuallySubmitted: false, + items: [ + { + kind: 'OfflineMessage', + timestamp: '1669285628.796693', + body: + 'name: test rudderlabs\n' + + 'email: ruddertest@gmail.com\n' + + 'Message: I am Fine', + }, + ], + tags: [], + visitor: { + kind: 'Visitor', + id: '45WjM9eMYwJ7cJMo103JU0JaForAA6Db', + fullName: 'test', + emailAddress: 'ruddertest@gmail.com', + ip: '', + country: 'India', + countryCode: 'IN', + browser: 'Chrome 105.0.0.0', + operatingSystem: 'Macintosh', + conversationBeginPage: 'http://localhost:5503/', + }, + }), }, + source: {}, }, ], method: 'POST', @@ -53,7 +61,11 @@ export const data = [ context: { os: { name: 'Macintosh' }, page: { url: 'http://localhost:5503/' }, - traits: { name: 'test', email: 'ruddertest@gmail.com', country: 'India' }, + traits: { + name: 'test', + email: 'ruddertest@gmail.com', + country: 'India', + }, browser: { name: 'Chrome', version: '105.0.0.0' }, library: { name: 'unknown', version: 'unknown' }, integration: { name: 'Olark' }, @@ -62,7 +74,10 @@ export const data = [ tags: [], items: [ { - body: 'name: test rudderlabs\nemail: ruddertest@gmail.com\nMessage: I am Fine', + body: + 'name: test rudderlabs\n' + + 'email: ruddertest@gmail.com\n' + + 'Message: I am Fine', kind: 'OfflineMessage', timestamp: '1669285628.796693', }, @@ -81,58 +96,68 @@ export const data = [ name: 'olark', description: 'Olark webhook response', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - kind: 'Conversation', - id: 'NOTAREALTRANSCRIPT5LGcbVTa3hKBRB', - manuallySubmitted: false, - items: [ - { - kind: 'MessageToVisitor', - nickname: 'Olark operator', - operatorId: '6208911878914048', - timestamp: '1473774819.263083', - body: 'Hi from an operator', - }, - { - kind: 'MessageToOperator', - nickname: 'Returning Visitor | USA (San Francisco, CA) #7617', - timestamp: '1473774821.411154', - body: 'Hi from a visitor', - visitor_nickname: 'Olark Visitor', - }, - ], - tags: ['test_example'], - visitor: { - kind: 'Visitor', - id: 'NOTAREALVISITORIDS5LGl6QUrK2OaPP', - fullName: 'Olark', - phoneNumber: '5555555555', - emailAddress: 'support+integrationtest@olark.com', - ip: '', - city: 'San Francisco', - region: 'CA', - country: 'United States', - countryCode: 'US', - organization: 'Visitor Organization', - browser: 'Internet Explorer 11', - operatingSystem: 'Windows', - referrer: 'http://www.olark.com', - conversationBeginPage: 'http://www.olark.com', - chat_feedback: { overall_chat: 4, responsiveness: 5, knowledge: 4, friendliness: 5 }, - }, - operators: { - '6208911878914048': { - kind: 'Operator', - id: '6208911878914048', - nickname: 'integration', - emailAddress: 'integration-accounts@rudderstack.com', - username: 'integration-accounts-92750bc547', - }, + request: { + body: JSON.stringify({ + kind: 'Conversation', + id: 'NOTAREALTRANSCRIPT5LGcbVTa3hKBRB', + manuallySubmitted: false, + items: [ + { + kind: 'MessageToVisitor', + nickname: 'Olark operator', + operatorId: '6208911878914048', + timestamp: '1473774819.263083', + body: 'Hi from an operator', + }, + { + kind: 'MessageToOperator', + nickname: 'Returning Visitor | USA (San Francisco, CA) #7617', + timestamp: '1473774821.411154', + body: 'Hi from a visitor', + visitor_nickname: 'Olark Visitor', + }, + ], + tags: ['test_example'], + visitor: { + kind: 'Visitor', + id: 'NOTAREALVISITORIDS5LGl6QUrK2OaPP', + fullName: 'Olark', + phoneNumber: '5555555555', + emailAddress: 'support+integrationtest@olark.com', + ip: '', + city: 'San Francisco', + region: 'CA', + country: 'United States', + countryCode: 'US', + organization: 'Visitor Organization', + browser: 'Internet Explorer 11', + operatingSystem: 'Windows', + referrer: 'http://www.olark.com', + conversationBeginPage: 'http://www.olark.com', + chat_feedback: { + overall_chat: 4, + responsiveness: 5, + knowledge: 4, + friendliness: 5, + }, + }, + operators: { + '6208911878914048': { + kind: 'Operator', + id: '6208911878914048', + nickname: 'integration', + emailAddress: 'integration-accounts@rudderstack.com', + username: 'integration-accounts-92750bc547', + }, + }, + }), }, + source: {}, }, ], method: 'POST', @@ -162,7 +187,10 @@ export const data = [ userId: 'NOTAREALVISITORIDS5LGl6QUrK2OaPP', context: { os: { name: 'Windows' }, - page: { url: 'http://www.olark.com', referrer: 'http://www.olark.com' }, + page: { + url: 'http://www.olark.com', + referrer: 'http://www.olark.com', + }, traits: { city: 'San Francisco', name: 'Olark', @@ -207,35 +235,47 @@ export const data = [ name: 'olark', description: 'Olark webhook response', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - kind: 'Conversation', - id: 'ho6HrHxoabmm6q0G103JU0JFaor0BobA', - manuallySubmitted: false, - items: [ - { - kind: 'OfflineMessage', - timestamp: '1669288532.567071', - body: 'name: test rudderstack\nemail: rudder14@gmail.com\nMessage: veavv', - }, - ], - tags: [], - groups: [{ kind: 'Group', id: 'ca77f4296fb7568909ad864aebf48201', name: 'Group 1' }], - visitor: { - kind: 'Visitor', - id: '45WjM9eMYwJ7cJMo103JU0JaForAA6Db', - fullName: 'test rudderstack', - emailAddress: 'rudder14@gmail.com', - ip: '', - country: 'India', - countryCode: 'IN', - browser: 'Chrome 105.0.0.0', - operatingSystem: 'Macintosh', - conversationBeginPage: 'http://localhost:5503/', + request: { + body: JSON.stringify({ + kind: 'Conversation', + id: 'ho6HrHxoabmm6q0G103JU0JFaor0BobA', + manuallySubmitted: false, + items: [ + { + kind: 'OfflineMessage', + timestamp: '1669288532.567071', + body: + 'name: test rudderstack\n' + 'email: rudder14@gmail.com\n' + 'Message: veavv', + }, + ], + tags: [], + groups: [ + { + kind: 'Group', + id: 'ca77f4296fb7568909ad864aebf48201', + name: 'Group 1', + }, + ], + visitor: { + kind: 'Visitor', + id: '45WjM9eMYwJ7cJMo103JU0JaForAA6Db', + fullName: 'test rudderstack', + emailAddress: 'rudder14@gmail.com', + ip: '', + country: 'India', + countryCode: 'IN', + browser: 'Chrome 105.0.0.0', + operatingSystem: 'Macintosh', + conversationBeginPage: 'http://localhost:5503/', + }, + }), }, + source: {}, }, ], method: 'POST', @@ -271,7 +311,10 @@ export const data = [ tags: [], items: [ { - body: 'name: test rudderstack\nemail: rudder14@gmail.com\nMessage: veavv', + body: + 'name: test rudderstack\n' + + 'email: rudder14@gmail.com\n' + + 'Message: veavv', kind: 'OfflineMessage', timestamp: '1669288532.567071', }, diff --git a/test/integrations/sources/ortto/data.ts b/test/integrations/sources/ortto/data.ts index 6feed3f43a3..a46351d8103 100644 --- a/test/integrations/sources/ortto/data.ts +++ b/test/integrations/sources/ortto/data.ts @@ -9,33 +9,36 @@ export const data = [ name: 'ortto', description: 'Simple track call', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - activity: { - id: '00651b946bfef7e80478efee', - field_id: 'act::s-all', - created: '2023-10-03T04:11:23Z', - attr: { - 'str::is': 'API', - 'str::s-ctx': 'Subscribed via API', - }, - }, - contact: { - contact_id: '00651b946baa9be6b2edad00', - email: 'abhi@example.com', + request: { + body: JSON.stringify({ + activity: { + id: '00651b946bfef7e80478efee', + field_id: 'act::s-all', + created: '2023-10-03T04:11:23Z', + attr: { + 'str::is': 'API', + 'str::s-ctx': 'Subscribed via API', + }, + }, + contact: { + contact_id: '00651b946baa9be6b2edad00', + email: 'abhi@example.com', + }, + id: '00651b946cef87c7af64f4f3', + time: '2023-10-03T04:11:24.25726779Z', + webhook_id: '651b8aec8002153e16319fd3', + }), }, - id: '00651b946cef87c7af64f4f3', - time: '2023-10-03T04:11:24.25726779Z', - webhook_id: '651b8aec8002153e16319fd3', + source: {}, }, ], method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, + headers: { 'Content-Type': 'application/json' }, }, pathSuffix: '', }, @@ -78,65 +81,62 @@ export const data = [ ], }, }, - mockFns: () => { - defaultMockFns(); - }, }, { name: 'ortto', description: 'Simple track call', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - activity: { - id: '00651b946bfef7e80478efee', - field_id: 'act::s-all', - created: '2023-10-03T04:11:23Z', - attr: { - 'str::is': 'API', - 'str::s-ctx': 'Subscribed via API', - }, - }, - contact: { - external_id: 'user_x', - city: { - name: 'Kolkata', - id: 0, - lat: 37751000, - lng: -97822000, - }, - country: { - name: 'United States', - id: 6252001, - lat: 0, - lng: 0, - }, - email: 'xyz@email.com', - first_name: 'Ujjwal', - last_name: 'Ujjwal', - birthday: { - year: 1980, - month: 12, - day: 11, - timezone: 'Australia/Sydney', - }, - phone_number: { - c: '91', - n: '401234567', - }, + request: { + body: JSON.stringify({ + activity: { + id: '00651b946bfef7e80478efee', + field_id: 'act::s-all', + created: '2023-10-03T04:11:23Z', + attr: { + 'str::is': 'API', + 'str::s-ctx': 'Subscribed via API', + }, + }, + contact: { + external_id: 'user_x', + city: { + name: 'Kolkata', + id: 0, + lat: 37751000, + lng: -97822000, + }, + country: { + name: 'United States', + id: 6252001, + lat: 0, + lng: 0, + }, + email: 'xyz@email.com', + first_name: 'Ujjwal', + last_name: 'Ujjwal', + birthday: { + year: 1980, + month: 12, + day: 11, + timezone: 'Australia/Sydney', + }, + phone_number: { c: '91', n: '401234567' }, + }, + id: '00651b946cef87c7af64f4f3', + time: '2023-10-03T04:11:24.25726779Z', + webhook_id: '651b8aec8002153e16319fd3', + }), }, - id: '00651b946cef87c7af64f4f3', - time: '2023-10-03T04:11:24.25726779Z', - webhook_id: '651b8aec8002153e16319fd3', + source: {}, }, ], method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, + headers: { 'Content-Type': 'application/json' }, }, pathSuffix: '', }, @@ -158,10 +158,7 @@ export const data = [ firstName: 'Ujjwal', lastName: 'Ujjwal', phone: '91401234567', - address: { - city: 'Kolkata', - country: 'United States', - }, + address: { city: 'Kolkata', country: 'United States' }, }, }, event: 'Resubscribe globally', @@ -190,66 +187,63 @@ export const data = [ ], }, }, - mockFns: () => { - defaultMockFns(); - }, }, { name: 'ortto', description: 'Simple track call with unknown field id', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - activity: { - id: '00651b946bfef7e80478efee', - field_id: 'act::s-ccc', - created: '2023-10-03T04:11:23Z', - attr: { - 'str::is': 'API', - 'str::s-ctx': 'Subscribed via API', - }, - }, - contact: { - external_id: 'user_x', - city: { - name: 'Kolkata', - id: 0, - lat: 37751000, - lng: -97822000, - }, - contact_id: '006524f0b8d370050056e400', - country: { - name: 'United States', - id: 6252001, - lat: 0, - lng: 0, - }, - email: 'xyz@email.com', - first_name: 'Ujjwal', - last_name: 'Ujjwal', - birthday: { - year: 1980, - month: 3, - day: 4, - timezone: 'Australia/Sydney', - }, - phone_number: { - c: '91', - n: '401234567', - }, + request: { + body: JSON.stringify({ + activity: { + id: '00651b946bfef7e80478efee', + field_id: 'act::s-ccc', + created: '2023-10-03T04:11:23Z', + attr: { + 'str::is': 'API', + 'str::s-ctx': 'Subscribed via API', + }, + }, + contact: { + external_id: 'user_x', + city: { + name: 'Kolkata', + id: 0, + lat: 37751000, + lng: -97822000, + }, + contact_id: '006524f0b8d370050056e400', + country: { + name: 'United States', + id: 6252001, + lat: 0, + lng: 0, + }, + email: 'xyz@email.com', + first_name: 'Ujjwal', + last_name: 'Ujjwal', + birthday: { + year: 1980, + month: 3, + day: 4, + timezone: 'Australia/Sydney', + }, + phone_number: { c: '91', n: '401234567' }, + }, + id: '00651b946cef87c7af64f4f3', + time: '2023-10-03T04:11:24.25726779Z', + webhook_id: '651b8aec8002153e16319fd3', + }), }, - id: '00651b946cef87c7af64f4f3', - time: '2023-10-03T04:11:24.25726779Z', - webhook_id: '651b8aec8002153e16319fd3', + source: {}, }, ], method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, + headers: { 'Content-Type': 'application/json' }, }, pathSuffix: '', }, @@ -277,10 +271,7 @@ export const data = [ firstName: 'Ujjwal', lastName: 'Ujjwal', phone: '91401234567', - address: { - city: 'Kolkata', - country: 'United States', - }, + address: { city: 'Kolkata', country: 'United States' }, }, }, event: 'custom event triggered', @@ -309,66 +300,63 @@ export const data = [ ], }, }, - mockFns: () => { - defaultMockFns(); - }, }, { name: 'ortto', description: 'Simple track call with unknown field id', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - activity: { - id: '00651b946bfef7e80478efee', - field_id: 'act::test_webhook', - created: '2023-10-03T04:11:23Z', - attr: { - 'str::is': 'API', - 'str::s-ctx': 'Subscribed via API', - }, - }, - contact: { - external_id: 'user_x', - city: { - name: 'Kolkata', - id: 0, - lat: 37751000, - lng: -97822000, - }, - contact_id: '006524f0b8d370050056e400', - country: { - name: 'United States', - id: 6252001, - lat: 0, - lng: 0, - }, - email: 'xyz@email.com', - first_name: 'Ujjwal', - last_name: 'Ujjwal', - birthday: { - year: 1980, - month: 3, - day: 4, - timezone: 'Australia/Sydney', - }, - phone_number: { - c: '91', - n: '401234567', - }, + request: { + body: JSON.stringify({ + activity: { + id: '00651b946bfef7e80478efee', + field_id: 'act::test_webhook', + created: '2023-10-03T04:11:23Z', + attr: { + 'str::is': 'API', + 'str::s-ctx': 'Subscribed via API', + }, + }, + contact: { + external_id: 'user_x', + city: { + name: 'Kolkata', + id: 0, + lat: 37751000, + lng: -97822000, + }, + contact_id: '006524f0b8d370050056e400', + country: { + name: 'United States', + id: 6252001, + lat: 0, + lng: 0, + }, + email: 'xyz@email.com', + first_name: 'Ujjwal', + last_name: 'Ujjwal', + birthday: { + year: 1980, + month: 3, + day: 4, + timezone: 'Australia/Sydney', + }, + phone_number: { c: '91', n: '401234567' }, + }, + id: '00651b946cef87c7af64f4f3', + time: '2023-10-03T04:11:24.25726779Z', + webhook_id: '651b8aec8002153e16319fd3', + }), }, - id: '00651b946cef87c7af64f4f3', - time: '2023-10-03T04:11:24.25726779Z', - webhook_id: '651b8aec8002153e16319fd3', + source: {}, }, ], method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, + headers: { 'Content-Type': 'application/json' }, }, pathSuffix: '', }, @@ -386,8 +374,10 @@ export const data = [ ], }, }, - mockFns: () => { - defaultMockFns(); - }, }, -]; +].map((testCase) => ({ + ...testCase, + mockFns: () => { + defaultMockFns(); + }, +})); diff --git a/test/integrations/sources/pagerduty/data.ts b/test/integrations/sources/pagerduty/data.ts index fdfee6fc0d4..171dabf45b8 100644 --- a/test/integrations/sources/pagerduty/data.ts +++ b/test/integrations/sources/pagerduty/data.ts @@ -3,70 +3,78 @@ export const data = [ name: 'pagerduty', description: 'Incident Triggered', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - event: { - id: '01DEN0V2VIFEN5871PQGX72URP', - event_type: 'incident.triggered', - resource_type: 'incident', - occurred_at: '2022-12-07T10:56:52.337Z', - agent: { - html_url: 'https://rudderlabs-com.pagerduty.com/users/PXZZD2E', - id: 'PXZZD2E', - self: 'https://api.pagerduty.com/users/user@1', - summary: 'rudder test', - type: 'user_reference', - }, - client: { name: 'Monitoring Service', url: 'https://monitoring.service.com' }, - data: { - id: 'Q3S7IX2U5KTCOY', - type: 'incident', - self: 'https://api.pagerduty.com/incidents/Q3S7IX2U5KTCOY', - html_url: 'https://rudderlabs-com.pagerduty.com/incidents/Q3S7IX2U5KTCOY', - number: 2, - status: 'triggered', - incident_key: 'faaecfc0aca04b6ea07154188b5d3c6c', - created_at: '2022-12-07T10:56:52Z', - title: 'Server Crashed', - service: { - html_url: 'https://rudderlabs-com.pagerduty.com/services/PAJBUTT', - id: 'PAJBUTT', - self: 'https://api.pagerduty.com/services/PAJBUTT', - summary: 'Database', - type: 'service_reference', - }, - assignees: [ - { + request: { + body: JSON.stringify({ + event: { + id: '01DEN0V2VIFEN5871PQGX72URP', + event_type: 'incident.triggered', + resource_type: 'incident', + occurred_at: '2022-12-07T10:56:52.337Z', + agent: { html_url: 'https://rudderlabs-com.pagerduty.com/users/PXZZD2E', id: 'PXZZD2E', self: 'https://api.pagerduty.com/users/user@1', summary: 'rudder test', type: 'user_reference', }, - ], - escalation_policy: { - html_url: 'https://rudderlabs-com.pagerduty.com/escalation_policies/PB7HKU4', - id: 'PB7HKU4', - self: 'https://api.pagerduty.com/escalation_policies/PB7HKU4', - summary: 'Default', - type: 'escalation_policy_reference', - }, - teams: [], - priority: { - html_url: 'https://rudderlabs-com.pagerduty.com/account/incident_priorities', - id: 'PPMNDVQ', - self: 'https://api.pagerduty.com/priorities/PPMNDVQ', - summary: 'P1', - type: 'priority_reference', + client: { + name: 'Monitoring Service', + url: 'https://monitoring.service.com', + }, + data: { + id: 'Q3S7IX2U5KTCOY', + type: 'incident', + self: 'https://api.pagerduty.com/incidents/Q3S7IX2U5KTCOY', + html_url: 'https://rudderlabs-com.pagerduty.com/incidents/Q3S7IX2U5KTCOY', + number: 2, + status: 'triggered', + incident_key: 'faaecfc0aca04b6ea07154188b5d3c6c', + created_at: '2022-12-07T10:56:52Z', + title: 'Server Crashed', + service: { + html_url: 'https://rudderlabs-com.pagerduty.com/services/PAJBUTT', + id: 'PAJBUTT', + self: 'https://api.pagerduty.com/services/PAJBUTT', + summary: 'Database', + type: 'service_reference', + }, + assignees: [ + { + html_url: 'https://rudderlabs-com.pagerduty.com/users/PXZZD2E', + id: 'PXZZD2E', + self: 'https://api.pagerduty.com/users/user@1', + summary: 'rudder test', + type: 'user_reference', + }, + ], + escalation_policy: { + html_url: 'https://rudderlabs-com.pagerduty.com/escalation_policies/PB7HKU4', + id: 'PB7HKU4', + self: 'https://api.pagerduty.com/escalation_policies/PB7HKU4', + summary: 'Default', + type: 'escalation_policy_reference', + }, + teams: [], + priority: { + html_url: 'https://rudderlabs-com.pagerduty.com/account/incident_priorities', + id: 'PPMNDVQ', + self: 'https://api.pagerduty.com/priorities/PPMNDVQ', + summary: 'P1', + type: 'priority_reference', + }, + urgency: 'high', + conference_bridge: null, + resolve_reason: null, + }, }, - urgency: 'high', - conference_bridge: null, - resolve_reason: null, - }, + }), }, + source: {}, }, ], method: 'POST', @@ -145,7 +153,10 @@ export const data = [ 'https://rudderlabs-com.pagerduty.com/escalation_policies/PB7HKU4', }, }, - client: { url: 'https://monitoring.service.com', name: 'Monitoring Service' }, + client: { + url: 'https://monitoring.service.com', + name: 'Monitoring Service', + }, resourceType: 'incident', }, integrations: { PagerDuty: false }, @@ -162,70 +173,75 @@ export const data = [ name: 'pagerduty', description: 'Incident Priority Updated', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - event: { - id: '01DFU6P4VDDZCIHVQ5Q0ME99OE', - event_type: 'incident.priority_updated', - resource_type: 'incident', - occurred_at: '2022-12-20T11:43:24.342Z', - agent: { - html_url: 'https://rudderlabs-com.pagerduty.com/users/PXZZD2E', - id: 'PXZZD2E', - self: 'https://api.pagerduty.com/users/user@1', - summary: 'rudder test', - type: 'user_reference', - }, - client: null, - data: { - id: 'Q1KRTY75EUMGM0', - type: 'incident', - self: 'https://api.pagerduty.com/incidents/Q1KRTY75EUMGM0', - html_url: 'https://rudderlabs-com.pagerduty.com/incidents/Q1KRTY75EUMGM0', - number: 7, - status: 'acknowledged', - incident_key: 'a3e0e442f8b74a8c94298f19de0dcbed', - created_at: '2022-12-20T11:37:19Z', - title: 'Event Stream Failure', - service: { - html_url: 'https://rudderlabs-com.pagerduty.com/services/PAJBUTT', - id: 'PAJBUTT', - self: 'https://api.pagerduty.com/services/PAJBUTT', - summary: 'Database', - type: 'service_reference', - }, - assignees: [ - { + request: { + body: JSON.stringify({ + event: { + id: '01DFU6P4VDDZCIHVQ5Q0ME99OE', + event_type: 'incident.priority_updated', + resource_type: 'incident', + occurred_at: '2022-12-20T11:43:24.342Z', + agent: { html_url: 'https://rudderlabs-com.pagerduty.com/users/PXZZD2E', id: 'PXZZD2E', self: 'https://api.pagerduty.com/users/user@1', summary: 'rudder test', type: 'user_reference', }, - ], - escalation_policy: { - html_url: 'https://rudderlabs-com.pagerduty.com/escalation_policies/PB7HKU4', - id: 'PB7HKU4', - self: 'https://api.pagerduty.com/escalation_policies/PB7HKU4', - summary: 'Default', - type: 'escalation_policy_reference', - }, - teams: [], - priority: { - html_url: 'https://rudderlabs-com.pagerduty.com/account/incident_priorities', - id: 'PPMNDVQ', - self: 'https://api.pagerduty.com/priorities/PPMNDVQ', - summary: 'P1', - type: 'priority_reference', + client: null, + data: { + id: 'Q1KRTY75EUMGM0', + type: 'incident', + self: 'https://api.pagerduty.com/incidents/Q1KRTY75EUMGM0', + html_url: 'https://rudderlabs-com.pagerduty.com/incidents/Q1KRTY75EUMGM0', + number: 7, + status: 'acknowledged', + incident_key: 'a3e0e442f8b74a8c94298f19de0dcbed', + created_at: '2022-12-20T11:37:19Z', + title: 'Event Stream Failure', + service: { + html_url: 'https://rudderlabs-com.pagerduty.com/services/PAJBUTT', + id: 'PAJBUTT', + self: 'https://api.pagerduty.com/services/PAJBUTT', + summary: 'Database', + type: 'service_reference', + }, + assignees: [ + { + html_url: 'https://rudderlabs-com.pagerduty.com/users/PXZZD2E', + id: 'PXZZD2E', + self: 'https://api.pagerduty.com/users/user@1', + summary: 'rudder test', + type: 'user_reference', + }, + ], + escalation_policy: { + html_url: 'https://rudderlabs-com.pagerduty.com/escalation_policies/PB7HKU4', + id: 'PB7HKU4', + self: 'https://api.pagerduty.com/escalation_policies/PB7HKU4', + summary: 'Default', + type: 'escalation_policy_reference', + }, + teams: [], + priority: { + html_url: 'https://rudderlabs-com.pagerduty.com/account/incident_priorities', + id: 'PPMNDVQ', + self: 'https://api.pagerduty.com/priorities/PPMNDVQ', + summary: 'P1', + type: 'priority_reference', + }, + urgency: 'high', + conference_bridge: null, + resolve_reason: null, + }, }, - urgency: 'high', - conference_bridge: null, - resolve_reason: null, - }, + }), }, + source: {}, }, ], method: 'POST', @@ -320,45 +336,50 @@ export const data = [ name: 'pagerduty', description: 'Incident Responder Added', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - event: { - id: '01DFU6Z1ZCLMV9SEK3X5JZ5WLW', - event_type: 'incident.responder.added', - resource_type: 'incident', - occurred_at: '2022-12-20T11:46:44.213Z', - agent: { - html_url: 'https://rudderlabs-com.pagerduty.com/users/PXZZD2E', - id: 'PXZZD2E', - self: 'https://api.pagerduty.com/users/user@1', - summary: 'rudder test', - type: 'user_reference', - }, - client: null, - data: { - incident: { - html_url: 'https://rudderlabs-com.pagerduty.com/incidents/Q1KRTY75EUMGM0', - id: 'Q1KRTY75EUMGM0', - self: 'https://api.pagerduty.com/incidents/Q1KRTY75EUMGM0', - summary: 'Event Stream Failure', - type: 'incident_reference', - }, - user: { - html_url: 'https://rudderlabs-com.pagerduty.com/users/PXZZD2E', - id: 'PXZZD2E', - self: 'https://api.pagerduty.com/users/user@1', - summary: 'rudder test', - type: 'user_reference', + request: { + body: JSON.stringify({ + event: { + id: '01DFU6Z1ZCLMV9SEK3X5JZ5WLW', + event_type: 'incident.responder.added', + resource_type: 'incident', + occurred_at: '2022-12-20T11:46:44.213Z', + agent: { + html_url: 'https://rudderlabs-com.pagerduty.com/users/PXZZD2E', + id: 'PXZZD2E', + self: 'https://api.pagerduty.com/users/user@1', + summary: 'rudder test', + type: 'user_reference', + }, + client: null, + data: { + incident: { + html_url: 'https://rudderlabs-com.pagerduty.com/incidents/Q1KRTY75EUMGM0', + id: 'Q1KRTY75EUMGM0', + self: 'https://api.pagerduty.com/incidents/Q1KRTY75EUMGM0', + summary: 'Event Stream Failure', + type: 'incident_reference', + }, + user: { + html_url: 'https://rudderlabs-com.pagerduty.com/users/PXZZD2E', + id: 'PXZZD2E', + self: 'https://api.pagerduty.com/users/user@1', + summary: 'rudder test', + type: 'user_reference', + }, + escalation_policy: null, + message: 'Please help with "Event Stream Failure"', + state: 'pending', + type: 'incident_responder', + }, }, - escalation_policy: null, - message: 'Please help with "Event Stream Failure"', - state: 'pending', - type: 'incident_responder', - }, + }), }, + source: {}, }, ], method: 'POST', @@ -426,70 +447,75 @@ export const data = [ name: 'pagerduty', description: 'Incident Escalated', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - event: { - id: '01DFU77KTKK9UUYX779UX0N1ZP', - event_type: 'incident.escalated', - resource_type: 'incident', - occurred_at: '2022-12-20T11:49:35.385Z', - agent: { - html_url: 'https://rudderlabs-com.pagerduty.com/users/PXZZD2E', - id: 'PXZZD2E', - self: 'https://api.pagerduty.com/users/user@1', - summary: 'rudder test', - type: 'user_reference', - }, - client: null, - data: { - id: 'Q1KRTY75EUMGM0', - type: 'incident', - self: 'https://api.pagerduty.com/incidents/Q1KRTY75EUMGM0', - html_url: 'https://rudderlabs-com.pagerduty.com/incidents/Q1KRTY75EUMGM0', - number: 7, - status: 'triggered', - incident_key: 'a3e0e442f8b74a8c94298f19de0dcbed', - created_at: '2022-12-20T11:37:19Z', - title: 'Event Stream Failure', - service: { - html_url: 'https://rudderlabs-com.pagerduty.com/services/PAJBUTT', - id: 'PAJBUTT', - self: 'https://api.pagerduty.com/services/PAJBUTT', - summary: 'Database', - type: 'service_reference', - }, - assignees: [ - { + request: { + body: JSON.stringify({ + event: { + id: '01DFU77KTKK9UUYX779UX0N1ZP', + event_type: 'incident.escalated', + resource_type: 'incident', + occurred_at: '2022-12-20T11:49:35.385Z', + agent: { html_url: 'https://rudderlabs-com.pagerduty.com/users/PXZZD2E', id: 'PXZZD2E', self: 'https://api.pagerduty.com/users/user@1', summary: 'rudder test', type: 'user_reference', }, - ], - escalation_policy: { - html_url: 'https://rudderlabs-com.pagerduty.com/escalation_policies/PB7HKU4', - id: 'PB7HKU4', - self: 'https://api.pagerduty.com/escalation_policies/PB7HKU4', - summary: 'Default', - type: 'escalation_policy_reference', - }, - teams: [], - priority: { - html_url: 'https://rudderlabs-com.pagerduty.com/account/incident_priorities', - id: 'PPMNDVQ', - self: 'https://api.pagerduty.com/priorities/PPMNDVQ', - summary: 'P1', - type: 'priority_reference', + client: null, + data: { + id: 'Q1KRTY75EUMGM0', + type: 'incident', + self: 'https://api.pagerduty.com/incidents/Q1KRTY75EUMGM0', + html_url: 'https://rudderlabs-com.pagerduty.com/incidents/Q1KRTY75EUMGM0', + number: 7, + status: 'triggered', + incident_key: 'a3e0e442f8b74a8c94298f19de0dcbed', + created_at: '2022-12-20T11:37:19Z', + title: 'Event Stream Failure', + service: { + html_url: 'https://rudderlabs-com.pagerduty.com/services/PAJBUTT', + id: 'PAJBUTT', + self: 'https://api.pagerduty.com/services/PAJBUTT', + summary: 'Database', + type: 'service_reference', + }, + assignees: [ + { + html_url: 'https://rudderlabs-com.pagerduty.com/users/PXZZD2E', + id: 'PXZZD2E', + self: 'https://api.pagerduty.com/users/user@1', + summary: 'rudder test', + type: 'user_reference', + }, + ], + escalation_policy: { + html_url: 'https://rudderlabs-com.pagerduty.com/escalation_policies/PB7HKU4', + id: 'PB7HKU4', + self: 'https://api.pagerduty.com/escalation_policies/PB7HKU4', + summary: 'Default', + type: 'escalation_policy_reference', + }, + teams: [], + priority: { + html_url: 'https://rudderlabs-com.pagerduty.com/account/incident_priorities', + id: 'PPMNDVQ', + self: 'https://api.pagerduty.com/priorities/PPMNDVQ', + summary: 'P1', + type: 'priority_reference', + }, + urgency: 'high', + conference_bridge: null, + resolve_reason: null, + }, }, - urgency: 'high', - conference_bridge: null, - resolve_reason: null, - }, + }), }, + source: {}, }, ], method: 'POST', @@ -584,62 +610,67 @@ export const data = [ name: 'pagerduty', description: 'Incident Resolved', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - event: { - id: '01DEN1HNLBC1VITK192ETJ1MPJ', - event_type: 'incident.resolved', - resource_type: 'incident', - occurred_at: '2022-12-07T11:04:27.459Z', - agent: { - html_url: 'https://rudderlabs-com.pagerduty.com/users/PXZZD2E', - id: 'PXZZD2E', - self: 'https://api.pagerduty.com/users/user@1', - summary: 'rudder test', - type: 'user_reference', - }, - client: null, - data: { - id: 'Q3S7IX2U5KTCOY', - type: 'incident', - self: 'https://api.pagerduty.com/incidents/Q3S7IX2U5KTCOY', - html_url: 'https://rudderlabs-com.pagerduty.com/incidents/Q3S7IX2U5KTCOY', - number: 2, - status: 'resolved', - incident_key: 'faaecfc0aca04b6ea07154188b5d3c6c', - created_at: '2022-12-07T10:56:52Z', - title: 'Server Crashed', - service: { - html_url: 'https://rudderlabs-com.pagerduty.com/services/PAJBUTT', - id: 'PAJBUTT', - self: 'https://api.pagerduty.com/services/PAJBUTT', - summary: 'Database', - type: 'service_reference', - }, - assignees: [], - escalation_policy: { - html_url: 'https://rudderlabs-com.pagerduty.com/escalation_policies/PB7HKU4', - id: 'PB7HKU4', - self: 'https://api.pagerduty.com/escalation_policies/PB7HKU4', - summary: 'Default', - type: 'escalation_policy_reference', - }, - teams: [], - priority: { - html_url: 'https://rudderlabs-com.pagerduty.com/account/incident_priorities', - id: 'P5DBC3A', - self: 'https://api.pagerduty.com/priorities/P5DBC3A', - summary: 'P3', - type: 'priority_reference', + request: { + body: JSON.stringify({ + event: { + id: '01DEN1HNLBC1VITK192ETJ1MPJ', + event_type: 'incident.resolved', + resource_type: 'incident', + occurred_at: '2022-12-07T11:04:27.459Z', + agent: { + html_url: 'https://rudderlabs-com.pagerduty.com/users/PXZZD2E', + id: 'PXZZD2E', + self: 'https://api.pagerduty.com/users/user@1', + summary: 'rudder test', + type: 'user_reference', + }, + client: null, + data: { + id: 'Q3S7IX2U5KTCOY', + type: 'incident', + self: 'https://api.pagerduty.com/incidents/Q3S7IX2U5KTCOY', + html_url: 'https://rudderlabs-com.pagerduty.com/incidents/Q3S7IX2U5KTCOY', + number: 2, + status: 'resolved', + incident_key: 'faaecfc0aca04b6ea07154188b5d3c6c', + created_at: '2022-12-07T10:56:52Z', + title: 'Server Crashed', + service: { + html_url: 'https://rudderlabs-com.pagerduty.com/services/PAJBUTT', + id: 'PAJBUTT', + self: 'https://api.pagerduty.com/services/PAJBUTT', + summary: 'Database', + type: 'service_reference', + }, + assignees: [], + escalation_policy: { + html_url: 'https://rudderlabs-com.pagerduty.com/escalation_policies/PB7HKU4', + id: 'PB7HKU4', + self: 'https://api.pagerduty.com/escalation_policies/PB7HKU4', + summary: 'Default', + type: 'escalation_policy_reference', + }, + teams: [], + priority: { + html_url: 'https://rudderlabs-com.pagerduty.com/account/incident_priorities', + id: 'P5DBC3A', + self: 'https://api.pagerduty.com/priorities/P5DBC3A', + summary: 'P3', + type: 'priority_reference', + }, + urgency: 'high', + conference_bridge: { conference_number: '', conference_url: '' }, + resolve_reason: null, + }, }, - urgency: 'high', - conference_bridge: { conference_number: '', conference_url: '' }, - resolve_reason: null, - }, + }), }, + source: {}, }, ], method: 'POST', diff --git a/test/integrations/sources/pipedream/data.ts b/test/integrations/sources/pipedream/data.ts index a4b5c33e0d5..a77cdea848b 100644 --- a/test/integrations/sources/pipedream/data.ts +++ b/test/integrations/sources/pipedream/data.ts @@ -3,15 +3,20 @@ export const data = [ name: 'pipedream', description: 'No type or userId is given', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - anonymousId: '63767499ca6fb1b7c988d5bb', - artist: 'Gautam', - genre: 'Jazz', - song: 'Take Five', + request: { + body: JSON.stringify({ + anonymousId: '63767499ca6fb1b7c988d5bb', + artist: 'Gautam', + genre: 'Jazz', + song: 'Take Five', + }), + }, + source: {}, }, ], method: 'POST', @@ -53,10 +58,22 @@ export const data = [ name: 'pipedream', description: 'No type or anonymousId is given', module: 'source', - version: 'v0', + version: 'v2', input: { request: { - body: [{ userId: '12', artist: 'Gautam', genre: 'Jazz', song: 'Take Five' }], + body: [ + { + request: { + body: JSON.stringify({ + userId: '12', + artist: 'Gautam', + genre: 'Jazz', + song: 'Take Five', + }), + }, + source: {}, + }, + ], method: 'POST', headers: { 'Content-Type': 'application/json' }, }, @@ -78,7 +95,12 @@ export const data = [ }, integrations: { PIPEDREAM: false }, type: 'track', - properties: { userId: '12', artist: 'Gautam', genre: 'Jazz', song: 'Take Five' }, + properties: { + userId: '12', + artist: 'Gautam', + genre: 'Jazz', + song: 'Take Five', + }, }, ], }, @@ -91,29 +113,39 @@ export const data = [ name: 'pipedream', description: 'Track Call -> type and userId is given', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - event: 'Song Played', - userId: 'R1234', - context: { - library: { name: 'unknown', version: 'unknown' }, - traits: { - createdAt: '2022-10-15T05:41:06.016Z', - custom: { key1: 'v1', key2: 'V2' }, - email: 'john@doe.com', - name: 'John Doe', - userDeleted: false, - }, - locale: 'en', - location: { country: 'IN', countryName: 'India', short: 'India', long: 'India' }, - device: { os: 'macOS', type: 'desktop' }, - page: { referrer: 'http://127.0.0.1:5500/testSm.html' }, + request: { + body: JSON.stringify({ + event: 'Song Played', + userId: 'R1234', + context: { + library: { name: 'unknown', version: 'unknown' }, + traits: { + createdAt: '2022-10-15T05:41:06.016Z', + custom: { key1: 'v1', key2: 'V2' }, + email: 'john@doe.com', + name: 'John Doe', + userDeleted: false, + }, + locale: 'en', + location: { + country: 'IN', + countryName: 'India', + short: 'India', + long: 'India', + }, + device: { os: 'macOS', type: 'desktop' }, + page: { referrer: 'http://127.0.0.1:5500/testSm.html' }, + }, + type: 'track', + properties: { artist: 'John', Album: 'ABCD' }, + }), }, - type: 'track', - properties: { artist: 'John', Album: 'ABCD' }, + source: {}, }, ], method: 'POST', @@ -164,24 +196,29 @@ export const data = [ name: 'pipedream', description: 'Identify type -> type and userId is given', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - userId: '1', - originalTimestamp: '2020-09-28T19:53:31.900Z', - traits: { - firstName: 'John', - lastName: 'doe', - email: 'John@r.com', - hasPurchased: 'yes', - address: { Home: { city: 'iudcb' }, Office: { abc: 'jbc' } }, - state: 'Delhi', - title: 'Mr', + request: { + body: JSON.stringify({ + userId: '1', + originalTimestamp: '2020-09-28T19:53:31.900Z', + traits: { + firstName: 'John', + lastName: 'doe', + email: 'John@r.com', + hasPurchased: 'yes', + address: { Home: { city: 'iudcb' }, Office: { abc: 'jbc' } }, + state: 'Delhi', + title: 'Mr', + }, + timestamp: '2020-09-29T14:50:29.907+05:30', + type: 'identify', + }), }, - timestamp: '2020-09-29T14:50:29.907+05:30', - type: 'identify', + source: {}, }, ], method: 'POST', @@ -223,16 +260,21 @@ export const data = [ name: 'pipedream', description: 'Group type -> type and userId is given', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - userId: 'user123', - groupId: '17', - context: {}, - traits: { operation: 'add' }, - type: 'group', + request: { + body: JSON.stringify({ + userId: 'user123', + groupId: '17', + context: {}, + traits: { operation: 'add' }, + type: 'group', + }), + }, + source: {}, }, ], method: 'POST', @@ -265,24 +307,32 @@ export const data = [ name: 'pipedream', description: 'Page type -> type and userId is given', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - anonymousId: '21e13f4bc7ceddad', - channel: 'mobile', - context: { - os: { name: 'Android', version: '9' }, - timezone: 'Asia/Kolkata', - traits: { customProp: 'customValue' }, - userAgent: - 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', + request: { + body: JSON.stringify({ + anonymousId: '21e13f4bc7ceddad', + channel: 'mobile', + context: { + os: { name: 'Android', version: '9' }, + timezone: 'Asia/Kolkata', + traits: { customProp: 'customValue' }, + userAgent: + 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', + }, + name: 'Home', + properties: { + title: 'Home | RudderStack', + url: 'http://www.rudderstack.com', + }, + receivedAt: '2020-09-29T14:50:43.005+05:30', + type: 'page', + }), }, - name: 'Home', - properties: { title: 'Home | RudderStack', url: 'http://www.rudderstack.com' }, - receivedAt: '2020-09-29T14:50:43.005+05:30', - type: 'page', + source: {}, }, ], method: 'POST', @@ -308,7 +358,10 @@ export const data = [ 'Dalvik/2.1.0 (Linux; U; Android 9; AOSP on IA Emulator Build/PSR1.180720.117)', }, name: 'Home', - 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', type: 'page', }, @@ -323,10 +376,21 @@ export const data = [ name: 'pipedream', description: 'Alias type -> type and userId is given', module: 'source', - version: 'v0', + version: 'v2', input: { request: { - body: [{ type: 'alias', previousId: 'name@surname.com', userId: '12345' }], + body: [ + { + request: { + body: JSON.stringify({ + type: 'alias', + previousId: 'name@surname.com', + userId: '12345', + }), + }, + source: {}, + }, + ], method: 'POST', headers: { 'Content-Type': 'application/json' }, }, @@ -339,7 +403,12 @@ export const data = [ { output: { batch: [ - { type: 'alias', previousId: 'name@surname.com', userId: '12345', context: {} }, + { + type: 'alias', + previousId: 'name@surname.com', + userId: '12345', + context: {}, + }, ], }, }, diff --git a/test/integrations/sources/refiner/data.ts b/test/integrations/sources/refiner/data.ts index 255004322c3..6986b847d97 100644 --- a/test/integrations/sources/refiner/data.ts +++ b/test/integrations/sources/refiner/data.ts @@ -3,106 +3,114 @@ export const data = [ name: 'refiner', description: 'Refiner webhook response', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - uuid: 'd769e130-49cf-11ed-968d-936a69fadf81', - project_uuid: '0d8759d0-401c-11ed-8ded-9757c4929b55', - remote_id: 'user@17', - email: 'test17@user.com', - display_name: 'test user', - first_seen_at: '2022-10-12T01:47:33.000000Z', - last_seen_at: '2022-10-12T02:00:00.000000Z', - attributes: { - address: null, - address_city: null, - address_state: null, - age: null, - another_attribute: null, - city: null, - country: null, - created_at: null, - email: 'test17@user.com', - event: null, - first_name: null, - first_seen_at: '2022-10-12T01:47:33.000000Z', - form_submissions_count: '1', - form_views_count: '2', - gender: null, - last_form_submission_at: '2022-10-12T02:05:55.000000Z', - last_form_view_at: '2022-10-12T02:03:46.000000Z', - last_name: null, - last_seen_at: '2022-10-12T02:00:00.000000Z', - name: 'test user', - phone: null, - some_attribute: null, - status: null, - student: null, - tag: null, - trait1: null, - trait2: null, - trait3: null, - url: null, - user_address_city: null, - user_address_state: null, - user_country: null, - user_id: null, - username: null, - useroccupation: null, - why_did_you_cancel_your_subscription: 'Pricing', - }, - segments: [ - { - uuid: '0d91d7a0-401c-11ed-8898-bb1ee0c23ae5', - name: 'All Users', - created_at: '2022-10-12T01:47:34.000000Z', - updated_at: '2022-10-12T01:47:34.000000Z', - }, - { - uuid: 'f71ad940-455c-11ed-85e0-bf25f168b224', - name: 'test-segment', - created_at: '2022-10-12T01:47:34.000000Z', - updated_at: '2022-10-12T01:47:34.000000Z', - }, - ], - account: { - uuid: 'd76c9e80-49cf-11ed-a783-6317eca951a6', - remote_id: 'ACCOUNT-ID-ABC-1', - domain: null, - display_name: 'Awesome Inc.', - first_seen_at: '2022-10-12T01:47:33.000000Z', - last_seen_at: '2022-10-12T02:00:00.000000Z', - attributes: { - a_date_at: '2022-10-01T00:00:00.000000Z', - business_email: null, - company: null, - email: null, - isfunded: null, - name: 'Awesome Inc.', - revenue: null, - some_account_data: 'something', - trait1: null, - trait2: null, - trait3: null, - }, - }, - triggered_event: 'Completed Survey', - form: { uuid: '0d94c790-401c-11ed-bb27-e31f6832c5ae', name: 'Customer Churn Survey' }, - response: { - uuid: 'eb117cb0-49cf-11ed-b050-03a44b32151c', - first_shown_at: '2022-10-12T01:48:06.000000Z', - last_shown_at: '2022-10-12T02:03:46.000000Z', - show_counter: null, - first_data_reception_at: '2022-10-12T02:05:55.000000Z', - last_data_reception_at: '2022-10-12T02:05:55.000000Z', - completed_at: '2022-10-12T02:05:55.000000Z', - dismissed_at: null, - received_at: '2022-10-12T02:05:55.000000Z', - data: { why_did_you_cancel_your_subscription: 'Pricing' }, - tags: [], + request: { + body: JSON.stringify({ + uuid: 'd769e130-49cf-11ed-968d-936a69fadf81', + project_uuid: '0d8759d0-401c-11ed-8ded-9757c4929b55', + remote_id: 'user@17', + email: 'test17@user.com', + display_name: 'test user', + first_seen_at: '2022-10-12T01:47:33.000000Z', + last_seen_at: '2022-10-12T02:00:00.000000Z', + attributes: { + address: null, + address_city: null, + address_state: null, + age: null, + another_attribute: null, + city: null, + country: null, + created_at: null, + email: 'test17@user.com', + event: null, + first_name: null, + first_seen_at: '2022-10-12T01:47:33.000000Z', + form_submissions_count: '1', + form_views_count: '2', + gender: null, + last_form_submission_at: '2022-10-12T02:05:55.000000Z', + last_form_view_at: '2022-10-12T02:03:46.000000Z', + last_name: null, + last_seen_at: '2022-10-12T02:00:00.000000Z', + name: 'test user', + phone: null, + some_attribute: null, + status: null, + student: null, + tag: null, + trait1: null, + trait2: null, + trait3: null, + url: null, + user_address_city: null, + user_address_state: null, + user_country: null, + user_id: null, + username: null, + useroccupation: null, + why_did_you_cancel_your_subscription: 'Pricing', + }, + segments: [ + { + uuid: '0d91d7a0-401c-11ed-8898-bb1ee0c23ae5', + name: 'All Users', + created_at: '2022-10-12T01:47:34.000000Z', + updated_at: '2022-10-12T01:47:34.000000Z', + }, + { + uuid: 'f71ad940-455c-11ed-85e0-bf25f168b224', + name: 'test-segment', + created_at: '2022-10-12T01:47:34.000000Z', + updated_at: '2022-10-12T01:47:34.000000Z', + }, + ], + account: { + uuid: 'd76c9e80-49cf-11ed-a783-6317eca951a6', + remote_id: 'ACCOUNT-ID-ABC-1', + domain: null, + display_name: 'Awesome Inc.', + first_seen_at: '2022-10-12T01:47:33.000000Z', + last_seen_at: '2022-10-12T02:00:00.000000Z', + attributes: { + a_date_at: '2022-10-01T00:00:00.000000Z', + business_email: null, + company: null, + email: null, + isfunded: null, + name: 'Awesome Inc.', + revenue: null, + some_account_data: 'something', + trait1: null, + trait2: null, + trait3: null, + }, + }, + triggered_event: 'Completed Survey', + form: { + uuid: '0d94c790-401c-11ed-bb27-e31f6832c5ae', + name: 'Customer Churn Survey', + }, + response: { + uuid: 'eb117cb0-49cf-11ed-b050-03a44b32151c', + first_shown_at: '2022-10-12T01:48:06.000000Z', + last_shown_at: '2022-10-12T02:03:46.000000Z', + show_counter: null, + first_data_reception_at: '2022-10-12T02:05:55.000000Z', + last_data_reception_at: '2022-10-12T02:05:55.000000Z', + completed_at: '2022-10-12T02:05:55.000000Z', + dismissed_at: null, + received_at: '2022-10-12T02:05:55.000000Z', + data: { why_did_you_cancel_your_subscription: 'Pricing' }, + tags: [], + }, + }), }, + source: {}, }, ], method: 'POST', @@ -159,7 +167,9 @@ export const data = [ }, properties: { response: { - data: { why_did_you_cancel_your_subscription: 'Pricing' }, + data: { + why_did_you_cancel_your_subscription: 'Pricing', + }, tags: [], uuid: 'eb117cb0-49cf-11ed-b050-03a44b32151c', received_at: '2022-10-12T02:05:55.000000Z', @@ -202,113 +212,123 @@ export const data = [ name: 'refiner', description: 'Refiner webhook response', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - uuid: '69b83e20-4ea2-11ed-941c-e1cb6c7a3870', - cookie_uuid: '2f9b7e6a-9ba8-1c68-d474-48d719d92a60', - project_uuid: '0d8759d0-401c-11ed-8ded-9757c4929b55', - remote_id: 'sdk@30', - email: 'sdk30@gmail.com', - display_name: '', - first_seen_at: '2022-10-18T05:04:58.000000Z', - last_seen_at: '2022-10-18T05:04:58.000000Z', - attributes: { - address: null, - address_city: null, - address_state: null, - age: null, - another_attribute: null, - city: null, - country: null, - created_at: null, - email: 'sdk30@gmail.com', - event: null, - first_name: null, - first_seen_at: '2022-10-18T05:04:58.000000Z', - form_submissions_count: '1', - form_views_count: '1', - gender: null, - last_form_submission_at: '2022-10-18T05:05:45.000000Z', - last_form_view_at: '2022-10-18T05:05:29.000000Z', - last_name: null, - last_seen_at: '2022-10-18T05:04:58.000000Z', - name: null, - phone: null, - some_attribute: null, - status: null, - student: null, - tag: null, - trait1: null, - trait2: null, - trait3: null, - url: null, - user_address_city: null, - user_address_state: null, - user_country: null, - user_id: null, - username: null, - useroccupation: null, - why_did_you_cancel_your_subscription: 'Missing features', - }, - segments: [ - { - uuid: '0d91d7a0-401c-11ed-8898-bb1ee0c23ae5', - name: 'All Users', - created_at: '2022-10-18T05:04:58.000000Z', - updated_at: '2022-10-18T05:04:58.000000Z', - }, - { - uuid: 'f71ad940-455c-11ed-85e0-bf25f168b224', - name: 'test-segment', - created_at: '2022-10-18T05:04:58.000000Z', - updated_at: '2022-10-18T05:04:58.000000Z', - }, - ], - account: { - uuid: '69ba2030-4ea2-11ed-adfc-595e70c7ab07', - remote_id: null, - domain: null, - display_name: '', - first_seen_at: '2022-10-18T05:04:58.000000Z', - last_seen_at: '2022-10-18T05:04:58.000000Z', - attributes: { - '1': null, - '2': null, - '3': null, - '4': null, - a_date_at: null, - business_email: null, - company: null, - email: null, - isfunded: null, - location: null, - name: null, - revenue: null, - some_account_data: null, - trait1: null, - trait2: null, - trait3: null, - user_id: null, - }, - }, - triggered_event: 'Completed Survey', - form: { uuid: '0d94c790-401c-11ed-bb27-e31f6832c5ae', name: 'Customer Churn Survey' }, - response: { - uuid: '7c508c60-4ea2-11ed-9302-57708fe11d26', - first_shown_at: '2022-10-18T05:05:29.000000Z', - last_shown_at: '2022-10-18T05:05:29.000000Z', - show_counter: null, - first_data_reception_at: '2022-10-18T05:05:45.000000Z', - last_data_reception_at: '2022-10-18T05:05:45.000000Z', - completed_at: '2022-10-18T05:05:45.000000Z', - dismissed_at: null, - received_at: '2022-10-18T05:05:45.000000Z', - data: { why_did_you_cancel_your_subscription: 'Missing features' }, - tags: [], + request: { + body: JSON.stringify({ + uuid: '69b83e20-4ea2-11ed-941c-e1cb6c7a3870', + cookie_uuid: '2f9b7e6a-9ba8-1c68-d474-48d719d92a60', + project_uuid: '0d8759d0-401c-11ed-8ded-9757c4929b55', + remote_id: 'sdk@30', + email: 'sdk30@gmail.com', + display_name: '', + first_seen_at: '2022-10-18T05:04:58.000000Z', + last_seen_at: '2022-10-18T05:04:58.000000Z', + attributes: { + address: null, + address_city: null, + address_state: null, + age: null, + another_attribute: null, + city: null, + country: null, + created_at: null, + email: 'sdk30@gmail.com', + event: null, + first_name: null, + first_seen_at: '2022-10-18T05:04:58.000000Z', + form_submissions_count: '1', + form_views_count: '1', + gender: null, + last_form_submission_at: '2022-10-18T05:05:45.000000Z', + last_form_view_at: '2022-10-18T05:05:29.000000Z', + last_name: null, + last_seen_at: '2022-10-18T05:04:58.000000Z', + name: null, + phone: null, + some_attribute: null, + status: null, + student: null, + tag: null, + trait1: null, + trait2: null, + trait3: null, + url: null, + user_address_city: null, + user_address_state: null, + user_country: null, + user_id: null, + username: null, + useroccupation: null, + why_did_you_cancel_your_subscription: 'Missing features', + }, + segments: [ + { + uuid: '0d91d7a0-401c-11ed-8898-bb1ee0c23ae5', + name: 'All Users', + created_at: '2022-10-18T05:04:58.000000Z', + updated_at: '2022-10-18T05:04:58.000000Z', + }, + { + uuid: 'f71ad940-455c-11ed-85e0-bf25f168b224', + name: 'test-segment', + created_at: '2022-10-18T05:04:58.000000Z', + updated_at: '2022-10-18T05:04:58.000000Z', + }, + ], + account: { + uuid: '69ba2030-4ea2-11ed-adfc-595e70c7ab07', + remote_id: null, + domain: null, + display_name: '', + first_seen_at: '2022-10-18T05:04:58.000000Z', + last_seen_at: '2022-10-18T05:04:58.000000Z', + attributes: { + '1': null, + '2': null, + '3': null, + '4': null, + a_date_at: null, + business_email: null, + company: null, + email: null, + isfunded: null, + location: null, + name: null, + revenue: null, + some_account_data: null, + trait1: null, + trait2: null, + trait3: null, + user_id: null, + }, + }, + triggered_event: 'Completed Survey', + form: { + uuid: '0d94c790-401c-11ed-bb27-e31f6832c5ae', + name: 'Customer Churn Survey', + }, + response: { + uuid: '7c508c60-4ea2-11ed-9302-57708fe11d26', + first_shown_at: '2022-10-18T05:05:29.000000Z', + last_shown_at: '2022-10-18T05:05:29.000000Z', + show_counter: null, + first_data_reception_at: '2022-10-18T05:05:45.000000Z', + last_data_reception_at: '2022-10-18T05:05:45.000000Z', + completed_at: '2022-10-18T05:05:45.000000Z', + dismissed_at: null, + received_at: '2022-10-18T05:05:45.000000Z', + data: { + why_did_you_cancel_your_subscription: 'Missing features', + }, + tags: [], + }, + }), }, + source: {}, }, ], method: 'POST', @@ -325,7 +345,9 @@ export const data = [ batch: [ { type: 'identify', - traits: { why_did_you_cancel_your_subscription: 'Missing features' }, + traits: { + why_did_you_cancel_your_subscription: 'Missing features', + }, userId: 'sdk@30', context: { traits: { @@ -365,7 +387,9 @@ export const data = [ }, properties: { response: { - data: { why_did_you_cancel_your_subscription: 'Missing features' }, + data: { + why_did_you_cancel_your_subscription: 'Missing features', + }, tags: [], uuid: '7c508c60-4ea2-11ed-9302-57708fe11d26', received_at: '2022-10-18T05:05:45.000000Z', diff --git a/test/integrations/sources/revenuecat/data.ts b/test/integrations/sources/revenuecat/data.ts index 2762bac5b27..e61c57fc8a5 100644 --- a/test/integrations/sources/revenuecat/data.ts +++ b/test/integrations/sources/revenuecat/data.ts @@ -9,67 +9,67 @@ export const data = [ name: 'revenuecat', description: 'Simple track call', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - api_version: '1.0', - event: { - aliases: [ - 'f8e14f51-0c76-49ba-8d67-c229f1875dd9', - '389ad6dd-bb40-4c03-9471-1353da2d55ec', - ], - app_user_id: 'f8e14f51-0c76-49ba-8d67-c229f1875dd9', - commission_percentage: null, - country_code: 'US', - currency: null, - entitlement_id: null, - entitlement_ids: null, - environment: 'SANDBOX', - event_timestamp_ms: 1698617217232, - expiration_at_ms: 1698624417232, - id: '8CF0CD6C-CAF3-41FB-968A-661938235AF0', - is_family_share: null, - offer_code: null, - original_app_user_id: 'f8e14f51-0c76-49ba-8d67-c229f1875dd9', - original_transaction_id: null, - period_type: 'NORMAL', - presented_offering_id: null, - price: null, - price_in_purchased_currency: null, - product_id: 'test_product', - purchased_at_ms: 1698617217232, - store: 'APP_STORE', - subscriber_attributes: { - $displayName: { - updated_at_ms: 1698617217232, - value: 'Mister Mistoffelees', - }, - $email: { - updated_at_ms: 1698617217232, - value: 'tuxedo@revenuecat.com', - }, - $phoneNumber: { - updated_at_ms: 1698617217232, - value: '+19795551234', - }, - my_custom_attribute_1: { - updated_at_ms: 1698617217232, - value: 'catnip', + request: { + body: JSON.stringify({ + api_version: '1.0', + event: { + aliases: [ + 'f8e14f51-0c76-49ba-8d67-c229f1875dd9', + '389ad6dd-bb40-4c03-9471-1353da2d55ec', + ], + app_user_id: 'f8e14f51-0c76-49ba-8d67-c229f1875dd9', + commission_percentage: null, + country_code: 'US', + currency: null, + entitlement_id: null, + entitlement_ids: null, + environment: 'SANDBOX', + event_timestamp_ms: 1698617217232, + expiration_at_ms: 1698624417232, + id: '8CF0CD6C-CAF3-41FB-968A-661938235AF0', + is_family_share: null, + offer_code: null, + original_app_user_id: 'f8e14f51-0c76-49ba-8d67-c229f1875dd9', + original_transaction_id: null, + period_type: 'NORMAL', + presented_offering_id: null, + price: null, + price_in_purchased_currency: null, + product_id: 'test_product', + purchased_at_ms: 1698617217232, + store: 'APP_STORE', + subscriber_attributes: { + $displayName: { + updated_at_ms: 1698617217232, + value: 'Mister Mistoffelees', + }, + $email: { + updated_at_ms: 1698617217232, + value: 'tuxedo@revenuecat.com', + }, + $phoneNumber: { + updated_at_ms: 1698617217232, + value: '+19795551234', + }, + my_custom_attribute_1: { updated_at_ms: 1698617217232, value: 'catnip' }, + }, + takehome_percentage: null, + tax_percentage: null, + transaction_id: null, + type: 'TEST', }, - }, - takehome_percentage: null, - tax_percentage: null, - transaction_id: null, - type: 'TEST', + }), }, + source: {}, }, ], method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, + headers: { 'Content-Type': 'application/json' }, }, pathSuffix: '', }, @@ -82,13 +82,8 @@ export const data = [ batch: [ { context: { - library: { - name: 'unknown', - version: 'unknown', - }, - integration: { - name: 'RevenueCat', - }, + library: { name: 'unknown', version: 'unknown' }, + integration: { name: 'RevenueCat' }, externalId: [ { type: 'revenuecatAppUserId', @@ -96,9 +91,7 @@ export const data = [ }, ], }, - integrations: { - RevenueCat: false, - }, + integrations: { RevenueCat: false }, type: 'track', properties: { aliases: [ @@ -139,10 +132,7 @@ export const data = [ updated_at_ms: 1698617217232, value: '+19795551234', }, - my_custom_attribute_1: { - updated_at_ms: 1698617217232, - value: 'catnip', - }, + my_custom_attribute_1: { updated_at_ms: 1698617217232, value: 'catnip' }, }, takehomePercentage: null, taxPercentage: null, @@ -161,61 +151,58 @@ export const data = [ ], }, }, - mockFns: () => { - defaultMockFns(); - }, }, { name: 'revenuecat', description: 'Initial purchase event', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - api_version: '1.0', - event: { - aliases: ['yourCustomerAliasedID', 'yourCustomerAliasedID'], - app_id: 'yourAppID', - app_user_id: 'yourCustomerAppUserID', - commission_percentage: 0.3, - country_code: 'US', - currency: 'USD', - entitlement_id: 'pro_cat', - entitlement_ids: ['pro_cat'], - environment: 'PRODUCTION', - event_timestamp_ms: 1591121855319, - expiration_at_ms: 1591726653000, - id: 'UniqueIdentifierOfEvent', - is_family_share: false, - offer_code: 'free_month', - original_app_user_id: 'OriginalAppUserID', - original_transaction_id: '1530648507000', - period_type: 'NORMAL', - presented_offering_id: 'OfferingID', - price: 2.49, - price_in_purchased_currency: 2.49, - product_id: 'onemonth_no_trial', - purchased_at_ms: 1591121853000, - store: 'APP_STORE', - subscriber_attributes: { - '$Favorite Cat': { - updated_at_ms: 1581121853000, - value: 'Garfield', + request: { + body: JSON.stringify({ + api_version: '1.0', + event: { + aliases: ['yourCustomerAliasedID', 'yourCustomerAliasedID'], + app_id: 'yourAppID', + app_user_id: 'yourCustomerAppUserID', + commission_percentage: 0.3, + country_code: 'US', + currency: 'USD', + entitlement_id: 'pro_cat', + entitlement_ids: ['pro_cat'], + environment: 'PRODUCTION', + event_timestamp_ms: 1591121855319, + expiration_at_ms: 1591726653000, + id: 'UniqueIdentifierOfEvent', + is_family_share: false, + offer_code: 'free_month', + original_app_user_id: 'OriginalAppUserID', + original_transaction_id: '1530648507000', + period_type: 'NORMAL', + presented_offering_id: 'OfferingID', + price: 2.49, + price_in_purchased_currency: 2.49, + product_id: 'onemonth_no_trial', + purchased_at_ms: 1591121853000, + store: 'APP_STORE', + subscriber_attributes: { + '$Favorite Cat': { updated_at_ms: 1581121853000, value: 'Garfield' }, + }, + takehome_percentage: 0.7, + tax_percentage: 0.3, + transaction_id: '170000869511114', + type: 'INITIAL_PURCHASE', }, - }, - takehome_percentage: 0.7, - tax_percentage: 0.3, - transaction_id: '170000869511114', - type: 'INITIAL_PURCHASE', + }), }, + source: {}, }, ], method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, + headers: { 'Content-Type': 'application/json' }, }, pathSuffix: '', }, @@ -228,13 +215,8 @@ export const data = [ batch: [ { context: { - library: { - name: 'unknown', - version: 'unknown', - }, - integration: { - name: 'RevenueCat', - }, + library: { name: 'unknown', version: 'unknown' }, + integration: { name: 'RevenueCat' }, externalId: [ { type: 'revenuecatAppUserId', @@ -242,9 +224,7 @@ export const data = [ }, ], }, - integrations: { - RevenueCat: false, - }, + integrations: { RevenueCat: false }, type: 'track', properties: { aliases: ['yourCustomerAliasedID', 'yourCustomerAliasedID'], @@ -293,59 +273,56 @@ export const data = [ ], }, }, - mockFns: () => { - defaultMockFns(); - }, }, { name: 'revenuecat', description: 'Purchase event with anonymous user', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - api_version: '1.0', - event: { - aliases: ['yourCustomerAliasedID', 'yourCustomerAliasedID'], - app_id: 'yourAppID', - commission_percentage: 0.3, - country_code: 'US', - currency: 'USD', - entitlement_id: 'pro_cat', - entitlement_ids: ['pro_cat'], - environment: 'PRODUCTION', - event_timestamp_ms: 1591121855319, - expiration_at_ms: 1591726653000, - id: 'UniqueIdentifierOfEvent', - is_family_share: false, - offer_code: 'free_month', - original_transaction_id: '1530648507000', - period_type: 'NORMAL', - presented_offering_id: 'OfferingID', - price: 2.49, - price_in_purchased_currency: 2.49, - product_id: 'onemonth_no_trial', - purchased_at_ms: 1591121853000, - store: 'APP_STORE', - subscriber_attributes: { - '$Favorite Cat': { - updated_at_ms: 1581121853000, - value: 'Garfield', + request: { + body: JSON.stringify({ + api_version: '1.0', + event: { + aliases: ['yourCustomerAliasedID', 'yourCustomerAliasedID'], + app_id: 'yourAppID', + commission_percentage: 0.3, + country_code: 'US', + currency: 'USD', + entitlement_id: 'pro_cat', + entitlement_ids: ['pro_cat'], + environment: 'PRODUCTION', + event_timestamp_ms: 1591121855319, + expiration_at_ms: 1591726653000, + id: 'UniqueIdentifierOfEvent', + is_family_share: false, + offer_code: 'free_month', + original_transaction_id: '1530648507000', + period_type: 'NORMAL', + presented_offering_id: 'OfferingID', + price: 2.49, + price_in_purchased_currency: 2.49, + product_id: 'onemonth_no_trial', + purchased_at_ms: 1591121853000, + store: 'APP_STORE', + subscriber_attributes: { + '$Favorite Cat': { updated_at_ms: 1581121853000, value: 'Garfield' }, + }, + takehome_percentage: 0.7, + tax_percentage: 0.3, + transaction_id: '170000869511114', + type: 'INITIAL_PURCHASE', }, - }, - takehome_percentage: 0.7, - tax_percentage: 0.3, - transaction_id: '170000869511114', - type: 'INITIAL_PURCHASE', + }), }, + source: {}, }, ], method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, + headers: { 'Content-Type': 'application/json' }, }, pathSuffix: '', }, @@ -358,17 +335,10 @@ export const data = [ batch: [ { context: { - library: { - name: 'unknown', - version: 'unknown', - }, - integration: { - name: 'RevenueCat', - }, - }, - integrations: { - RevenueCat: false, + library: { name: 'unknown', version: 'unknown' }, + integration: { name: 'RevenueCat' }, }, + integrations: { RevenueCat: false }, type: 'track', properties: { aliases: ['yourCustomerAliasedID', 'yourCustomerAliasedID'], @@ -416,8 +386,10 @@ export const data = [ ], }, }, - mockFns: () => { - defaultMockFns(); - }, }, -]; +].map((testCase) => ({ + ...testCase, + mockFns: () => { + defaultMockFns(); + }, +})); diff --git a/test/integrations/sources/satismeter/data.ts b/test/integrations/sources/satismeter/data.ts index 713f527f2c9..625284ad027 100644 --- a/test/integrations/sources/satismeter/data.ts +++ b/test/integrations/sources/satismeter/data.ts @@ -3,108 +3,113 @@ export const data = [ name: 'satismeter', description: ' All fields Check with event as completed', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - response: { - id: '63767499ca6fb1b7c988d5bb', - created: '2022-11-17T17:51:21.764Z', - rating: 5, - feedback: 'Many things to imporve\n', - dismissed: false, - pending: false, - answers: [ - { - label: 'How likely are you to recommend us to your friends and colleagues?', - id: '7ddb22b0-64a8-11ed-a4c7-b3bed73771cd', - value: 5, - name: 'SM_rating', - type: 'scale', - metric: 'nps', - }, - { - label: 'What could we do to improve?', - id: '7ddb22b1-64a8-11ed-a4c7-b3bed73771cd', - value: 'Many things to imporve\n', - name: 'SM_comment', - type: 'long-text', - }, - { - label: 'The company made it easy for me to handle my issue.', - id: '1dc53f60-66a0-11ed-856c-6f39711bf041', - value: 4, - name: null, - type: 'scale', - metric: 'ces', - }, - { - label: 'How satisfied were you with the service you received?', - id: '24c5b290-66a0-11ed-856c-6f39711bf041', - value: 4, - name: null, - type: 'smiley', - metric: 'csat', - }, - { - label: 'How you like to rate the surevy?', - id: '27b3d1d0-66a0-11ed-856c-6f39711bf041', - value: 4, - type: 'scale', - }, - { - label: 'Your Name (Single Answer)', - id: '37a8c000-66a0-11ed-856c-6f39711bf041', - value: 'a', - type: 'single-choice', - }, - { - label: 'Your Name (Multiple Answer)', - id: '4b435da0-66a0-11ed-856c-6f39711bf041', - value: ['a1', 'b1'], - type: 'multiple-choice', + request: { + body: JSON.stringify({ + response: { + id: '63767499ca6fb1b7c988d5bb', + created: '2022-11-17T17:51:21.764Z', + rating: 5, + feedback: 'Many things to imporve\n', + dismissed: false, + pending: false, + answers: [ + { + label: 'How likely are you to recommend us to your friends and colleagues?', + id: '7ddb22b0-64a8-11ed-a4c7-b3bed73771cd', + value: 5, + name: 'SM_rating', + type: 'scale', + metric: 'nps', + }, + { + label: 'What could we do to improve?', + id: '7ddb22b1-64a8-11ed-a4c7-b3bed73771cd', + value: 'Many things to imporve\n', + name: 'SM_comment', + type: 'long-text', + }, + { + label: 'The company made it easy for me to handle my issue.', + id: '1dc53f60-66a0-11ed-856c-6f39711bf041', + value: 4, + name: null, + type: 'scale', + metric: 'ces', + }, + { + label: 'How satisfied were you with the service you received?', + id: '24c5b290-66a0-11ed-856c-6f39711bf041', + value: 4, + name: null, + type: 'smiley', + metric: 'csat', + }, + { + label: 'How you like to rate the surevy?', + id: '27b3d1d0-66a0-11ed-856c-6f39711bf041', + value: 4, + type: 'scale', + }, + { + label: 'Your Name (Single Answer)', + id: '37a8c000-66a0-11ed-856c-6f39711bf041', + value: 'a', + type: 'single-choice', + }, + { + label: 'Your Name (Multiple Answer)', + id: '4b435da0-66a0-11ed-856c-6f39711bf041', + value: ['a1', 'b1'], + type: 'multiple-choice', + }, + ], + category: 'detractor', + score: -100, + user: { + id: '63766fbb7ac7b72676145338', + name: 'John Doe', + email: 'john@doe.com', + userId: 'No response', + deleted: false, + groups: { group1: 'grooupId' }, + traits: { + createdAt: '2022-10-15T05:41:06.016Z', + custom: { key1: 'v1', key2: 'V2' }, + email: 'john@doe.com', + name: 'John Doe', + }, + }, + device: { os: 'macOS', type: 'desktop' }, + location: { + country: 'IN', + countryName: 'India', + region: '', + city: '', + short: 'India', + long: 'India', + }, + referrer: 'http://127.0.0.1:5500/testSm.html', + method: 'In-app', + language: 'en', + project: '6372247a764986ebee62bf66', + campaign: '6373271b764986ebee62bfca', }, - ], - category: 'detractor', - score: -100, - user: { - id: '63766fbb7ac7b72676145338', - name: 'John Doe', - email: 'john@doe.com', - userId: 'No response', - deleted: false, - groups: { group1: 'grooupId' }, traits: { createdAt: '2022-10-15T05:41:06.016Z', custom: { key1: 'v1', key2: 'V2' }, email: 'john@doe.com', name: 'John Doe', }, - }, - device: { os: 'macOS', type: 'desktop' }, - location: { - country: 'IN', - countryName: 'India', - region: '', - city: '', - short: 'India', - long: 'India', - }, - referrer: 'http://127.0.0.1:5500/testSm.html', - method: 'In-app', - language: 'en', - project: '6372247a764986ebee62bf66', - campaign: '6373271b764986ebee62bfca', - }, - traits: { - createdAt: '2022-10-15T05:41:06.016Z', - custom: { key1: 'v1', key2: 'V2' }, - email: 'john@doe.com', - name: 'John Doe', + campaign: { id: '6373271b764986ebee62bfca', name: 'NPS Survey' }, + event: 'completed', + }), }, - campaign: { id: '6373271b764986ebee62bfca', name: 'NPS Survey' }, - event: 'completed', + source: {}, }, ], method: 'POST', @@ -132,7 +137,10 @@ export const data = [ userDeleted: false, }, locale: 'en', - campaign: { id: '6373271b764986ebee62bfca', name: 'NPS Survey' }, + campaign: { + id: '6373271b764986ebee62bfca', + name: 'NPS Survey', + }, integration: { name: 'SATISMETER' }, location: { country: 'IN', @@ -217,106 +225,111 @@ export const data = [ description: ' Neither reponse.user.id or response.user.userId is provided in payload then mapping response.id to anonymousId', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - response: { - id: '63767499ca6fb1b7c988d5bb', - created: '2022-11-17T17:51:21.764Z', - rating: 5, - feedback: 'Many things to imporve\n', - dismissed: false, - pending: false, - answers: [ - { - label: 'How likely are you to recommend us to your friends and colleagues?', - id: '7ddb22b0-64a8-11ed-a4c7-b3bed73771cd', - value: 5, - name: 'SM_rating', - type: 'scale', - metric: 'nps', - }, - { - label: 'What could we do to improve?', - id: '7ddb22b1-64a8-11ed-a4c7-b3bed73771cd', - value: 'Many things to imporve\n', - name: 'SM_comment', - type: 'long-text', - }, - { - label: 'The company made it easy for me to handle my issue.', - id: '1dc53f60-66a0-11ed-856c-6f39711bf041', - value: 4, - name: null, - type: 'scale', - metric: 'ces', - }, - { - label: 'How satisfied were you with the service you received?', - id: '24c5b290-66a0-11ed-856c-6f39711bf041', - value: 4, - name: null, - type: 'smiley', - metric: 'csat', - }, - { - label: 'How you like to rate the surevy?', - id: '27b3d1d0-66a0-11ed-856c-6f39711bf041', - value: 4, - type: 'scale', - }, - { - label: 'Your Name (Single Answer)', - id: '37a8c000-66a0-11ed-856c-6f39711bf041', - value: 'a', - type: 'single-choice', - }, - { - label: 'Your Name (Multiple Answer)', - id: '4b435da0-66a0-11ed-856c-6f39711bf041', - value: ['a1', 'b1'], - type: 'multiple-choice', + request: { + body: JSON.stringify({ + response: { + id: '63767499ca6fb1b7c988d5bb', + created: '2022-11-17T17:51:21.764Z', + rating: 5, + feedback: 'Many things to imporve\n', + dismissed: false, + pending: false, + answers: [ + { + label: 'How likely are you to recommend us to your friends and colleagues?', + id: '7ddb22b0-64a8-11ed-a4c7-b3bed73771cd', + value: 5, + name: 'SM_rating', + type: 'scale', + metric: 'nps', + }, + { + label: 'What could we do to improve?', + id: '7ddb22b1-64a8-11ed-a4c7-b3bed73771cd', + value: 'Many things to imporve\n', + name: 'SM_comment', + type: 'long-text', + }, + { + label: 'The company made it easy for me to handle my issue.', + id: '1dc53f60-66a0-11ed-856c-6f39711bf041', + value: 4, + name: null, + type: 'scale', + metric: 'ces', + }, + { + label: 'How satisfied were you with the service you received?', + id: '24c5b290-66a0-11ed-856c-6f39711bf041', + value: 4, + name: null, + type: 'smiley', + metric: 'csat', + }, + { + label: 'How you like to rate the surevy?', + id: '27b3d1d0-66a0-11ed-856c-6f39711bf041', + value: 4, + type: 'scale', + }, + { + label: 'Your Name (Single Answer)', + id: '37a8c000-66a0-11ed-856c-6f39711bf041', + value: 'a', + type: 'single-choice', + }, + { + label: 'Your Name (Multiple Answer)', + id: '4b435da0-66a0-11ed-856c-6f39711bf041', + value: ['a1', 'b1'], + type: 'multiple-choice', + }, + ], + category: 'detractor', + score: -100, + user: { + name: 'John Doe', + email: 'john@doe.com', + deleted: false, + groups: { group1: 'grooupId' }, + traits: { + createdAt: '2022-10-15T05:41:06.016Z', + custom: { key1: 'v1', key2: 'V2' }, + email: 'john@doe.com', + name: 'John Doe', + }, + }, + device: { os: 'macOS', type: 'desktop' }, + location: { + country: 'IN', + countryName: 'India', + region: '', + city: '', + short: 'India', + long: 'India', + }, + referrer: 'http://127.0.0.1:5500/testSm.html', + method: 'In-app', + language: 'en', + project: '6372247a764986ebee62bf66', + campaign: '6373271b764986ebee62bfca', }, - ], - category: 'detractor', - score: -100, - user: { - name: 'John Doe', - email: 'john@doe.com', - deleted: false, - groups: { group1: 'grooupId' }, traits: { createdAt: '2022-10-15T05:41:06.016Z', custom: { key1: 'v1', key2: 'V2' }, email: 'john@doe.com', name: 'John Doe', }, - }, - device: { os: 'macOS', type: 'desktop' }, - location: { - country: 'IN', - countryName: 'India', - region: '', - city: '', - short: 'India', - long: 'India', - }, - referrer: 'http://127.0.0.1:5500/testSm.html', - method: 'In-app', - language: 'en', - project: '6372247a764986ebee62bf66', - campaign: '6373271b764986ebee62bfca', - }, - traits: { - createdAt: '2022-10-15T05:41:06.016Z', - custom: { key1: 'v1', key2: 'V2' }, - email: 'john@doe.com', - name: 'John Doe', + campaign: { id: '6373271b764986ebee62bfca', name: 'NPS Survey' }, + event: 'completed', + }), }, - campaign: { id: '6373271b764986ebee62bfca', name: 'NPS Survey' }, - event: 'completed', + source: {}, }, ], method: 'POST', @@ -344,7 +357,10 @@ export const data = [ userDeleted: false, }, locale: 'en', - campaign: { id: '6373271b764986ebee62bfca', name: 'NPS Survey' }, + campaign: { + id: '6373271b764986ebee62bfca', + name: 'NPS Survey', + }, integration: { name: 'SATISMETER' }, location: { country: 'IN', diff --git a/test/integrations/sources/segment/data.ts b/test/integrations/sources/segment/data.ts index 780a65c1195..a7567af3a55 100644 --- a/test/integrations/sources/segment/data.ts +++ b/test/integrations/sources/segment/data.ts @@ -10,92 +10,128 @@ export const data: SrcTestCaseData[] = [ name: 'segment', description: 'test-0', module: 'source', - version: 'v0', + version: 'v2', skipGo: 'NoAnonID error', input: { request: { body: [ { - date: '2020-07-10T07:43:07.766Z', - type: 's', - connection_id: '', - client_id: '********************************', - client_name: 'My App', - ip: '47.15.6.58', - user_agent: 'Chrome Mobile 69.0.3497 / Android 0.0.0', - details: { - prompts: [], - completedAt: 1594366987765, - elapsedTime: null, - session_id: '**************_***************', + request: { + body: JSON.stringify({ + date: '2020-07-10T07:43:07.766Z', + type: 's', + connection_id: '', + client_id: '********************************', + client_name: 'My App', + ip: '47.15.6.58', + user_agent: 'Chrome Mobile 69.0.3497 / Android 0.0.0', + details: { + prompts: [], + completedAt: 1594366987765, + elapsedTime: null, + session_id: '**************_***************', + }, + hostname: '************.us.auth0.com', + user_id: 'auth0|************************', + user_name: 'example@test.com', + auth0_client: { + name: 'Auth0.Android', + env: { android: '28' }, + version: '1.23.0', + }, + log_id: '********************************************************', + _id: '********************************************************', + isMobile: true, + }), }, - hostname: '************.us.auth0.com', - user_id: 'auth0|************************', - user_name: 'example@test.com', - auth0_client: { name: 'Auth0.Android', env: { android: '28' }, version: '1.23.0' }, - log_id: '********************************************************', - _id: '********************************************************', - isMobile: true, + source: {}, }, { - date: '2020-07-10T07:43:09.620Z', - type: 'seacft', - description: '', - connection_id: '', - client_id: '********************************', - client_name: 'My App', - ip: '47.15.6.58', - user_agent: 'okhttp 2.7.5 / Other 0.0.0', - details: { code: '*************Xst' }, - hostname: '************.us.auth0.com', - user_id: 'auth0|************************', - user_name: 'example@test.com', - auth0_client: { name: 'Auth0.Android', env: { android: '28' }, version: '1.23.0' }, - log_id: '********************************************************', - _id: '********************************************************', - isMobile: false, + request: { + body: JSON.stringify({ + date: '2020-07-10T07:43:09.620Z', + type: 'seacft', + description: '', + connection_id: '', + client_id: '********************************', + client_name: 'My App', + ip: '47.15.6.58', + user_agent: 'okhttp 2.7.5 / Other 0.0.0', + details: { code: '*************Xst' }, + hostname: '************.us.auth0.com', + user_id: 'auth0|************************', + user_name: 'example@test.com', + auth0_client: { + name: 'Auth0.Android', + env: { android: '28' }, + version: '1.23.0', + }, + log_id: '********************************************************', + _id: '********************************************************', + isMobile: false, + }), + }, + source: {}, }, { - date: '2020-07-10T07:43:07.766Z', - connection_id: '', - client_id: '********************************', - client_name: 'My App', - ip: '47.15.6.58', - user_agent: 'Chrome Mobile 69.0.3497 / Android 0.0.0', - details: { - prompts: [], - completedAt: 1594366987765, - elapsedTime: null, - session_id: '**************_***************', + request: { + body: JSON.stringify({ + date: '2020-07-10T07:43:07.766Z', + connection_id: '', + client_id: '********************************', + client_name: 'My App', + ip: '47.15.6.58', + user_agent: 'Chrome Mobile 69.0.3497 / Android 0.0.0', + details: { + prompts: [], + completedAt: 1594366987765, + elapsedTime: null, + session_id: '**************_***************', + }, + hostname: '************.us.auth0.com', + user_id: 'auth0|************************', + user_name: 'example@test.com', + auth0_client: { + name: 'Auth0.Android', + env: { android: '28' }, + version: '1.23.0', + }, + log_id: '********************************************************', + _id: '********************************************************', + isMobile: true, + }), }, - hostname: '************.us.auth0.com', - user_id: 'auth0|************************', - user_name: 'example@test.com', - auth0_client: { name: 'Auth0.Android', env: { android: '28' }, version: '1.23.0' }, - log_id: '********************************************************', - _id: '********************************************************', - isMobile: true, + source: {}, }, { - type: 's', - connection_id: '', - client_id: '********************************', - client_name: 'My App', - ip: '47.15.6.58', - user_agent: 'Chrome Mobile 69.0.3497 / Android 0.0.0', - details: { - prompts: [], - completedAt: 1594366987765, - elapsedTime: null, - session_id: '**************_***************', + request: { + body: JSON.stringify({ + type: 's', + connection_id: '', + client_id: '********************************', + client_name: 'My App', + ip: '47.15.6.58', + user_agent: 'Chrome Mobile 69.0.3497 / Android 0.0.0', + details: { + prompts: [], + completedAt: 1594366987765, + elapsedTime: null, + session_id: '**************_***************', + }, + hostname: '************.us.auth0.com', + user_id: 'auth0|************************', + user_name: 'example@test.com', + auth0_client: { + name: 'Auth0.Android', + env: { android: '28' }, + version: '1.23.0', + }, + log_id: '********************************************************', + _id: '********************************************************', + isMobile: true, + }), }, - hostname: '************.us.auth0.com', - user_id: 'auth0|************************', - user_name: 'example@test.com', - auth0_client: { name: 'Auth0.Android', env: { android: '28' }, version: '1.23.0' }, - log_id: '********************************************************', - _id: '********************************************************', - isMobile: true, + source: {}, }, ], method: 'POST', diff --git a/test/integrations/sources/signl4/data.ts b/test/integrations/sources/signl4/data.ts index b318bfb6df5..a8ca1850972 100644 --- a/test/integrations/sources/signl4/data.ts +++ b/test/integrations/sources/signl4/data.ts @@ -9,21 +9,26 @@ export const data = [ name: 'signl4', description: 'test-0', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - eventType: 200, - eventRaisedUtc: '2017-09-01T08:11:37.4815663Z', - subscription: { id: '0acf8014-22f2-4503-88d7-f7d05b46744f' }, - alert: { - statusCode: 1, - eventId: '2518783235949759942_fbc7b4a4-badd-47b8-9e1d-702fb6a1a0b2', - externalEventId: 'INC091210', - id: '2518981069381242800_2ab1b5e0-f1b7-4c3e-9adf-6c157eeb4685', + request: { + body: JSON.stringify({ + eventType: 200, + eventRaisedUtc: '2017-09-01T08:11:37.4815663Z', + subscription: { id: '0acf8014-22f2-4503-88d7-f7d05b46744f' }, + alert: { + statusCode: 1, + eventId: '2518783235949759942_fbc7b4a4-badd-47b8-9e1d-702fb6a1a0b2', + externalEventId: 'INC091210', + id: '2518981069381242800_2ab1b5e0-f1b7-4c3e-9adf-6c157eeb4685', + }, + id: 'dd209a2d-e037-41ee-b37d-f605cc0a39fb', + }), }, - id: 'dd209a2d-e037-41ee-b37d-f605cc0a39fb', + source: {}, }, ], method: 'POST', @@ -69,27 +74,32 @@ export const data = [ name: 'signl4', description: 'test-1', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - eventType: 201, - eventRaisedUtc: '2017-09-01T08:11:37.4815663Z', - subscription: { id: '0acf8014-22f2-4503-88d7-f7d05b46744f' }, - user: { - username: 'Rene', - mailaddress: 'rene@signl4.com', - id: 'f0bd5063-9588-51cf-b3d9-94e5647dedc5', - }, - alert: { - statusCode: 2, - eventId: '2518783235949759942_fbc7b4a4-badd-47b8-9e1d-702fb6a1a0b2', - externalEventId: 'Content you passed in the X-S4-ExternalID parameter', - acknowledgedUserIds: ['f0bd5063-9588-51cf-b3d9-94e5647dedc5'], - id: '2518981069381242800_2ab1b5e0-f1b7-4c3e-9adf-6c157eeb4685', + request: { + body: JSON.stringify({ + eventType: 201, + eventRaisedUtc: '2017-09-01T08:11:37.4815663Z', + subscription: { id: '0acf8014-22f2-4503-88d7-f7d05b46744f' }, + user: { + username: 'Rene', + mailaddress: 'rene@signl4.com', + id: 'f0bd5063-9588-51cf-b3d9-94e5647dedc5', + }, + alert: { + statusCode: 2, + eventId: '2518783235949759942_fbc7b4a4-badd-47b8-9e1d-702fb6a1a0b2', + externalEventId: 'Content you passed in the X-S4-ExternalID parameter', + acknowledgedUserIds: ['f0bd5063-9588-51cf-b3d9-94e5647dedc5'], + id: '2518981069381242800_2ab1b5e0-f1b7-4c3e-9adf-6c157eeb4685', + }, + id: 'dd209a2d-e037-41ee-b37d-f605cc0a39fb', + }), }, - id: 'dd209a2d-e037-41ee-b37d-f605cc0a39fb', + source: {}, }, ], method: 'POST', @@ -109,7 +119,10 @@ export const data = [ library: { name: 'unknown', version: 'unknown' }, integration: { name: 'Signl4' }, externalId: [ - { type: 'signl4UserId', id: 'f0bd5063-9588-51cf-b3d9-94e5647dedc5' }, + { + type: 'signl4UserId', + id: 'f0bd5063-9588-51cf-b3d9-94e5647dedc5', + }, ], traits: { email: 'rene@signl4.com', name: 'Rene' }, }, @@ -140,27 +153,32 @@ export const data = [ name: 'signl4', description: 'test-2', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - eventType: 201, - eventRaisedUtc: '2017-09-01T08:11:37.4815663Z', - subscription: { id: '0acf8014-22f2-4503-88d7-f7d05b46744f' }, - user: { - username: 'Rene', - mailaddress: 'rene@signl4.com', - id: 'f0bd5063-9588-51cf-b3d9-94e5647dedc5', - }, - alert: { - statusCode: 4, - eventId: '2518783235949759942_fbc7b4a4-badd-47b8-9e1d-702fb6a1a0b2', - externalEventId: 'Content you passed in the X-S4-ExternalID parameter', - acknowledgedUserIds: ['f0bd5063-9588-51cf-b3d9-94e5647dedc5'], - id: '2518981069381242800_2ab1b5e0-f1b7-4c3e-9adf-6c157eeb4685', + request: { + body: JSON.stringify({ + eventType: 201, + eventRaisedUtc: '2017-09-01T08:11:37.4815663Z', + subscription: { id: '0acf8014-22f2-4503-88d7-f7d05b46744f' }, + user: { + username: 'Rene', + mailaddress: 'rene@signl4.com', + id: 'f0bd5063-9588-51cf-b3d9-94e5647dedc5', + }, + alert: { + statusCode: 4, + eventId: '2518783235949759942_fbc7b4a4-badd-47b8-9e1d-702fb6a1a0b2', + externalEventId: 'Content you passed in the X-S4-ExternalID parameter', + acknowledgedUserIds: ['f0bd5063-9588-51cf-b3d9-94e5647dedc5'], + id: '2518981069381242800_2ab1b5e0-f1b7-4c3e-9adf-6c157eeb4685', + }, + id: 'dd209a2d-e037-41ee-b37d-f605cc0a39fb', + }), }, - id: 'dd209a2d-e037-41ee-b37d-f605cc0a39fb', + source: {}, }, ], method: 'POST', @@ -180,7 +198,10 @@ export const data = [ library: { name: 'unknown', version: 'unknown' }, integration: { name: 'Signl4' }, externalId: [ - { type: 'signl4UserId', id: 'f0bd5063-9588-51cf-b3d9-94e5647dedc5' }, + { + type: 'signl4UserId', + id: 'f0bd5063-9588-51cf-b3d9-94e5647dedc5', + }, ], traits: { email: 'rene@signl4.com', name: 'Rene' }, }, @@ -211,23 +232,28 @@ export const data = [ name: 'signl4', description: 'test-3', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - eventType: 202, - eventRaisedUtc: '2020-01-10T12:27:19Z', - subscription: { id: 'b8fdd850-e2ad-45ff-924d-9c332a063200' }, - team: { id: '0e8979f7-0c6a-472d-8918-ecfd339252f8' }, - alert: { - statusCode: 1, - eventId: '2518236416806594587_0e67b746-6c88-4ddf-8872-99690b0457d9', - externalEventId: 'INC091210', - acknowledgedUserIds: [], - id: '2518236416804564453_12ea0f6f-948c-43d0-9034-f9565d7b6bd2', + request: { + body: JSON.stringify({ + eventType: 202, + eventRaisedUtc: '2020-01-10T12:27:19Z', + subscription: { id: 'b8fdd850-e2ad-45ff-924d-9c332a063200' }, + team: { id: '0e8979f7-0c6a-472d-8918-ecfd339252f8' }, + alert: { + statusCode: 1, + eventId: '2518236416806594587_0e67b746-6c88-4ddf-8872-99690b0457d9', + externalEventId: 'INC091210', + acknowledgedUserIds: [], + id: '2518236416804564453_12ea0f6f-948c-43d0-9034-f9565d7b6bd2', + }, + id: '27283793-47c8-4da2-9767-d37be224338d', + }), }, - id: '27283793-47c8-4da2-9767-d37be224338d', + source: {}, }, ], method: 'POST', @@ -275,30 +301,35 @@ export const data = [ name: 'signl4', description: 'test-4', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - eventType: 203, - eventRaisedUtc: '2018-04-17T15:00:32Z', - subscription: { id: '1578ebd9-0a27-44ab-bc8e-52cd7d32e81d' }, - user: { - username: 'Rene', - mailaddress: 'rene@signl4.com', - id: 'f0bd5063-9588-51cf-b3d9-94e5647dedc5', - }, - alert: { - statusCode: 0, - eventId: '2518783235949759942_fbc7b4a4-badd-47b8-9e1d-702fb6a1a0b2', - externalEventId: 'Content you passed in the X-S4-ExternalID parameter', - id: '2518783235958846071_4e2dfab2-4717-42bc-8d37-8682402309c2', - }, - annotation: { - message: "OK, I'll take care about it.", - id: '2518783235661483318_99ebffe0-1b90-40ef-990a-fbd842484761', + request: { + body: JSON.stringify({ + eventType: 203, + eventRaisedUtc: '2018-04-17T15:00:32Z', + subscription: { id: '1578ebd9-0a27-44ab-bc8e-52cd7d32e81d' }, + user: { + username: 'Rene', + mailaddress: 'rene@signl4.com', + id: 'f0bd5063-9588-51cf-b3d9-94e5647dedc5', + }, + alert: { + statusCode: 0, + eventId: '2518783235949759942_fbc7b4a4-badd-47b8-9e1d-702fb6a1a0b2', + externalEventId: 'Content you passed in the X-S4-ExternalID parameter', + id: '2518783235958846071_4e2dfab2-4717-42bc-8d37-8682402309c2', + }, + annotation: { + message: "OK, I'll take care about it.", + id: '2518783235661483318_99ebffe0-1b90-40ef-990a-fbd842484761', + }, + id: '141c0f88-7831-4d5e-b055-f6e83c269770', + }), }, - id: '141c0f88-7831-4d5e-b055-f6e83c269770', + source: {}, }, ], method: 'POST', @@ -318,7 +349,10 @@ export const data = [ library: { name: 'unknown', version: 'unknown' }, integration: { name: 'Signl4' }, externalId: [ - { type: 'signl4UserId', id: 'f0bd5063-9588-51cf-b3d9-94e5647dedc5' }, + { + type: 'signl4UserId', + id: 'f0bd5063-9588-51cf-b3d9-94e5647dedc5', + }, ], traits: { email: 'rene@signl4.com', name: 'Rene' }, }, @@ -350,15 +384,20 @@ export const data = [ name: 'signl4', description: 'test-5', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - eventType: 300, - eventRaisedUtc: '2017-09-01T09:16:17.3717355Z', - team: { id: 'f1801955-4724-44de-902a-f6f02ba9e10f' }, - id: 'f56a6b59-1197-4e7d-8eca-8d21a4b57ec3', + request: { + body: JSON.stringify({ + eventType: 300, + eventRaisedUtc: '2017-09-01T09:16:17.3717355Z', + team: { id: 'f1801955-4724-44de-902a-f6f02ba9e10f' }, + id: 'f56a6b59-1197-4e7d-8eca-8d21a4b57ec3', + }), + }, + source: {}, }, ], method: 'POST', @@ -383,7 +422,10 @@ export const data = [ messageId: 'f56a6b59-1197-4e7d-8eca-8d21a4b57ec3', originalTimestamp: '2017-09-01T09:16:17.000Z', event: 'Duty Period Started', - properties: { eventType: 300, 'team.id': 'f1801955-4724-44de-902a-f6f02ba9e10f' }, + properties: { + eventType: 300, + 'team.id': 'f1801955-4724-44de-902a-f6f02ba9e10f', + }, anonymousId: '97fcd7b2-cc24-47d7-b776-057b7b199513', }, ], @@ -397,15 +439,20 @@ export const data = [ name: 'signl4', description: 'test-6', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - eventType: 301, - eventRaisedUtc: '2017-09-01T09:16:17.3717355Z', - team: { id: 'f1801955-4724-44de-902a-f6f02ba9e10f' }, - id: 'f56a6b59-1197-4e7d-8eca-8d21a4b57ec3', + request: { + body: JSON.stringify({ + eventType: 301, + eventRaisedUtc: '2017-09-01T09:16:17.3717355Z', + team: { id: 'f1801955-4724-44de-902a-f6f02ba9e10f' }, + id: 'f56a6b59-1197-4e7d-8eca-8d21a4b57ec3', + }), + }, + source: {}, }, ], method: 'POST', @@ -430,7 +477,10 @@ export const data = [ messageId: 'f56a6b59-1197-4e7d-8eca-8d21a4b57ec3', originalTimestamp: '2017-09-01T09:16:17.000Z', event: 'Duty Period Ended', - properties: { eventType: 301, 'team.id': 'f1801955-4724-44de-902a-f6f02ba9e10f' }, + properties: { + eventType: 301, + 'team.id': 'f1801955-4724-44de-902a-f6f02ba9e10f', + }, anonymousId: '97fcd7b2-cc24-47d7-b776-057b7b199513', }, ], @@ -444,16 +494,21 @@ export const data = [ name: 'signl4', description: 'test-7', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - eventType: 302, - eventRaisedUtc: '2017-09-01T09:16:17.3717355Z', - team: { id: 'f1801955-4724-44de-902a-f6f02ba9e10f' }, - user: { id: 'e31da15f-7e13-43f1-b4a5-1ce3b470a504' }, - id: 'f56a6b59-1197-4e7d-8eca-8d21a4b57ec3', + request: { + body: JSON.stringify({ + eventType: 302, + eventRaisedUtc: '2017-09-01T09:16:17.3717355Z', + team: { id: 'f1801955-4724-44de-902a-f6f02ba9e10f' }, + user: { id: 'e31da15f-7e13-43f1-b4a5-1ce3b470a504' }, + id: 'f56a6b59-1197-4e7d-8eca-8d21a4b57ec3', + }), + }, + source: {}, }, ], method: 'POST', @@ -473,7 +528,10 @@ export const data = [ library: { name: 'unknown', version: 'unknown' }, integration: { name: 'Signl4' }, externalId: [ - { type: 'signl4UserId', id: 'e31da15f-7e13-43f1-b4a5-1ce3b470a504' }, + { + type: 'signl4UserId', + id: 'e31da15f-7e13-43f1-b4a5-1ce3b470a504', + }, ], }, integrations: { Signl4: false }, @@ -481,7 +539,10 @@ export const data = [ messageId: 'f56a6b59-1197-4e7d-8eca-8d21a4b57ec3', originalTimestamp: '2017-09-01T09:16:17.000Z', event: 'Somebody Punched-In', - properties: { eventType: 302, 'team.id': 'f1801955-4724-44de-902a-f6f02ba9e10f' }, + properties: { + eventType: 302, + 'team.id': 'f1801955-4724-44de-902a-f6f02ba9e10f', + }, anonymousId: '97fcd7b2-cc24-47d7-b776-057b7b199513', }, ], @@ -495,16 +556,21 @@ export const data = [ name: 'signl4', description: 'test-8', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - eventType: 303, - eventRaisedUtc: '2017-09-01T09:16:17.3717355Z', - team: { id: 'f1801955-4724-44de-902a-f6f02ba9e10f' }, - user: { id: 'e31da15f-7e13-43f1-b4a5-1ce3b470a504' }, - id: 'f56a6b59-1197-4e7d-8eca-8d21a4b57ec3', + request: { + body: JSON.stringify({ + eventType: 303, + eventRaisedUtc: '2017-09-01T09:16:17.3717355Z', + team: { id: 'f1801955-4724-44de-902a-f6f02ba9e10f' }, + user: { id: 'e31da15f-7e13-43f1-b4a5-1ce3b470a504' }, + id: 'f56a6b59-1197-4e7d-8eca-8d21a4b57ec3', + }), + }, + source: {}, }, ], method: 'POST', @@ -524,7 +590,10 @@ export const data = [ library: { name: 'unknown', version: 'unknown' }, integration: { name: 'Signl4' }, externalId: [ - { type: 'signl4UserId', id: 'e31da15f-7e13-43f1-b4a5-1ce3b470a504' }, + { + type: 'signl4UserId', + id: 'e31da15f-7e13-43f1-b4a5-1ce3b470a504', + }, ], }, integrations: { Signl4: false }, @@ -532,7 +601,10 @@ export const data = [ messageId: 'f56a6b59-1197-4e7d-8eca-8d21a4b57ec3', originalTimestamp: '2017-09-01T09:16:17.000Z', event: 'Somebody Punched-Out', - properties: { eventType: 303, 'team.id': 'f1801955-4724-44de-902a-f6f02ba9e10f' }, + properties: { + eventType: 303, + 'team.id': 'f1801955-4724-44de-902a-f6f02ba9e10f', + }, anonymousId: '97fcd7b2-cc24-47d7-b776-057b7b199513', }, ], diff --git a/test/integrations/sources/slack/data.ts b/test/integrations/sources/slack/data.ts index def8a63408b..7a4d29489cb 100644 --- a/test/integrations/sources/slack/data.ts +++ b/test/integrations/sources/slack/data.ts @@ -3,20 +3,23 @@ export const data = [ name: 'slack', description: 'Webhook url verificatin event', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - token: 'Jhj5dZrVaK7ZwHHjRyZWjbDl', - challenge: '3eZbrw1aB10FEMAGAZd4FyFQ', - type: 'url_verification', + request: { + body: JSON.stringify({ + token: 'Jhj5dZrVaK7ZwHHjRyZWjbDl', + challenge: '3eZbrw1aB10FEMAGAZd4FyFQ', + type: 'url_verification', + }), + }, + source: {}, }, ], method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, + headers: { 'Content-Type': 'application/json' }, }, pathSuffix: '', }, @@ -39,44 +42,47 @@ export const data = [ name: 'slack', description: 'Team joined event', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - event: { - type: 'team_join', - user: { - id: 'W012CDE', - name: 'johnd', - real_name: 'John Doe', - }, - }, - type: 'event_callback', - event_id: 'Ev06TJ0NG5', - event_time: 1709441309, - token: 'REm276ggfh72Lq', - team_id: 'T0GFJL5J7', - context_team_id: 'T0GFJL5J7', - context_enterprise_id: null, - api_app_id: 'B02SJMHRR', - authorizations: [ - { - enterprise_id: null, + request: { + body: JSON.stringify({ + event: { + type: 'team_join', + user: { + id: 'W012CDE', + name: 'johnd', + real_name: 'John Doe', + }, + }, + type: 'event_callback', + event_id: 'Ev06TJ0NG5', + event_time: 1709441309, + token: 'REm276ggfh72Lq', team_id: 'T0GFJL5J7', - user_id: 'U04G7H550', - is_bot: true, - is_enterprise_install: false, - }, - ], - is_ext_shared_channel: false, - event_context: 'eJldCI65436EUEpMSFhgfhg76joiQzAxRTRQTEIxMzUifQ', + context_team_id: 'T0GFJL5J7', + context_enterprise_id: null, + api_app_id: 'B02SJMHRR', + authorizations: [ + { + enterprise_id: null, + team_id: 'T0GFJL5J7', + user_id: 'U04G7H550', + is_bot: true, + is_enterprise_install: false, + }, + ], + is_ext_shared_channel: false, + event_context: 'eJldCI65436EUEpMSFhgfhg76joiQzAxRTRQTEIxMzUifQ', + }), + }, + source: {}, }, ], method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, + headers: { 'Content-Type': 'application/json' }, }, pathSuffix: '', }, @@ -89,23 +95,11 @@ export const data = [ batch: [ { context: { - library: { - name: 'unknown', - version: 'unknown', - }, - integration: { - name: 'SLACK', - }, - externalId: [ - { - type: 'slackUserId', - id: 'W012CDE', - }, - ], - }, - integrations: { - SLACK: false, + library: { name: 'unknown', version: 'unknown' }, + integration: { name: 'SLACK' }, + externalId: [{ type: 'slackUserId', id: 'W012CDE' }], }, + integrations: { SLACK: false }, type: 'identify', event: 'Team Join', anonymousId: '2bc5ae2825a712d3d154cbdacb86ac16c278', @@ -131,74 +125,74 @@ export const data = [ name: 'slack', description: 'Message event', module: 'source', - version: 'v0', + version: 'v2', input: { request: { body: [ { - event: { - user: 'U04G7H550', - type: 'message', - ts: '1709441309.308399', - client_msg_id: '834r664e-ec75-445d-t5c6-b873a07y9c81', - text: 'What is the pricing of product X', - team: 'T0GFJL5J7', - thread_ts: '1709407304.839329', - parent_user_id: 'U06P6LQTPV', - blocks: [ - { - type: 'rich_text', - block_id: 'xGKJl', - elements: [ + request: { + body: JSON.stringify({ + event: { + user: 'U04G7H550', + type: 'message', + ts: '1709441309.308399', + client_msg_id: '834r664e-ec75-445d-t5c6-b873a07y9c81', + text: 'What is the pricing of product X', + team: 'T0GFJL5J7', + thread_ts: '1709407304.839329', + parent_user_id: 'U06P6LQTPV', + blocks: [ { - type: 'rich_text_section', + type: 'rich_text', + block_id: 'xGKJl', elements: [ { - type: 'text', - text: 'What is the pricing of product X', - }, - { - type: 'channel', - channel_id: 'C03CDQTPI65', - }, - { - type: 'text', - text: ' to do this', + type: 'rich_text_section', + elements: [ + { + type: 'text', + text: 'What is the pricing of product X', + }, + { + type: 'channel', + channel_id: 'C03CDQTPI65', + }, + { type: 'text', text: ' to do this' }, + ], }, ], }, ], + channel: 'C03CDQTPI65', + event_ts: '1709441309.308399', + channel_type: 'channel', }, - ], - channel: 'C03CDQTPI65', - event_ts: '1709441309.308399', - channel_type: 'channel', - }, - type: 'event_callback', - event_id: 'EvY5JTJ0NG5', - event_time: 1709441309, - token: 'REm2987dqtpi72Lq', - team_id: 'T0GFJL5J7', - context_team_id: 'T01gqtPIL5J7', - context_enterprise_id: null, - api_app_id: 'A04QTPIHRR', - authorizations: [ - { - enterprise_id: null, + type: 'event_callback', + event_id: 'EvY5JTJ0NG5', + event_time: 1709441309, + token: 'REm2987dqtpi72Lq', team_id: 'T0GFJL5J7', - user_id: 'W012CDE', - is_bot: true, - is_enterprise_install: false, - }, - ], - is_ext_shared_channel: false, - event_context: '4-wd6joiQfdgTRQTpIzdfifQ', + context_team_id: 'T01gqtPIL5J7', + context_enterprise_id: null, + api_app_id: 'A04QTPIHRR', + authorizations: [ + { + enterprise_id: null, + team_id: 'T0GFJL5J7', + user_id: 'W012CDE', + is_bot: true, + is_enterprise_install: false, + }, + ], + is_ext_shared_channel: false, + event_context: '4-wd6joiQfdgTRQTpIzdfifQ', + }), + }, + source: {}, }, ], method: 'POST', - headers: { - 'Content-Type': 'application/json', - }, + headers: { 'Content-Type': 'application/json' }, }, pathSuffix: '', }, @@ -211,23 +205,11 @@ export const data = [ batch: [ { context: { - library: { - name: 'unknown', - version: 'unknown', - }, - integration: { - name: 'SLACK', - }, - externalId: [ - { - type: 'slackUserId', - id: 'U04G7H550', - }, - ], - }, - integrations: { - SLACK: false, + library: { name: 'unknown', version: 'unknown' }, + integration: { name: 'SLACK' }, + externalId: [{ type: 'slackUserId', id: 'U04G7H550' }], }, + integrations: { SLACK: false }, type: 'track', event: 'Message', anonymousId: '7509c04f547b05afb6838aa742f4910263d6', @@ -258,10 +240,7 @@ export const data = [ type: 'channel', channel_id: 'C03CDQTPI65', }, - { - type: 'text', - text: ' to do this', - }, + { type: 'text', text: ' to do this' }, ], }, ],