You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add support for include_tracking_options and raw_mime message fields (#419)
- Add new Fields enum values: include_tracking_options, raw_mime
- Add TrackingOptions model with opens, thread_replies, links, label fields
- Add tracking_options and raw_mime fields to Message model
- Update ListMessagesQueryParams and FindMessageQueryParams documentation
- Add 8 comprehensive tests for new functionality with backwards compatibility
- Add complete example in examples/message_fields_demo/ with documentation
- Update CHANGELOG.md
This implementation supports the latest Nylas API message fields while maintaining full backwards compatibility. All existing functionality continues to work unchanged.
This example demonstrates the usage of the new message `fields` query parameter values (`include_tracking_options` and `raw_mime`) introduced in the Nylas API. These fields allow you to access tracking information and raw MIME data for messages.
4
+
5
+
## Features Demonstrated
6
+
7
+
1.**include_tracking_options Field**: Shows how to fetch messages with their tracking options (opens, thread_replies, links, and label).
8
+
2.**raw_mime Field**: Demonstrates how to retrieve the raw MIME content of messages as Base64url-encoded data.
9
+
3.**Backwards Compatibility**: Shows that existing code continues to work as expected without specifying the new fields.
10
+
4.**TrackingOptions Model**: Demonstrates working with the new TrackingOptions dataclass for serialization and deserialization.
11
+
12
+
## API Fields Overview
13
+
14
+
### include_tracking_options
15
+
When using `fields=include_tracking_options`, the API returns messages with their tracking settings:
16
+
-`opens`: Boolean indicating if message open tracking is enabled
17
+
-`thread_replies`: Boolean indicating if thread replied tracking is enabled
18
+
-`links`: Boolean indicating if link clicked tracking is enabled
19
+
-`label`: String label describing the message tracking purpose
20
+
21
+
### raw_mime
22
+
When using `fields=raw_mime`, the API returns only essential fields plus the raw MIME content:
23
+
-`grant_id`: The grant identifier
24
+
-`object`: The object type ("message")
25
+
-`id`: The message identifier
26
+
-`raw_mime`: Base64url-encoded string containing the complete message data
27
+
28
+
## Setup
29
+
30
+
1. Install the SDK in development mode from the repository root:
0 commit comments