-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the message delayed event to Mandrill adapter and update schema v…
…ersions (close #815)
- Loading branch information
1 parent
29f2672
commit 9f55f96
Showing
8 changed files
with
181 additions
and
142 deletions.
There are no files selected for viewing
111 changes: 0 additions & 111 deletions
111
...rc/test/resources/iglu-client-embedded/schemas/com.mandrill/message_sent/jsonschema/1-0-0
This file was deleted.
Oops, something went wrong.
133 changes: 133 additions & 0 deletions
133
...rc/test/resources/iglu-client-embedded/schemas/com.mandrill/message_sent/jsonschema/1-0-1
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 |
---|---|---|
@@ -0,0 +1,133 @@ | ||
{ | ||
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#", | ||
"description": "Schema for a Mandrill message sent event", | ||
"self": { | ||
"vendor": "com.mandrill", | ||
"name": "message_sent", | ||
"format": "jsonschema", | ||
"version": "1-0-1" | ||
}, | ||
|
||
"type": "object", | ||
"properties": { | ||
"_id": { | ||
"type": "string", | ||
"description": "The unique identifier of the message that generated the event. This is not an event identifier, but rather a reference to the message ID for the email that was sent, opened, clicked, etc." | ||
}, | ||
"msg": { | ||
"type": "object", | ||
"description": "Details about the message for which the event occurred. May be empty if the message that generated an open or click is older than 30 days, or when the message was not yet indexed when the event occurred.", | ||
"properties": { | ||
"_id": { | ||
"type": "string", | ||
"description": "The unique identifier assigned to each email sent via Mailchimp Transactional" | ||
}, | ||
"_version": { | ||
"type": "string" | ||
}, | ||
"clicks": { | ||
"type": "array", | ||
"description": "An array of objects containing an item for each click recorded for the message." | ||
}, | ||
"email": { | ||
"type": "string", | ||
"description": "The recipient's email address" | ||
}, | ||
"metadata": { | ||
"type": "object", | ||
"description": "An array of the metadata key-value pairs that were applied to the message, if any", | ||
"properties": { | ||
"user_id": { | ||
"type": "number" | ||
} | ||
}, | ||
"additionalProperties": true | ||
}, | ||
"opens": { | ||
"type": "array", | ||
"description": "An array of objects containing an item for each time the message was opened. Each open includes the following keys" | ||
}, | ||
"sender": { | ||
"type": "string", | ||
"description": "The sender's email address" | ||
}, | ||
"state": { | ||
"type": "string", | ||
"description": "The state of the message (sent, rejected, spam, unsub, bounced, or soft-bounced)" | ||
}, | ||
"subject": { | ||
"type": "string", | ||
"description": "The subject line of the message" | ||
}, | ||
"tags": { | ||
"type": "array", | ||
"description": "An array of the tag names that were applied to the message, if any", | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"ts": { | ||
"type": "string", | ||
"description": "The timestamp when the message was sent", | ||
"format": "date-time" | ||
}, | ||
"reject": { | ||
"type": ["string", "null"] | ||
}, | ||
"resends": { | ||
"type": "array" | ||
}, | ||
"smtp_events": { | ||
"type": "array", | ||
"description": "Array of JSON objects, each of which is an SMTP response received for the message.", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"ts": { | ||
"type": "string", | ||
"description": "The timestamp of the SMTP event", | ||
"format": "date-time" | ||
}, | ||
"type": { | ||
"type": "string", | ||
"description": "The type of SMTP event, such as sent or deferred" | ||
}, | ||
"diag": { | ||
"type": "string", | ||
"description": "The SMTP diagnostic or response message returned by the receiving server" | ||
}, | ||
"source_ip": { | ||
"type": "string", | ||
"description": "The Mailchimp Transactional IP address that attempted to send the message" | ||
}, | ||
"destination_ip": { | ||
"type": "string", | ||
"description": "The remote IP address of the server Mailchimp Transactional connected to for message relay" | ||
}, | ||
"size": { | ||
"type": "integer", | ||
"description": "The size of the message being relayed" | ||
} | ||
}, | ||
"additionalProperties": true | ||
} | ||
}, | ||
"subaccount": { | ||
"type": ["string", "null"], | ||
"description": "The subaccount from which the message originated; if no subaccount was used, the value will be null" | ||
}, | ||
"template": { | ||
"type": ["string", "null"], | ||
"description": "The slug of the template used, if any. If no template was used, the value will be null" | ||
} | ||
}, | ||
"additionalProperties": true | ||
}, | ||
"ts": { | ||
"type": "string", | ||
"description": "Timestamp when the event occurred", | ||
"format": "date-time" | ||
} | ||
}, | ||
"additionalProperties": true | ||
} |
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 |
---|---|---|
|
@@ -37,9 +37,9 @@ class MandrillAdapterSpec extends Specification with CatsIO { | |
"event_vendor" -> "com.mandrill", | ||
"event_name" -> "message_sent", | ||
"event_format" -> "jsonschema", | ||
"event_version" -> "1-0-0", | ||
"event_version" -> "1-0-1", | ||
"event" -> "unstruct", | ||
"unstruct_event" -> json"""{"schema":"iglu:com.snowplowanalytics.snowplow/unstruct_event/jsonschema/1-0-0","data":{"schema":"iglu:com.mandrill/message_sent/jsonschema/1-0-0","data":{"msg":{"_version":"exampleaaaaaaaaaaaaaaa","subject":"This an example webhook message","email":"[email protected]","state":"sent","_id":"exampleaaaaaaaaaaaaaaaaaaaaaaaaa","tags":["webhook-example"],"ts":"2013-04-04T21:13:19.000Z","clicks":[],"metadata":{"user_id":111},"sender":"[email protected]","opens":[]},"_id":"exampleaaaaaaaaaaaaaaaaaaaaaaaaa","ts":"2014-11-11T07:47:15.000Z"}}}""".noSpaces | ||
"unstruct_event" -> json"""{"schema":"iglu:com.snowplowanalytics.snowplow/unstruct_event/jsonschema/1-0-0","data":{"schema":"iglu:com.mandrill/message_sent/jsonschema/1-0-1","data":{"msg":{"_version":"exampleaaaaaaaaaaaaaaa","subject":"This an example webhook message","email":"[email protected]","state":"sent","_id":"exampleaaaaaaaaaaaaaaaaaaaaaaaaa","tags":["webhook-example"],"ts":"2013-04-04T21:13:19.000Z","clicks":[],"metadata":{"user_id":111},"sender":"[email protected]","opens":[]},"_id":"exampleaaaaaaaaaaaaaaaaaaaaaaaaa","ts":"2014-11-11T07:47:15.000Z"}}}""".noSpaces | ||
) | ||
BlackBoxTesting.runTest(input, expected) | ||
} | ||
|
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
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
Oops, something went wrong.