diff --git a/CHANGELOG.md b/CHANGELOG.md index 451051777d..b769b51a6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,15 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [1.51.1](https://github.com/rudderlabs/rudder-transformer/compare/v1.51.0...v1.51.1) (2023-12-06) + + +### Bug Fixes + +* marketo backward compatibility ([#2880](https://github.com/rudderlabs/rudder-transformer/issues/2880)) ([af6aebb](https://github.com/rudderlabs/rudder-transformer/commit/af6aebba9a9891fadc91fe2dc4ae4db4b1e269c9)) +* marketo new field introduction backward compatibility ([cd6c3b0](https://github.com/rudderlabs/rudder-transformer/commit/cd6c3b0672a0b17078627f28f6613a2ef1898ee7)) +* remove ErrorResponse type from postTransfomration delivery ([b13f0a6](https://github.com/rudderlabs/rudder-transformer/commit/b13f0a6340177a56417692ad7dcf3829d4990826)) + ## [1.51.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.50.1...v1.51.0) (2023-12-06) diff --git a/package-lock.json b/package-lock.json index 24e6a3bc3a..27655f81ef 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rudder-transformer", - "version": "1.51.0", + "version": "1.51.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "rudder-transformer", - "version": "1.51.0", + "version": "1.51.1", "license": "ISC", "dependencies": { "@amplitude/ua-parser-js": "^0.7.24", diff --git a/package.json b/package.json index 457c0eecf2..a36ac26e9c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rudder-transformer", - "version": "1.51.0", + "version": "1.51.1", "description": "", "homepage": "https://github.com/rudderlabs/rudder-transformer#readme", "bugs": { diff --git a/src/cdk/v2/destinations/tiktok_audience/rtWorkflow.yaml b/src/cdk/v2/destinations/tiktok_audience/rtWorkflow.yaml index 3db4c405ad..a7fa855938 100644 --- a/src/cdk/v2/destinations/tiktok_audience/rtWorkflow.yaml +++ b/src/cdk/v2/destinations/tiktok_audience/rtWorkflow.yaml @@ -13,7 +13,6 @@ steps: loopOverInput: true - name: successfulEvents - debug: true template: | $.outputs.transform#idx{"output" in .}.({ "batchedRequest": .output, diff --git a/src/services/destination/postTransformation.ts b/src/services/destination/postTransformation.ts index 1e99961045..0b91eb7cc1 100644 --- a/src/services/destination/postTransformation.ts +++ b/src/services/destination/postTransformation.ts @@ -16,15 +16,6 @@ import { ErrorReportingService } from '../errorReporting'; import tags from '../../v0/util/tags'; import stats from '../../util/stats'; -type ErrorResponse = { - status?: number; - message?: string; - destinationResponse?: object; - statTags?: object; - authErrorCategory?: string | undefined; - response?: object | undefined; -}; - export class DestinationPostTransformationService { public static handleProcessorTransformSucessEvents( event: ProcessorTransformationRequest, @@ -148,7 +139,7 @@ export class DestinationPostTransformationService { } public static handleDeliveryFailureEvents( - error: ErrorResponse, + error: NonNullable, metaTo: MetaTransferObject, ): DeliveryResponse { const errObj = generateErrorObject(error, metaTo.errorDetails, false); @@ -161,12 +152,6 @@ export class DestinationPostTransformationService { authErrorCategory: errObj.authErrorCategory, }), } as DeliveryResponse; - - // for transformer-proxy to maintain contract - const { response } = error; - if (response) { - resp.response = response; - } ErrorReportingService.reportError(error, metaTo.errorContext, resp); return resp; } diff --git a/src/v0/destinations/marketo/config.js b/src/v0/destinations/marketo/config.js index 16449ebbad..604be41dc0 100644 --- a/src/v0/destinations/marketo/config.js +++ b/src/v0/destinations/marketo/config.js @@ -14,24 +14,18 @@ const DESTINATION = 'marketo'; const formatConfig = (destination) => ({ ID: destination.ID, ...destination.Config, - customActivityEventMap: getHashFromArray( - destination.Config.rudderEventsMapping, - 'event', - 'marketoActivityId', - false, - ), + customActivityEventMap: destination.Config?.rudderEventsMapping + ? getHashFromArray(destination.Config.rudderEventsMapping, 'event', 'marketoActivityId', false) + : getHashFromArray(destination.Config.customActivityEventMap, 'from', 'to', false), customActivityPropertyMap: getHashFromArray( destination.Config.customActivityPropertyMap, 'from', 'to', false, ), - customActivityPrimaryKeyMap: getHashFromArray( - destination.Config.rudderEventsMapping, - 'event', - 'marketoPrimarykey', - false, - ), + customActivityPrimaryKeyMap: destination.Config?.rudderEventsMapping + ? getHashFromArray(destination.Config.rudderEventsMapping, 'event', 'marketoPrimarykey', false) + : getHashFromArray(destination.Config.customActivityPrimaryKeyMap, 'from', 'to', false), leadTraitMapping: getHashFromArray(destination.Config.leadTraitMapping, 'from', 'to', false), responseRules: destination.DestinationDefinition ? destination.DestinationDefinition.ResponseRules diff --git a/test/__tests__/data/marketo_input.json b/test/__tests__/data/marketo_input.json index 6a891fdea0..10fff935fc 100644 --- a/test/__tests__/data/marketo_input.json +++ b/test/__tests__/data/marketo_input.json @@ -170,11 +170,16 @@ } ], "createIfNotExist": true, - "rudderEventsMapping": [ + "customActivityPrimaryKeyMap": [ { - "event": "Product Clicked", - "marketoPrimarykey": "name", - "marketoActivityId": "100001" + "from": "Product Clicked", + "to": "name" + } + ], + "customActivityEventMap": [ + { + "from": "Product Clicked", + "to": "100001" } ] }