diff --git a/src/v0/destinations/adobe_analytics/transform.js b/src/v0/destinations/adobe_analytics/transform.js index e6f1f32630d..ecc2fdd4573 100644 --- a/src/v0/destinations/adobe_analytics/transform.js +++ b/src/v0/destinations/adobe_analytics/transform.js @@ -340,7 +340,9 @@ const processTrackEvent = (message, adobeEventName, destinationConfig, extras = return { ...extras, events: overrideEventString || adobeEventArr.join(','), - products: overrideProductString || (Array.isArray(prodString) && prodString.length > 0 ? prodString : undefined), + products: + overrideProductString || + (Array.isArray(prodString) && prodString.length > 0 ? prodString : undefined), }; }; diff --git a/test/integrations/component.test.ts b/test/integrations/component.test.ts index 3175104cfa6..85c2eac2cd0 100644 --- a/test/integrations/component.test.ts +++ b/test/integrations/component.test.ts @@ -61,6 +61,7 @@ const INTEGRATIONS_WITH_UPDATED_TEST_STRUCTURE = [ 'klaviyo', 'campaign_manager', 'criteo_audience', + 'branch', ]; beforeAll(async () => { diff --git a/test/integrations/destinations/branch/processor/data.ts b/test/integrations/destinations/branch/processor/data.ts index 70da041d2b5..e5519b7c39a 100644 --- a/test/integrations/destinations/branch/processor/data.ts +++ b/test/integrations/destinations/branch/processor/data.ts @@ -1,7 +1,53 @@ -export const data = [ +/** + * Auto-migrated and optimized test cases + * Generated on: 2024-12-30T11:04:59.426Z + */ + +import { ProcessorTestData } from '../../../testTypes'; +import { Metadata } from '../../../../../src/types'; + +const baseMetadata: Metadata = { + sourceId: 'default-source', + workspaceId: 'default-workspace', + namespace: 'default-namespace', + instanceId: 'default-instance', + sourceType: 'default-source-type', + sourceCategory: 'default-category', + trackingPlanId: 'default-tracking-plan', + trackingPlanVersion: 1, + sourceTpConfig: {}, + mergedTpConfig: {}, + destinationId: 'default-destination', + jobRunId: 'default-job-run', + jobId: 1, + sourceBatchId: 'default-batch', + sourceJobId: 'default-source-job', + sourceJobRunId: 'default-source-job-run', + sourceTaskId: 'default-task', + sourceTaskRunId: 'default-task-run', + recordId: {}, + destinationType: 'default-destination-type', + messageId: 'default-message-id', + oauthAccessToken: 'default-token', + messageIds: ['default-message-id'], + rudderId: 'default-rudder-id', + receivedAt: '2024-12-30T11:04:58.693Z', + eventName: 'default-event', + eventType: 'default-type', + sourceDefinitionId: 'default-source-def', + destinationDefinitionId: 'default-dest-def', + transformationId: 'default-transform', + dontBatch: false, +}; + +export const data: ProcessorTestData[] = [ { + id: 'processor-1735556699424', name: 'branch', description: 'Test 0', + scenario: + 'Success scenario where the event will be mapped to standard event through default mappings', + successCriteria: 'Should hit the standard endpoint', feature: 'processor', module: 'destination', version: 'v0', @@ -9,21 +55,6 @@ export const data = [ request: { body: [ { - destination: { - Config: { - branchKey: '', - useNativeSDK: false, - }, - DestinationDefinition: { - DisplayName: 'Branch Metrics', - ID: '1WTpBSTiL3iAUHUdW7rHT4sawgU', - Name: 'BRANCH', - }, - Enabled: true, - ID: '1WTpIHpH7NTBgjeiUPW1kCUgZGI', - Name: 'branch test', - Transformations: [], - }, message: { anonymousId: 'sampath', channel: 'web', @@ -80,8 +111,30 @@ export const data = [ type: 'track', userId: 'sampath', }, + metadata: baseMetadata, + destination: { + ID: '1WTpIHpH7NTBgjeiUPW1kCUgZGI', + Name: 'branch test', + DestinationDefinition: { + DisplayName: 'Branch Metrics', + ID: '1WTpBSTiL3iAUHUdW7rHT4sawgU', + Name: 'BRANCH', + Config: {}, + }, + Config: { + branchKey: '', + useNativeSDK: false, + }, + Enabled: true, + WorkspaceID: 'default-workspace', + Transformations: [], + RevisionID: 'default-revision', + IsProcessorEnabled: true, + IsConnectionEnabled: true, + }, }, ], + method: 'POST', }, }, output: { @@ -129,6 +182,7 @@ export const data = [ files: {}, userId: 'sampath', }, + metadata: baseMetadata, statusCode: 200, }, ], @@ -136,8 +190,11 @@ export const data = [ }, }, { + id: 'processor-1735556699424', name: 'branch', description: 'Test 1', + scenario: 'Success scenario with identify event', + successCriteria: 'Should hit the custom endpoint with userId as event name', feature: 'processor', module: 'destination', version: 'v0', @@ -145,21 +202,6 @@ export const data = [ request: { body: [ { - destination: { - Config: { - branchKey: '', - useNativeSDK: false, - }, - DestinationDefinition: { - DisplayName: 'Branch Metrics', - ID: '1WTpBSTiL3iAUHUdW7rHT4sawgU', - Name: 'BRANCH', - }, - Enabled: true, - ID: '1WTpIHpH7NTBgjeiUPW1kCUgZGI', - Name: 'branch test', - Transformations: [], - }, message: { anonymousId: 'sampath', channel: 'web', @@ -212,8 +254,30 @@ export const data = [ type: 'identify', userId: 'sampath', }, + metadata: baseMetadata, + destination: { + ID: '1WTpIHpH7NTBgjeiUPW1kCUgZGI', + Name: 'branch test', + DestinationDefinition: { + DisplayName: 'Branch Metrics', + ID: '1WTpBSTiL3iAUHUdW7rHT4sawgU', + Name: 'BRANCH', + Config: {}, + }, + Config: { + branchKey: '', + useNativeSDK: false, + }, + Enabled: true, + WorkspaceID: 'default-workspace', + Transformations: [], + RevisionID: 'default-revision', + IsProcessorEnabled: true, + IsConnectionEnabled: true, + }, }, ], + method: 'POST', }, }, output: { @@ -261,6 +325,7 @@ export const data = [ files: {}, userId: 'sampath', }, + metadata: baseMetadata, statusCode: 200, }, ], @@ -268,8 +333,11 @@ export const data = [ }, }, { + id: 'processor-1735556699424', name: 'branch', description: 'Test 2', + scenario: 'Default processor scenario', + successCriteria: 'Processor test should pass successfully', feature: 'processor', module: 'destination', version: 'v0', @@ -277,112 +345,6 @@ export const data = [ request: { body: [ { - destination: { - Config: { - branchKey: '', - useNativeSDK: false, - }, - DestinationDefinition: { - DisplayName: 'Branch Metrics', - ID: '1WTpBSTiL3iAUHUdW7rHT4sawgU', - Name: 'BRANCH', - }, - Enabled: true, - ID: '1WTpIHpH7NTBgjeiUPW1kCUgZGI', - Name: 'branch test', - Transformations: [], - }, - message: { - anonymousId: 'sampath', - channel: 'web', - context: { - app: { - build: '1.0.0', - name: 'RudderLabs JavaScript SDK', - namespace: 'com.rudderlabs.javascript', - version: '1.0.0', - }, - ip: '0.0.0.0', - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.0.0', - }, - locale: 'en-US', - os: { - name: '', - version: '', - }, - screen: { - density: 2, - }, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', - }, - integrations: { - All: true, - }, - traits: { - anonymousId: 'sampath', - email: 'sampath@gmail.com', - }, - messageId: 'ea5cfab2-3961-4d8a-8187-3d1858c90a9f', - originalTimestamp: '2020-01-17T04:53:51.185Z', - receivedAt: '2020-01-17T10:23:52.688+05:30', - request_ip: '[::1]:64059', - sentAt: '2020-01-17T04:53:52.667Z', - timestamp: '2020-01-17T10:23:51.206+05:30', - type: 'page', - userId: 'sampath', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - statusCode: 400, - statTags: { - destType: 'BRANCH', - errorCategory: 'dataValidation', - errorType: 'instrumentation', - feature: 'processor', - implementation: 'native', - module: 'destination', - }, - error: 'Message type is not supported', - }, - ], - }, - }, - }, - { - name: 'branch', - description: 'Test 3', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - branchKey: '', - useNativeSDK: false, - }, - DestinationDefinition: { - DisplayName: 'Branch Metrics', - ID: '1WTpBSTiL3iAUHUdW7rHT4sawgU', - Name: 'BRANCH', - }, - Enabled: true, - ID: '1WTpIHpH7NTBgjeiUPW1kCUgZGI', - Name: 'branch test', - Transformations: [], - }, message: { anonymousId: 'sampath', channel: 'web', @@ -409,7 +371,7 @@ export const data = [ }, locale: 'en-US', os: { - name: 'watchos', + name: 'tvos', }, screen: { density: 2, @@ -437,8 +399,30 @@ export const data = [ type: 'track', userId: 'sampath', }, + metadata: baseMetadata, + destination: { + ID: '1WTpIHpH7NTBgjeiUPW1kCUgZGI', + Name: 'branch test', + DestinationDefinition: { + DisplayName: 'Branch Metrics', + ID: '1WTpBSTiL3iAUHUdW7rHT4sawgU', + Name: 'BRANCH', + Config: {}, + }, + Config: { + branchKey: '', + useNativeSDK: false, + }, + Enabled: true, + WorkspaceID: 'default-workspace', + Transformations: [], + RevisionID: 'default-revision', + IsProcessorEnabled: true, + IsConnectionEnabled: true, + }, }, ], + method: 'POST', }, }, output: { @@ -464,7 +448,7 @@ export const data = [ }, ], user_data: { - os: 'watchos', + os: 'tvos', app_version: '1.0.0', screen_dpi: 2, developer_identity: 'sampath', @@ -485,6 +469,7 @@ export const data = [ files: {}, userId: 'sampath', }, + metadata: baseMetadata, statusCode: 200, }, ], @@ -492,8 +477,11 @@ export const data = [ }, }, { + id: 'processor-1735556699424', name: 'branch', - description: 'Test 4', + description: 'Test 3', + scenario: 'Successful scenario with track event but without any products', + successCriteria: 'The transformed payload should not contain any content_items', feature: 'processor', module: 'destination', version: 'v0', @@ -501,21 +489,6 @@ export const data = [ request: { body: [ { - destination: { - Config: { - branchKey: '', - useNativeSDK: false, - }, - DestinationDefinition: { - DisplayName: 'Branch Metrics', - ID: '1WTpBSTiL3iAUHUdW7rHT4sawgU', - Name: 'BRANCH', - }, - Enabled: true, - ID: '1WTpIHpH7NTBgjeiUPW1kCUgZGI', - Name: 'branch test', - Transformations: [], - }, message: { anonymousId: 'sampath', channel: 'web', @@ -533,6 +506,7 @@ export const data = [ manufacturer: 'Google', model: 'AOSP on IA Emulator', name: 'generic_x86_arm', + type: 'ios', attTrackingStatus: 3, }, ip: '0.0.0.0', @@ -542,7 +516,8 @@ export const data = [ }, locale: 'en-US', os: { - name: 'ipados', + name: 'iOS', + version: '14.4.1', }, screen: { density: 2, @@ -560,9 +535,6 @@ export const data = [ }, messageId: 'ea5cfab2-3961-4d8a-8187-3d1858c90a9f', originalTimestamp: '2020-01-17T04:53:51.185Z', - properties: { - name: 'sampath', - }, receivedAt: '2020-01-17T10:23:52.688+05:30', request_ip: '[::1]:64059', sentAt: '2020-01-17T04:53:52.667Z', @@ -570,8 +542,30 @@ export const data = [ type: 'track', userId: 'sampath', }, + metadata: baseMetadata, + destination: { + ID: '1WTpIHpH7NTBgjeiUPW1kCUgZGI', + Name: 'branch test', + DestinationDefinition: { + DisplayName: 'Branch Metrics', + ID: '1WTpBSTiL3iAUHUdW7rHT4sawgU', + Name: 'BRANCH', + Config: {}, + }, + Config: { + branchKey: '', + useNativeSDK: false, + }, + Enabled: true, + WorkspaceID: 'default-workspace', + Transformations: [], + RevisionID: 'default-revision', + IsProcessorEnabled: true, + IsConnectionEnabled: true, + }, }, ], + method: 'POST', }, }, output: { @@ -591,13 +585,9 @@ export const data = [ params: {}, body: { JSON: { - content_items: [ - { - $product_name: 'sampath', - }, - ], user_data: { - os: 'ipados', + os: 'iOS', + os_version: '14.4.1', app_version: '1.0.0', screen_dpi: 2, developer_identity: 'sampath', @@ -618,6 +608,7 @@ export const data = [ files: {}, userId: 'sampath', }, + metadata: baseMetadata, statusCode: 200, }, ], @@ -625,8 +616,11 @@ export const data = [ }, }, { + id: 'processor-1735556699425', name: 'branch', - description: 'Test 5', + description: 'Test 4', + scenario: 'Failure scenario when event name is not present', + successCriteria: 'Should return error message for missing event name', feature: 'processor', module: 'destination', version: 'v0', @@ -634,31 +628,10 @@ export const data = [ request: { body: [ { - destination: { - Config: { - branchKey: '', - useNativeSDK: false, - }, - DestinationDefinition: { - DisplayName: 'Branch Metrics', - ID: '1WTpBSTiL3iAUHUdW7rHT4sawgU', - Name: 'BRANCH', - }, - Enabled: true, - ID: '1WTpIHpH7NTBgjeiUPW1kCUgZGI', - Name: 'branch test', - Transformations: [], - }, message: { anonymousId: 'sampath', channel: 'web', context: { - app: { - build: '1.0.0', - name: 'RudderLabs JavaScript SDK', - namespace: 'com.rudderlabs.javascript', - version: '1.0.0', - }, device: { adTrackingEnabled: true, advertisingId: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', @@ -666,6 +639,7 @@ export const data = [ manufacturer: 'Google', model: 'AOSP on IA Emulator', name: 'generic_x86_arm', + type: 'ios', attTrackingStatus: 3, }, ip: '0.0.0.0', @@ -675,10 +649,8 @@ export const data = [ }, locale: 'en-US', os: { - name: 'tvos', - }, - screen: { - density: 2, + name: 'iOS', + version: '14.4.1', }, traits: { anonymousId: 'sampath', @@ -687,753 +659,42 @@ export const data = [ userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', }, - event: 'product added', integrations: { All: true, }, messageId: 'ea5cfab2-3961-4d8a-8187-3d1858c90a9f', originalTimestamp: '2020-01-17T04:53:51.185Z', - properties: { - name: 'sampath', - }, - receivedAt: '2020-01-17T10:23:52.688+05:30', - request_ip: '[::1]:64059', - sentAt: '2020-01-17T04:53:52.667Z', - timestamp: '2020-01-17T10:23:51.206+05:30', - type: 'track', - userId: 'sampath', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://api2.branch.io/v2/event/standard', - headers: { - 'Content-Type': 'application/json', - Accept: 'application/json', - }, - params: {}, - body: { - JSON: { - content_items: [ - { - $product_name: 'sampath', - }, - ], - user_data: { - os: 'tvos', - app_version: '1.0.0', - screen_dpi: 2, - developer_identity: 'sampath', - idfa: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', - idfv: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', - limit_ad_tracking: false, - model: 'AOSP on IA Emulator', - user_agent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', - }, - name: 'ADD_TO_CART', - branch_key: '', - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: 'sampath', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'branch', - description: 'Test 6', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - branchKey: '', - useNativeSDK: false, - }, - DestinationDefinition: { - DisplayName: 'Branch Metrics', - ID: '1WTpBSTiL3iAUHUdW7rHT4sawgU', - Name: 'BRANCH', - }, - Enabled: true, - ID: '1WTpIHpH7NTBgjeiUPW1kCUgZGI', - Name: 'branch test', - Transformations: [], - }, - message: { - anonymousId: 'sampath', - channel: 'web', - context: { - app: { - build: '1.0.0', - name: 'RudderLabs JavaScript SDK', - namespace: 'com.rudderlabs.javascript', - version: '1.0.0', - }, - device: { - adTrackingEnabled: true, - advertisingId: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', - id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', - manufacturer: 'Google', - model: 'AOSP on IA Emulator', - name: 'generic_x86_arm', - type: 'ios', - attTrackingStatus: 3, - }, - ip: '0.0.0.0', - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.0.0', - }, - locale: 'en-US', - os: { - name: 'iOS', - version: '14.4.1', - }, - screen: { - density: 2, - }, - traits: { - anonymousId: 'sampath', - email: 'sampath@gmail.com', - }, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', - }, - event: 'product added', - integrations: { - All: true, - }, - messageId: 'ea5cfab2-3961-4d8a-8187-3d1858c90a9f', - originalTimestamp: '2020-01-17T04:53:51.185Z', - receivedAt: '2020-01-17T10:23:52.688+05:30', - request_ip: '[::1]:64059', - sentAt: '2020-01-17T04:53:52.667Z', - timestamp: '2020-01-17T10:23:51.206+05:30', - type: 'track', - userId: 'sampath', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://api2.branch.io/v2/event/standard', - headers: { - 'Content-Type': 'application/json', - Accept: 'application/json', - }, - params: {}, - body: { - JSON: { - user_data: { - os: 'iOS', - os_version: '14.4.1', - app_version: '1.0.0', - screen_dpi: 2, - developer_identity: 'sampath', - idfa: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', - idfv: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', - limit_ad_tracking: false, - model: 'AOSP on IA Emulator', - user_agent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', - }, - name: 'ADD_TO_CART', - branch_key: '', - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: 'sampath', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'branch', - description: 'Test 7', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - branchKey: '', - useNativeSDK: false, - }, - DestinationDefinition: { - DisplayName: 'Branch Metrics', - ID: '1WTpBSTiL3iAUHUdW7rHT4sawgU', - Name: 'BRANCH', - }, - Enabled: true, - ID: '1WTpIHpH7NTBgjeiUPW1kCUgZGI', - Name: 'branch test', - Transformations: [], - }, - message: { - anonymousId: 'sampath', - channel: 'web', - context: { - app: { - build: '1.0.0', - name: 'RudderLabs JavaScript SDK', - namespace: 'com.rudderlabs.javascript', - version: '1.0.0', - }, - device: { - adTrackingEnabled: true, - advertisingId: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', - id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', - manufacturer: 'Google', - model: 'AOSP on IA Emulator', - name: 'generic_x86_arm', - type: 'ios', - attTrackingStatus: 3, - }, - ip: '0.0.0.0', - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.0.0', - }, - locale: 'en-US', - screen: { - density: 2, - }, - traits: { - anonymousId: 'sampath', - email: 'sampath@gmail.com', - }, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', - }, - event: 'product added', - integrations: { - All: true, - }, - messageId: 'ea5cfab2-3961-4d8a-8187-3d1858c90a9f', - originalTimestamp: '2020-01-17T04:53:51.185Z', - receivedAt: '2020-01-17T10:23:52.688+05:30', - request_ip: '[::1]:64059', - sentAt: '2020-01-17T04:53:52.667Z', - timestamp: '2020-01-17T10:23:51.206+05:30', - type: 'track', - userId: 'sampath', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://api2.branch.io/v2/event/standard', - headers: { - 'Content-Type': 'application/json', - Accept: 'application/json', - }, - params: {}, - body: { - JSON: { - user_data: { - app_version: '1.0.0', - screen_dpi: 2, - developer_identity: 'sampath', - limit_ad_tracking: false, - model: 'AOSP on IA Emulator', - user_agent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', - }, - name: 'ADD_TO_CART', - branch_key: '', - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: 'sampath', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'branch', - description: 'Test 8', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - branchKey: '', - useNativeSDK: false, - }, - DestinationDefinition: { - DisplayName: 'Branch Metrics', - ID: '1WTpBSTiL3iAUHUdW7rHT4sawgU', - Name: 'BRANCH', - }, - Enabled: true, - ID: '1WTpIHpH7NTBgjeiUPW1kCUgZGI', - Name: 'branch test', - Transformations: [], - }, - message: { - anonymousId: 'sampath', - channel: 'web', - context: { - device: { - adTrackingEnabled: true, - advertisingId: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', - id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', - manufacturer: 'Google', - model: 'AOSP on IA Emulator', - name: 'generic_x86_arm', - type: 'ios', - attTrackingStatus: 3, - }, - ip: '0.0.0.0', - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.0.0', - }, - locale: 'en-US', - os: { - name: 'iOS', - version: '14.4.1', - }, - traits: { - anonymousId: 'sampath', - email: 'sampath@gmail.com', - }, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', - }, - event: 'product added', - integrations: { - All: true, - }, - messageId: 'ea5cfab2-3961-4d8a-8187-3d1858c90a9f', - originalTimestamp: '2020-01-17T04:53:51.185Z', - receivedAt: '2020-01-17T10:23:52.688+05:30', - request_ip: '[::1]:64059', - sentAt: '2020-01-17T04:53:52.667Z', - timestamp: '2020-01-17T10:23:51.206+05:30', - type: 'track', - userId: 'sampath', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://api2.branch.io/v2/event/standard', - headers: { - 'Content-Type': 'application/json', - Accept: 'application/json', - }, - params: {}, - body: { - JSON: { - user_data: { - os: 'iOS', - os_version: '14.4.1', - developer_identity: 'sampath', - idfa: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', - idfv: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', - limit_ad_tracking: false, - model: 'AOSP on IA Emulator', - user_agent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', - }, - name: 'ADD_TO_CART', - branch_key: '', - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: 'sampath', - }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'branch', - description: 'Test 9', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - branchKey: '', - useNativeSDK: false, - }, - DestinationDefinition: { - DisplayName: 'Branch Metrics', - ID: '1WTpBSTiL3iAUHUdW7rHT4sawgU', - Name: 'BRANCH', - }, - Enabled: true, - ID: '1WTpIHpH7NTBgjeiUPW1kCUgZGI', - Name: 'branch test', - Transformations: [], - }, - message: { - anonymousId: 'sampath', - channel: 'web', - context: { - device: { - adTrackingEnabled: true, - advertisingId: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', - id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', - manufacturer: 'Google', - model: 'AOSP on IA Emulator', - name: 'generic_x86_arm', - type: 'ios', - attTrackingStatus: 3, - }, - ip: '0.0.0.0', - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.0.0', - }, - locale: 'en-US', - os: { - name: 'iOS', - version: '14.4.1', - }, - traits: { - anonymousId: 'sampath', - email: 'sampath@gmail.com', - }, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', - }, - integrations: { - All: true, - }, - messageId: 'ea5cfab2-3961-4d8a-8187-3d1858c90a9f', - originalTimestamp: '2020-01-17T04:53:51.185Z', - receivedAt: '2020-01-17T10:23:52.688+05:30', - request_ip: '[::1]:64059', - sentAt: '2020-01-17T04:53:52.667Z', - timestamp: '2020-01-17T10:23:51.206+05:30', - type: 'track', - userId: 'sampath', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - statusCode: 400, - error: 'Event name is required', - statTags: { - destType: 'BRANCH', - errorCategory: 'dataValidation', - errorType: 'instrumentation', - feature: 'processor', - implementation: 'native', - module: 'destination', - }, - }, - ], - }, - }, - }, - { - name: 'branch', - description: 'Test 10', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { - destination: { - Config: { - branchKey: '', - useNativeSDK: false, - }, - DestinationDefinition: { - DisplayName: 'Branch Metrics', - ID: '1WTpBSTiL3iAUHUdW7rHT4sawgU', - Name: 'BRANCH', - }, - Enabled: true, - ID: '1WTpIHpH7NTBgjeiUPW1kCUgZGI', - Name: 'branch test', - Transformations: [], - }, - message: { - anonymousId: 'sampath', - channel: 'web', - context: { - app: { - build: '1.0.0', - name: 'RudderLabs JavaScript SDK', - namespace: 'com.rudderlabs.javascript', - version: '1.0.0', - }, - device: { - adTrackingEnabled: true, - advertisingId: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', - id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', - manufacturer: 'Google', - model: 'AOSP on IA Emulator', - name: 'generic_x86_arm', - type: 'Android', - attTrackingStatus: 2, - brand: 'testBrand', - }, - ip: '0.0.0.0', - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.0.0', - }, - locale: 'en-US', - os: { - name: 'Android', - version: '9', - }, - screen: { - density: 2, - height: 1794, - width: 1080, - }, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', - }, - integrations: { - All: true, - }, - traits: { - anonymousId: 'sampath', - email: 'sampath@gmail.com', - }, - messageId: 'ea5cfab2-3961-4d8a-8187-3d1858c90a9f', - originalTimestamp: '2020-01-17T04:53:51.185Z', receivedAt: '2020-01-17T10:23:52.688+05:30', request_ip: '[::1]:64059', sentAt: '2020-01-17T04:53:52.667Z', timestamp: '2020-01-17T10:23:51.206+05:30', - type: 'identify', - userId: 'sampath', - }, - }, - ], - }, - }, - output: { - response: { - status: 200, - body: [ - { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://api2.branch.io/v2/event/custom', - headers: { - 'Content-Type': 'application/json', - Accept: 'application/json', - }, - params: {}, - body: { - JSON: { - custom_data: { - anonymousId: 'sampath', - email: 'sampath@gmail.com', - }, - content_items: [{}], - user_data: { - os: 'Android', - os_version: '9', - app_version: '1.0.0', - model: 'AOSP on IA Emulator', - brand: 'testBrand', - screen_dpi: 2, - screen_height: 1794, - screen_width: 1080, - developer_identity: 'sampath', - user_agent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', - android_id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', - aaid: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', - limit_ad_tracking: true, - }, - name: 'sampath', - branch_key: '', - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, + type: 'track', userId: 'sampath', }, - statusCode: 200, - }, - ], - }, - }, - }, - { - name: 'branch', - description: 'Test 11', - feature: 'processor', - module: 'destination', - version: 'v0', - input: { - request: { - body: [ - { + metadata: baseMetadata, destination: { - Config: { - branchKey: '', - useNativeSDK: false, - }, + ID: '1WTpIHpH7NTBgjeiUPW1kCUgZGI', + Name: 'branch test', DestinationDefinition: { DisplayName: 'Branch Metrics', ID: '1WTpBSTiL3iAUHUdW7rHT4sawgU', Name: 'BRANCH', + Config: {}, + }, + Config: { + branchKey: '', + useNativeSDK: false, }, Enabled: true, - ID: '1WTpIHpH7NTBgjeiUPW1kCUgZGI', - Name: 'branch test', + WorkspaceID: 'default-workspace', Transformations: [], - }, - message: { - anonymousId: 'sampath', - channel: 'web', - context: { - app: { - build: '1.0.0', - name: 'RudderLabs JavaScript SDK', - namespace: 'com.rudderlabs.javascript', - version: '1.0.0', - }, - device: { - adTrackingEnabled: true, - advertisingId: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', - id: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', - manufacturer: 'Google', - model: 'AOSP on IA Emulator', - name: 'generic_x86_arm', - type: 'ios', - attTrackingStatus: 2, - brand: 'testBrand', - }, - ip: '0.0.0.0', - library: { - name: 'RudderLabs JavaScript SDK', - version: '1.0.0', - }, - locale: 'en-US', - os: { - name: 'iOS', - version: '14.4.1', - }, - screen: { - density: 2, - height: 1794, - width: 1080, - }, - userAgent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', - }, - integrations: { - All: true, - }, - traits: { - anonymousId: 'sampath', - email: 'sampath@gmail.com', - }, - messageId: 'ea5cfab2-3961-4d8a-8187-3d1858c90a9f', - originalTimestamp: '2020-01-17T04:53:51.185Z', - receivedAt: '2020-01-17T10:23:52.688+05:30', - request_ip: '[::1]:64059', - sentAt: '2020-01-17T04:53:52.667Z', - timestamp: '2020-01-17T10:23:51.206+05:30', - type: 'identify', - userId: 'sampath', + RevisionID: 'default-revision', + IsProcessorEnabled: true, + IsConnectionEnabled: true, }, }, ], + method: 'POST', }, }, output: { @@ -1441,86 +702,38 @@ export const data = [ status: 200, body: [ { - output: { - version: '1', - type: 'REST', - method: 'POST', - endpoint: 'https://api2.branch.io/v2/event/custom', - headers: { - 'Content-Type': 'application/json', - Accept: 'application/json', - }, - params: {}, - body: { - JSON: { - custom_data: { - anonymousId: 'sampath', - email: 'sampath@gmail.com', - }, - content_items: [{}], - user_data: { - os: 'iOS', - os_version: '14.4.1', - app_version: '1.0.0', - model: 'AOSP on IA Emulator', - brand: 'testBrand', - screen_dpi: 2, - screen_height: 1794, - screen_width: 1080, - developer_identity: 'sampath', - user_agent: - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', - idfa: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', - idfv: '3f034872-5e28-45a1-9eda-ce22a3e36d1a', - limit_ad_tracking: true, - }, - name: 'sampath', - branch_key: '', - }, - JSON_ARRAY: {}, - XML: {}, - FORM: {}, - }, - files: {}, - userId: 'sampath', + metadata: baseMetadata, + statusCode: 400, + error: 'Event name is required', + statTags: { + destType: 'BRANCH', + destinationId: 'default-destination', + errorCategory: 'dataValidation', + errorType: 'instrumentation', + feature: 'processor', + implementation: 'native', + module: 'destination', + workspaceId: 'default-workspace', }, - statusCode: 200, }, ], }, }, }, { + id: 'processor-1735556699425', name: 'branch', - description: 'Map event name to branch standard event name in track call', + description: 'Test 5', + scenario: 'Default processor scenario', + successCriteria: 'Processor test should pass successfully', feature: 'processor', module: 'destination', version: 'v0', input: { request: { + method: 'POST', body: [ { - destination: { - Config: { - branchKey: 'test_branch_key', - eventsMapping: [ - { - from: 'Some Random Event', - to: 'PURCHASE', - }, - ], - useNativeSDK: false, - }, - DestinationDefinition: { - DisplayName: 'Branch Metrics', - ID: '1WTpBSTiL3iAUHUdW7rHT4sawgU', - Name: 'BRANCH', - }, - Enabled: true, - ID: '1WTpIHpH7NTBgjeiUPW1kCUgZGI', - Name: 'branch test', - Transformations: [], - }, message: { anonymousId: 'anonId123', channel: 'web', @@ -1582,6 +795,33 @@ export const data = [ type: 'track', userId: 'userId123', }, + metadata: baseMetadata, + destination: { + ID: '1WTpIHpH7NTBgjeiUPW1kCUgZGI', + Name: 'branch test', + DestinationDefinition: { + DisplayName: 'Branch Metrics', + ID: '1WTpBSTiL3iAUHUdW7rHT4sawgU', + Name: 'BRANCH', + Config: {}, + }, + Config: { + branchKey: 'test_branch_key', + eventsMapping: [ + { + from: 'Some Random Event', + to: 'PURCHASE', + }, + ], + useNativeSDK: false, + }, + Enabled: true, + WorkspaceID: 'default-workspace', + Transformations: [], + RevisionID: 'default-revision', + IsProcessorEnabled: true, + IsConnectionEnabled: true, + }, }, ], }, @@ -1640,6 +880,7 @@ export const data = [ files: {}, userId: 'anonId123', }, + metadata: baseMetadata, statusCode: 200, }, ], diff --git a/test/integrations/destinations/branch/router/data.ts b/test/integrations/destinations/branch/router/data.ts index 6451c463f18..ddfebb4e1bb 100644 --- a/test/integrations/destinations/branch/router/data.ts +++ b/test/integrations/destinations/branch/router/data.ts @@ -1,7 +1,18 @@ -export const data = [ +/** + * Auto-migrated and optimized test cases + * Generated on: 2024-12-30T12:23:26.084Z + */ + +import { RouterTestData } from '../../../testTypes'; +import {} from '../../../../../src/types'; + +export const data: RouterTestData[] = [ { + id: 'router-1735561406084', name: 'branch', description: 'Test 0', + scenario: 'Default router scenario', + successCriteria: 'Router test should pass successfully', feature: 'router', module: 'destination', version: 'v0', @@ -10,19 +21,6 @@ export const data = [ body: { input: [ { - destination: { - Config: { branchKey: '', useNativeSDK: false }, - DestinationDefinition: { - DisplayName: 'Branch Metrics', - ID: '1WTpBSTiL3iAUHUdW7rHT4sawgU', - Name: 'BRANCH', - }, - Enabled: true, - ID: '1WTpIHpH7NTBgjeiUPW1kCUgZGI', - Name: 'branch test', - Transformations: [], - }, - metadata: { jobId: 1, userId: 'u1' }, message: { anonymousId: 'sampath', channel: 'web', @@ -34,19 +32,34 @@ export const data = [ version: '1.0.0', }, ip: '0.0.0.0', - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, locale: 'en-US', - os: { name: 'iOS', version: '' }, - screen: { density: 2 }, - traits: { anonymousId: 'sampath', email: 'sampath@gmail.com' }, + os: { + name: 'iOS', + version: '', + }, + screen: { + density: 2, + }, + traits: { + anonymousId: 'sampath', + email: 'sampath@gmail.com', + }, userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', }, event: 'product added', - integrations: { All: true }, + integrations: { + All: true, + }, messageId: 'ea5cfab2-3961-4d8a-8187-3d1858c90a9f', originalTimestamp: '2020-01-17T04:53:51.185Z', - properties: { name: 'sampath' }, + properties: { + name: 'sampath', + }, receivedAt: '2020-01-17T10:23:52.688+05:30', request_ip: '[::1]:64059', sentAt: '2020-01-17T04:53:52.667Z', @@ -54,21 +67,61 @@ export const data = [ type: 'track', userId: 'sampath', }, - }, - { + metadata: { + sourceId: 'default-source', + workspaceId: 'default-workspace', + namespace: 'default-namespace', + instanceId: 'default-instance', + sourceType: 'default-source-type', + sourceCategory: 'default-category', + trackingPlanId: 'default-tracking-plan', + trackingPlanVersion: 1, + sourceTpConfig: {}, + mergedTpConfig: {}, + destinationId: 'default-destination', + jobRunId: 'default-job-run', + jobId: 1, + sourceBatchId: 'default-batch', + sourceJobId: 'default-source-job', + sourceJobRunId: 'default-source-job-run', + sourceTaskId: 'default-task', + sourceTaskRunId: 'default-task-run', + recordId: {}, + destinationType: 'default-destination-type', + messageId: 'default-message-id', + oauthAccessToken: 'default-token', + messageIds: ['default-message-id'], + rudderId: 'default-rudder-id', + receivedAt: '2024-12-30T12:23:25.430Z', + eventName: 'default-event', + eventType: 'default-type', + sourceDefinitionId: 'default-source-def', + destinationDefinitionId: 'default-dest-def', + transformationId: 'default-transform', + dontBatch: false, + }, destination: { - Config: { branchKey: '', useNativeSDK: false }, + ID: '1WTpIHpH7NTBgjeiUPW1kCUgZGI', + Name: 'branch test', DestinationDefinition: { DisplayName: 'Branch Metrics', ID: '1WTpBSTiL3iAUHUdW7rHT4sawgU', Name: 'BRANCH', + Config: {}, + }, + Config: { + branchKey: '', + useNativeSDK: false, }, Enabled: true, - ID: '1WTpIHpH7NTBgjeiUPW1kCUgZGI', - Name: 'branch test', + WorkspaceID: 'default-workspace', Transformations: [], + RevisionID: 'default-revision', + IsProcessorEnabled: true, + IsConnectionEnabled: true, }, - metadata: { jobId: 2, userId: 'u1' }, + }, + { message: { anonymousId: 'sampath', channel: 'web', @@ -80,15 +133,28 @@ export const data = [ version: '1.0.0', }, ip: '0.0.0.0', - library: { name: 'RudderLabs JavaScript SDK', version: '1.0.0' }, + library: { + name: 'RudderLabs JavaScript SDK', + version: '1.0.0', + }, locale: 'en-US', - os: { name: 'iOS', version: '' }, - screen: { density: 2 }, + os: { + name: 'iOS', + version: '', + }, + screen: { + density: 2, + }, userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36', }, - integrations: { All: true }, - traits: { anonymousId: 'sampath', email: 'sampath@gmail.com' }, + integrations: { + All: true, + }, + traits: { + anonymousId: 'sampath', + email: 'sampath@gmail.com', + }, messageId: 'ea5cfab2-3961-4d8a-8187-3d1858c90a9f', originalTimestamp: '2020-01-17T04:53:51.185Z', receivedAt: '2020-01-17T10:23:52.688+05:30', @@ -98,6 +164,59 @@ export const data = [ type: 'identify', userId: 'sampath', }, + metadata: { + sourceId: 'default-source', + workspaceId: 'default-workspace', + namespace: 'default-namespace', + instanceId: 'default-instance', + sourceType: 'default-source-type', + sourceCategory: 'default-category', + trackingPlanId: 'default-tracking-plan', + trackingPlanVersion: 1, + sourceTpConfig: {}, + mergedTpConfig: {}, + destinationId: 'default-destination', + jobRunId: 'default-job-run', + jobId: 2, + sourceBatchId: 'default-batch', + sourceJobId: 'default-source-job', + sourceJobRunId: 'default-source-job-run', + sourceTaskId: 'default-task', + sourceTaskRunId: 'default-task-run', + recordId: {}, + destinationType: 'default-destination-type', + messageId: 'default-message-id', + oauthAccessToken: 'default-token', + messageIds: ['default-message-id'], + rudderId: 'default-rudder-id', + receivedAt: '2024-12-30T12:23:25.430Z', + eventName: 'default-event', + eventType: 'default-type', + sourceDefinitionId: 'default-source-def', + destinationDefinitionId: 'default-dest-def', + transformationId: 'default-transform', + dontBatch: false, + }, + destination: { + ID: '1WTpIHpH7NTBgjeiUPW1kCUgZGI', + Name: 'branch test', + DestinationDefinition: { + DisplayName: 'Branch Metrics', + ID: '1WTpBSTiL3iAUHUdW7rHT4sawgU', + Name: 'BRANCH', + Config: {}, + }, + Config: { + branchKey: '', + useNativeSDK: false, + }, + Enabled: true, + WorkspaceID: 'default-workspace', + Transformations: [], + RevisionID: 'default-revision', + IsProcessorEnabled: true, + IsConnectionEnabled: true, + }, }, ], destType: 'branch', @@ -116,13 +235,20 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://api2.branch.io/v2/event/standard', - headers: { 'Content-Type': 'application/json', Accept: 'application/json' }, + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + }, params: {}, body: { JSON: { branch_key: '', name: 'ADD_TO_CART', - content_items: [{ $product_name: 'sampath' }], + content_items: [ + { + $product_name: 'sampath', + }, + ], user_data: { os: 'iOS', os_version: '', @@ -140,21 +266,63 @@ export const data = [ files: {}, userId: 'sampath', }, - metadata: [{ jobId: 1, userId: 'u1' }], - batched: false, + metadata: [ + { + sourceId: 'default-source', + workspaceId: 'default-workspace', + namespace: 'default-namespace', + instanceId: 'default-instance', + sourceType: 'default-source-type', + sourceCategory: 'default-category', + trackingPlanId: 'default-tracking-plan', + trackingPlanVersion: 1, + sourceTpConfig: {}, + mergedTpConfig: {}, + destinationId: 'default-destination', + jobRunId: 'default-job-run', + jobId: 1, + sourceBatchId: 'default-batch', + sourceJobId: 'default-source-job', + sourceJobRunId: 'default-source-job-run', + sourceTaskId: 'default-task', + sourceTaskRunId: 'default-task-run', + recordId: {}, + destinationType: 'default-destination-type', + messageId: 'default-message-id', + oauthAccessToken: 'default-token', + messageIds: ['default-message-id'], + rudderId: 'default-rudder-id', + receivedAt: '2024-12-30T12:23:25.430Z', + eventName: 'default-event', + eventType: 'default-type', + sourceDefinitionId: 'default-source-def', + destinationDefinitionId: 'default-dest-def', + transformationId: 'default-transform', + dontBatch: false, + }, + ], statusCode: 200, destination: { - Config: { branchKey: '', useNativeSDK: false }, + ID: '1WTpIHpH7NTBgjeiUPW1kCUgZGI', + Name: 'branch test', DestinationDefinition: { DisplayName: 'Branch Metrics', ID: '1WTpBSTiL3iAUHUdW7rHT4sawgU', Name: 'BRANCH', + Config: {}, + }, + Config: { + branchKey: '', + useNativeSDK: false, }, Enabled: true, - ID: '1WTpIHpH7NTBgjeiUPW1kCUgZGI', - Name: 'branch test', + WorkspaceID: 'default-workspace', Transformations: [], + RevisionID: 'default-revision', + IsProcessorEnabled: true, + IsConnectionEnabled: true, }, + batched: false, }, { batchedRequest: { @@ -162,13 +330,19 @@ export const data = [ type: 'REST', method: 'POST', endpoint: 'https://api2.branch.io/v2/event/custom', - headers: { 'Content-Type': 'application/json', Accept: 'application/json' }, + headers: { + 'Content-Type': 'application/json', + Accept: 'application/json', + }, params: {}, body: { JSON: { branch_key: '', name: 'sampath', - custom_data: { anonymousId: 'sampath', email: 'sampath@gmail.com' }, + custom_data: { + anonymousId: 'sampath', + email: 'sampath@gmail.com', + }, content_items: [{}], user_data: { os: 'iOS', @@ -187,21 +361,63 @@ export const data = [ files: {}, userId: 'sampath', }, - metadata: [{ jobId: 2, userId: 'u1' }], - batched: false, + metadata: [ + { + sourceId: 'default-source', + workspaceId: 'default-workspace', + namespace: 'default-namespace', + instanceId: 'default-instance', + sourceType: 'default-source-type', + sourceCategory: 'default-category', + trackingPlanId: 'default-tracking-plan', + trackingPlanVersion: 1, + sourceTpConfig: {}, + mergedTpConfig: {}, + destinationId: 'default-destination', + jobRunId: 'default-job-run', + jobId: 2, + sourceBatchId: 'default-batch', + sourceJobId: 'default-source-job', + sourceJobRunId: 'default-source-job-run', + sourceTaskId: 'default-task', + sourceTaskRunId: 'default-task-run', + recordId: {}, + destinationType: 'default-destination-type', + messageId: 'default-message-id', + oauthAccessToken: 'default-token', + messageIds: ['default-message-id'], + rudderId: 'default-rudder-id', + receivedAt: '2024-12-30T12:23:25.430Z', + eventName: 'default-event', + eventType: 'default-type', + sourceDefinitionId: 'default-source-def', + destinationDefinitionId: 'default-dest-def', + transformationId: 'default-transform', + dontBatch: false, + }, + ], statusCode: 200, destination: { - Config: { branchKey: '', useNativeSDK: false }, + ID: '1WTpIHpH7NTBgjeiUPW1kCUgZGI', + Name: 'branch test', DestinationDefinition: { DisplayName: 'Branch Metrics', ID: '1WTpBSTiL3iAUHUdW7rHT4sawgU', Name: 'BRANCH', + Config: {}, + }, + Config: { + branchKey: '', + useNativeSDK: false, }, Enabled: true, - ID: '1WTpIHpH7NTBgjeiUPW1kCUgZGI', - Name: 'branch test', + WorkspaceID: 'default-workspace', Transformations: [], + RevisionID: 'default-revision', + IsProcessorEnabled: true, + IsConnectionEnabled: true, }, + batched: false, }, ], },