Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(release): pull release/v1.66.0 into main #3367

Merged
merged 25 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
9558e3b
feat: add slack source
gitcommitshow Feb 29, 2024
d964d0b
Merge branch 'develop' into feat.slack-source
gitcommitshow Feb 29, 2024
42d6010
fix: filtering url verification event via evvent type
gitcommitshow Mar 1, 2024
b19eb8c
fix: add originalTimestamp from slack ts property
gitcommitshow Mar 2, 2024
d0c5942
feat: add identify event and the latest slack event schema
gitcommitshow Mar 3, 2024
a73f578
Merge branch 'develop' into feat.slack-source
gitcommitshow Mar 4, 2024
4514a73
Merge branch 'feat.slack-source' of https://github.com/rudderlabs/rud…
gitcommitshow Mar 4, 2024
1f81e1d
Merge branch 'develop' into feat.slack-source
gitcommitshow Mar 5, 2024
08148e4
Merge branch 'develop' into feat.slack-source
gitcommitshow Mar 5, 2024
0771e87
fix: handle error-first
gitcommitshow Mar 5, 2024
ea655bf
test: fix missing brackets
gitcommitshow Apr 27, 2024
db11c3e
fix: default event name normalization to undefined if it cannot be pa…
gitcommitshow May 9, 2024
e1b4b9e
test: unit tests for slack source
gitcommitshow May 9, 2024
ce94a8b
test: add one test for track event
gitcommitshow May 9, 2024
13be5cf
fix: use optional chain parameter
gitcommitshow May 9, 2024
3741093
chore(release): pull main into develop post release v1.64.0 (#3330)
ItsSudip May 10, 2024
d16752b
Merge branch 'develop' into feat.slack-source
gitcommitshow May 11, 2024
3cbb011
feat: add slack source (#3148)
gitcommitshow May 11, 2024
a347ab1
feat: onboard monday to proxy (#3347)
aashishmalik May 13, 2024
265a71d
fix: ninetailed: modify parameter requirements and add default values…
anantjain45823 May 13, 2024
a354a62
chore(release): 1.66.0
web-flow May 13, 2024
ff29f85
feat: onboard emarsys destination (#3318) (#3369)
shrouti1507 May 13, 2024
8fe6bf0
chore: edit changelog
shrouti1507 May 13, 2024
5339902
chore: adding emarsys to regulations
shrouti1507 May 14, 2024
3ada3b7
chore: update changelog
ItsSudip May 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

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


### Features

krishna2020 marked this conversation as resolved.
Show resolved Hide resolved
* add slack source ([#3148](https://github.com/rudderlabs/rudder-transformer/issues/3148))
* onboard monday to proxy ([#3347](https://github.com/rudderlabs/rudder-transformer/issues/3347))
* onboard emarsys destination ([#3369](https://github.com/rudderlabs/rudder-transformer/issues/3369))


### Bug Fixes

* ninetailed: modify parameter requirements and add default values ([#3364](https://github.com/rudderlabs/rudder-transformer/issues/3364))

### [1.65.1](https://github.com/rudderlabs/rudder-transformer/compare/v1.65.0...v1.65.1) (2024-05-10)


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.65.1",
"version": "1.66.0",
"description": "",
"homepage": "https://github.com/rudderlabs/rudder-transformer#readme",
"bugs": {
Expand Down
24 changes: 24 additions & 0 deletions src/cdk/v2/destinations/emarsys/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
const ALLOWED_OPT_IN_VALUES = ['1', '2', ''];
const groupedSuccessfulPayload = {
identify: {
method: 'PUT',
batches: [],
},
group: {
method: 'POST',
batches: [],
},
track: {
method: 'POST',
batches: [],
},
};

module.exports = {
MAX_BATCH_SIZE: 1000,
EMAIL_FIELD_ID: 3,
OPT_IN_FILED_ID: 31,
ALLOWED_OPT_IN_VALUES,
MAX_BATCH_SIZE_BYTES: 8000000, // 8 MB,
groupedSuccessfulPayload,
};
88 changes: 88 additions & 0 deletions src/cdk/v2/destinations/emarsys/procWorkflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
bindings:
- name: EventType
path: ../../../../constants
- path: ../../bindings/jsontemplate
exportAll: true
- name: removeUndefinedValues
path: ../../../../v0/util
- name: removeUndefinedAndNullValues
path: ../../../../v0/util
- name: defaultRequestConfig
path: ../../../../v0/util
- name: getIntegrationsObj
path: ../../../../v0/util
- name: getFieldValueFromMessage
path: ../../../../v0/util
- name: CommonUtils
path: ../../../../util/common
- path: ./utils
- path: ./config
- path: lodash
name: cloneDeep

steps:
- name: checkIfProcessed
condition: .message.statusCode
template: |
$.batchMode ? .message.body.JSON : .message
onComplete: return
- name: messageType
template: |
.message.type.toLowerCase()
- name: validateInput
template: |
let messageType = $.outputs.messageType;
$.assert(messageType, "Message type is not present. Aborting message.");
$.assert(messageType in {{$.EventType.([.TRACK, .IDENTIFY, .GROUP])}},
"message type " + messageType + " is not supported")
$.assertConfig(.destination.Config.emersysUsername, "Emersys user name is not configured. Aborting");
$.assertConfig(.destination.Config.emersysUserSecret, "Emersys user secret is not configured. Aborting");

- name: validateInputForTrack
description: Additional validation for Track events
condition: $.outputs.messageType === {{$.EventType.TRACK}}
template: |
$.assert(.message.event, "event could not be mapped to conversion rule. Aborting.")
- name: preparePayloadForIdentify
description: |
Builds identify payload. ref: https://dev.emarsys.com/docs/core-api-reference/f8ljhut3ac2i1-update-contacts
condition: $.outputs.messageType === {{$.EventType.IDENTIFY}}
template: |
$.context.payload = $.buildIdentifyPayload(.message, .destination.Config,);
- name: preparePayloadForGroup
description: |
Builds group payload. ref: https://dev.emarsys.com/docs/core-api-reference/1m0m70hy3tuov-add-contacts-to-a-contact-list
condition: $.outputs.messageType === {{$.EventType.GROUP}}
template: |
$.context.payload = $.buildGroupPayload(.message, .destination.Config,);
- name: preparePayloadForTrack
description: |
Builds track payload. ref: https://dev.emarsys.com/docs/core-api-reference/fl0xx6rwfbwqb-trigger-an-external-event
condition: $.outputs.messageType === {{$.EventType.TRACK}}
template: |
const properties = ^.message.properties;
const integrationObject = $.getIntegrationsObj(^.message, 'emarsys');
const emersysIdentifierId = $.deduceCustomIdentifier(integrationObject, ^.destination.Config.emersysCustomIdentifier);
const payload = {
key_id: emersysIdentifierId,
external_id: $.deduceExternalIdValue(^.message,emersysIdentifierId,.destination.Config.fieldMapping),
trigger_id: integrationObject.trigger_id,
data: properties.data,
attachment:$.CommonUtils.toArray(properties.attachment),
event_time: $.getFieldValueFromMessage(^.message, 'timestamp'),
};
$.context.payload = {
eventType: ^.message.type,
destinationPayload: {
payload: $.removeUndefinedAndNullValues(payload),
eventId: $.deduceEventId(^.message,.destination.Config),
},
};
- name: buildResponse
template: |
const response = $.defaultRequestConfig();
response.body.JSON = $.context.payload;
response.endpoint = $.deduceEndPoint($.context.payload,.destination.Config);
response.method = "POST";
response.headers = $.buildHeader(.destination.Config)
response
38 changes: 38 additions & 0 deletions src/cdk/v2/destinations/emarsys/rtWorkflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
bindings:
- path: ./utils
- name: handleRtTfSingleEventError
path: ../../../../v0/util/index

steps:
- name: validateInput
template: |
$.assert(Array.isArray(^) && ^.length > 0, "Invalid event array")

- name: transform
externalWorkflow:
path: ./procWorkflow.yaml
bindings:
- name: batchMode
value: true
loopOverInput: true
- name: successfulEvents
template: |
$.outputs.transform#idx.output.({
"message": .[],
"destination": ^ [idx].destination,
"metadata": ^ [idx].metadata
})[]
- name: failedEvents
template: |
$.outputs.transform#idx.error.(
$.handleRtTfSingleEventError(^[idx], .originalError ?? ., {})
)[]

- name: batchSuccessfulEvents
description: Batches the successfulEvents
template: |
$.context.batchedPayload = $.batchResponseBuilder($.outputs.successfulEvents);

- name: finalPayload
template: |
[...$.outputs.failedEvents, ...$.context.batchedPayload]
Loading
Loading