Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:rudderlabs/rudder-transformer in…
Browse files Browse the repository at this point in the history
…to chore.format-standard
  • Loading branch information
Sai Sankeerth committed Feb 12, 2024
2 parents 4dc767a + de3518f commit 3b1db74
Show file tree
Hide file tree
Showing 24 changed files with 1,869 additions and 102 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@

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.55.0](https://github.com/rudderlabs/rudder-transformer/compare/v1.54.4...v1.55.0) (2024-02-05)


### Features

* add new stat for access token expired in fb custom audience ([#3043](https://github.com/rudderlabs/rudder-transformer/issues/3043)) ([1e6d540](https://github.com/rudderlabs/rudder-transformer/commit/1e6d540fafc61a84fbbaa63d4bc5b1edc17ec44e))
* **intercom:** upgrade intercom version from 1.4 to 2.10 ([#2976](https://github.com/rudderlabs/rudder-transformer/issues/2976)) ([717639b](https://github.com/rudderlabs/rudder-transformer/commit/717639bcce605109b145eb4cc6836fe1589278fe))
* onboard new destination rakuten ([#3046](https://github.com/rudderlabs/rudder-transformer/issues/3046)) ([c7c3110](https://github.com/rudderlabs/rudder-transformer/commit/c7c3110a4526e31bc296abb33f3246fa8eee049a))
* trade desk real time conversions ([#3023](https://github.com/rudderlabs/rudder-transformer/issues/3023)) ([212d5f0](https://github.com/rudderlabs/rudder-transformer/commit/212d5f09d8addc618d4398029e62c9a18a9512cf))


### Bug Fixes

* adding map for marketo known values and javascript known values ([#3037](https://github.com/rudderlabs/rudder-transformer/issues/3037)) ([64ab555](https://github.com/rudderlabs/rudder-transformer/commit/64ab555d31b4c1c49863794444bd79b2b6a45927))
* mixpanel timestamp in ms ([#3028](https://github.com/rudderlabs/rudder-transformer/issues/3028)) ([5ad55a2](https://github.com/rudderlabs/rudder-transformer/commit/5ad55a27c8b737fd96f65c68ba086769747c5360))
* upgrade ua-parser-js from 1.0.35 to 1.0.37 ([9a4cdef](https://github.com/rudderlabs/rudder-transformer/commit/9a4cdef59ab1c2d9dc95eb8629a7009d8d633297))

### [1.54.4](https://github.com/rudderlabs/rudder-transformer/compare/v1.54.3...v1.54.4) (2024-01-31)


Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rudder-transformer",
"version": "1.54.4",
"version": "1.55.0",
"description": "",
"homepage": "https://github.com/rudderlabs/rudder-transformer#readme",
"bugs": {
Expand Down
2 changes: 1 addition & 1 deletion src/cdk/v2/destinations/intercom/procWorkflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ steps:
version;
- name: rEtlPayload
condition: .message.context.mappedToDestination === true
condition: .message.context.mappedToDestination
template: |
$.addExternalIdToTraits(.message);
const payload = $.getFieldValueFromMessage(.message, "traits");
Expand Down
2 changes: 1 addition & 1 deletion src/cdk/v2/destinations/rakuten/procWorkflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ steps:
template: |
const properties = $.constructProperties(.message);
const lineItems = $.constructLineItems(.message.properties)
$.context.payload = {...properties,...lineItems,xml:1, mid:.destination.Config.mid}
$.context.payload = {...properties,...lineItems,xml:1,source:'rudderstack', mid:.destination.Config.mid}
$.context.payload = $.removeUndefinedAndNullValues($.context.payload);
- name: buildResponse
Expand Down
9 changes: 7 additions & 2 deletions src/cdk/v2/destinations/the_trade_desk/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,10 @@ const prepareItemsPayload = (message) => {
let items;
const eventMapInfo = ECOMM_EVENT_MAP[event.toLowerCase()];
if (eventMapInfo?.itemsArray) {
// if event is one of the supported ecommerce events and products array is present
items = prepareItemsFromProducts(message);
} else if (eventMapInfo) {
// if event is one of the supported ecommerce events and products array is not present
items = prepareItemsFromProperties(message);
}
return items;
Expand Down Expand Up @@ -304,14 +306,17 @@ const enrichTrackPayload = (message, payload) => {
if (eventsMapInfo && !eventsMapInfo.itemsArray) {
const itemExclusionList = generateExclusionList(ITEM_CONFIGS);
rawPayload = extractCustomFields(message, rawPayload, ['properties'], itemExclusionList);
} else {
// for custom events
} else if (eventsMapInfo) {
// for ecomm events with products array supports. e.g Order Completed event
rawPayload = extractCustomFields(
message,
rawPayload,
['properties'],
['products', 'revenue', 'value'],
);
} else {
// for custom events
rawPayload = extractCustomFields(message, rawPayload, ['properties'], ['value']);
}
return rawPayload;
};
Expand Down
28 changes: 19 additions & 9 deletions src/cdk/v2/destinations/the_trade_desk/utils.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -635,25 +635,35 @@ describe('enrichTrackPayload', () => {
order_id: 'ord123',
property1: 'value1',
property2: 'value2',
revenue: 10,
value: 11,
products: [
{
product_id: 'prd123',
test: 'test',
},
],
},
};
const payload = {
order_id: 'ord123',
value: 11,
};
let expectedPayload = {
const expectedPayload = {
order_id: 'ord123',
property1: 'value1',
property2: 'value2',
revenue: 10,
value: 11,
products: [
{
product_id: 'prd123',
test: 'test',
},
],
};

let result = enrichTrackPayload(message, payload);
const result = enrichTrackPayload(message, payload);
expect(result).toEqual(expectedPayload);

expectedPayload = {
order_id: 'ord123',
property1: 'value1',
property2: 'value2',
};
expect(enrichTrackPayload(message, {})).toEqual(expectedPayload);
});
});
3 changes: 3 additions & 0 deletions src/v0/destinations/hs/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ const API_VERSION = {
v3: 'newApi',
};

const MAX_CONTACTS_PER_REQUEST = 100;

const ConfigCategory = {
COMMON: {
name: 'HSCommonConfig',
Expand Down Expand Up @@ -109,5 +111,6 @@ module.exports = {
SEARCH_LIMIT_VALUE,
RETL_SOURCE,
RETL_CREATE_ASSOCIATION_OPERATION,
MAX_CONTACTS_PER_REQUEST,
DESTINATION: 'HS',
};
Loading

0 comments on commit 3b1db74

Please sign in to comment.