-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: mailjet source operating on array instead object (#2999)
* fix: mailjet source operating on array instead object * chore: small fix * refactor: use toArray from transformer utils --------- Co-authored-by: Dilip Kola <[email protected]>
- Loading branch information
1 parent
595f819
commit 0dbb307
Showing
3 changed files
with
199 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,25 @@ | ||
[ | ||
{ | ||
"description": "MailJet email open event", | ||
"input": { | ||
"event": "open", | ||
"time": 1664443614, | ||
"MessageID": 94857068804950690, | ||
"Message_GUID": "54d6cdec-f659-4547-8926-13d9c4126b82", | ||
"email": "[email protected]", | ||
"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": "" | ||
}, | ||
"output": { | ||
"Message": { | ||
"input": [ | ||
{ | ||
"event": "open", | ||
"time": 1664443614, | ||
"MessageID": 94857068804950690, | ||
"Message_GUID": "54d6cdec-f659-4547-8926-13d9c4126b82", | ||
"email": "[email protected]", | ||
"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": "" | ||
} | ||
], | ||
"output": [ | ||
{ | ||
"context": { | ||
"library": { | ||
"name": "unknown", | ||
|
@@ -52,10 +54,10 @@ | |
"originalTimestamp": "2022-09-29T09:26:54.000Z", | ||
"userId": "5b6a3426dba2cb24e4f0aeec43bee9d7" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"description": "MailJet email bounce event", | ||
"description": "MailJet email bounce event where input event is of type ", | ||
"input": { | ||
"event": "bounce", | ||
"time": 1664444171, | ||
|
@@ -70,8 +72,8 @@ | |
"error_related_to": "system", | ||
"error": "connection issue" | ||
}, | ||
"output": { | ||
"Message": { | ||
"output": [ | ||
{ | ||
"context": { | ||
"library": { | ||
"name": "unknown", | ||
|
@@ -102,23 +104,25 @@ | |
"originalTimestamp": "2022-09-29T09:36:11.000Z", | ||
"userId": "5b6a3426dba2cb24e4f0aeec43bee9d7" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"description": "MailJet email sent event", | ||
"input": { | ||
"event": "sent", | ||
"time": 1664444171, | ||
"MessageID": 92886743924596480, | ||
"Message_GUID": "0230c73a-2b77-4aea-8ef2-ed15d0edc5fd", | ||
"email": "[email protected]", | ||
"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" | ||
}, | ||
"output": { | ||
"Message": { | ||
"input": [ | ||
{ | ||
"event": "sent", | ||
"time": 1664444171, | ||
"MessageID": 92886743924596480, | ||
"Message_GUID": "0230c73a-2b77-4aea-8ef2-ed15d0edc5fd", | ||
"email": "[email protected]", | ||
"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" | ||
} | ||
], | ||
"output": [ | ||
{ | ||
"context": { | ||
"library": { | ||
"name": "unknown", | ||
|
@@ -149,26 +153,28 @@ | |
"originalTimestamp": "2022-09-29T09:36:11.000Z", | ||
"userId": "5b6a3426dba2cb24e4f0aeec43bee9d7" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"description": "MailJet email bounce event", | ||
"input": { | ||
"event": "bounce", | ||
"time": 1664444170, | ||
"MessageID": 56013522696710744, | ||
"Message_GUID": "dbe4f0a3-4a5a-4784-a724-a9794d3c0444", | ||
"email": "[email protected]", | ||
"mj_campaign_id": 108892, | ||
"mj_contact_id": 373142182, | ||
"customcampaign": "mj.nl=58486", | ||
"blocked": false, | ||
"hard_bounce": false, | ||
"error_related_to": "system", | ||
"error": "connection issue" | ||
}, | ||
"output": { | ||
"Message": { | ||
"input": [ | ||
{ | ||
"event": "bounce", | ||
"time": 1664444170, | ||
"MessageID": 56013522696710744, | ||
"Message_GUID": "dbe4f0a3-4a5a-4784-a724-a9794d3c0444", | ||
"email": "[email protected]", | ||
"mj_campaign_id": 108892, | ||
"mj_contact_id": 373142182, | ||
"customcampaign": "mj.nl=58486", | ||
"blocked": false, | ||
"hard_bounce": false, | ||
"error_related_to": "system", | ||
"error": "connection issue" | ||
} | ||
], | ||
"output": [ | ||
{ | ||
"context": { | ||
"library": { | ||
"name": "unknown", | ||
|
@@ -199,25 +205,27 @@ | |
"originalTimestamp": "2022-09-29T09:36:10.000Z", | ||
"userId": "5b6a3426dba2cb24e4f0aeec43bee9d7" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"description": "MailJet when no email is present", | ||
"input": { | ||
"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" | ||
}, | ||
"output": { | ||
"Message": { | ||
"input": [ | ||
{ | ||
"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" | ||
} | ||
], | ||
"output": [ | ||
{ | ||
"context": { | ||
"library": { | ||
"name": "unknown", | ||
|
@@ -244,6 +252,118 @@ | |
}, | ||
"originalTimestamp": "2022-09-29T09:36:10.000Z" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"description": "MailJet Multiple payloads in single request", | ||
"input": [ | ||
{ | ||
"event": "open", | ||
"time": 1704458040, | ||
"MessageID": 987654, | ||
"Message_GUID": "876r-oihugyf-7tfygh", | ||
"email": "[email protected]", | ||
"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" | ||
}, | ||
{ | ||
"event": "click", | ||
"time": 1704458041, | ||
"MessageID": 12345234567, | ||
"Message_GUID": "12345-kjhgfd-2efv", | ||
"email": "[email protected]", | ||
"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" | ||
} | ||
], | ||
"output": [ | ||
{ | ||
"context": { | ||
"library": { | ||
"name": "unknown", | ||
"version": "unknown" | ||
}, | ||
"ip": "ip_info", | ||
"integration": { | ||
"name": "MailJet" | ||
}, | ||
"traits": { | ||
"email": "[email protected]" | ||
}, | ||
"page": { | ||
"url": "https://www.example.com/" | ||
}, | ||
"userAgent": "mailjet api test", | ||
"externalId": [ | ||
{ | ||
"type": "mailjetContactId", | ||
"id": 123 | ||
} | ||
] | ||
}, | ||
"integrations": { | ||
"MailJet": false | ||
}, | ||
"type": "track", | ||
"event": "open", | ||
"properties": { | ||
"customcampaign": "test_campaign", | ||
"mj_campaign_id": 321, | ||
"ip": "ip_info", | ||
"url": "https://www.example.com/" | ||
}, | ||
"userId": "593a5aff0b445b3b77a6d9676b7ec86e", | ||
"originalTimestamp": "2024-01-05T12:34:00.000Z" | ||
}, | ||
{ | ||
"context": { | ||
"library": { | ||
"name": "unknown", | ||
"version": "unknown" | ||
}, | ||
"page": { | ||
"url": "https://www.example.com/" | ||
}, | ||
|
||
"integration": { | ||
"name": "MailJet" | ||
}, | ||
"traits": { | ||
"email": "[email protected]" | ||
}, | ||
"userAgent": "mailjet api test", | ||
"ip": "ip_info", | ||
"externalId": [ | ||
{ | ||
"type": "mailjetContactId", | ||
"id": 32532 | ||
} | ||
] | ||
}, | ||
"integrations": { | ||
"MailJet": false | ||
}, | ||
"type": "track", | ||
"event": "click", | ||
"properties": { | ||
"customcampaign": "test_campaign", | ||
"mj_campaign_id": 12, | ||
"ip": "ip_info", | ||
"url": "https://www.example.com/" | ||
}, | ||
"userId": "593a5aff0b445b3b77a6d9676b7ec86e", | ||
"originalTimestamp": "2024-01-05T12:34:01.000Z" | ||
} | ||
] | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters