Skip to content

Add metadata_pair to both messages and drafts #430

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
nylas-python Changelog
======================

**UNRELEASED**
----------------
* Added support for metadata_pair query params to the messages and drafts list endpoints

v6.10.0
----------------
* Added support for `single_level` query parameter in `ListFolderQueryParams` for Microsoft accounts to control folder hierarchy traversal
Expand Down
2 changes: 2 additions & 0 deletions nylas/models/drafts.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ class CreateDraftRequest(TypedDict):
"starred": NotRequired[bool],
"thread_id": NotRequired[str],
"has_attachment": NotRequired[bool],
"metadata_pair": NotRequired[str],
},
)
"""
Expand All @@ -142,6 +143,7 @@ class CreateDraftRequest(TypedDict):
unread: Filter messages by unread status.
starred: Filter messages by starred status.
has_attachment: Filter messages by whether they have an attachment.
metadata_pair (NotRequired[str]): Filter messages by metadata key/value pair.
limit (NotRequired[int]): The maximum number of objects to return.
This field defaults to 50. The maximum allowed value is 200.
page_token (NotRequired[str]): An identifier that specifies which page of data to return.
Expand Down
2 changes: 2 additions & 0 deletions nylas/models/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ class Message:
"fields": NotRequired[Fields],
"search_query_native": NotRequired[str],
"select": NotRequired[str],
"metadata_pair": NotRequired[str]
},
)
"""
Expand Down Expand Up @@ -159,6 +160,7 @@ class Message:
This field defaults to 50. The maximum allowed value is 200.
page_token (NotRequired[str]): An identifier that specifies which page of data to return.
This value should be taken from a ListResponse object's next_cursor parameter.
metadata_pair (NotRequired[str]): Pass a metadata key/value pair (for example, ?metadata_pair=key1:value) to search for metadata associated with objects. See Metadata for more information.
"""


Expand Down
Loading