diff --git a/.pylintrc b/.pylintrc index f789fc6..cfbff33 100644 --- a/.pylintrc +++ b/.pylintrc @@ -11,6 +11,7 @@ disable= too-many-instance-attributes, unnecessary-pass, too-many-arguments, + too-many-positional-arguments, too-few-public-methods, [TYPECHECK] diff --git a/CHANGELOG.md b/CHANGELOG.md index 348db45..178b0eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ Unreleased ---------- * Added `message.deleted` to the Webhook enum, appended tests * Fixed Participant.email not being optional, Microsoft events can now be represented +* Added support for metadata_pair query params to the messages and drafts list endpoints v6.13.1 ---------- diff --git a/nylas/models/drafts.py b/nylas/models/drafts.py index 3c8a8c2..78626b9 100644 --- a/nylas/models/drafts.py +++ b/nylas/models/drafts.py @@ -129,6 +129,7 @@ class CreateDraftRequest(TypedDict): "starred": NotRequired[bool], "thread_id": NotRequired[str], "has_attachment": NotRequired[bool], + "metadata_pair": NotRequired[str], }, ) """ @@ -145,6 +146,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. diff --git a/nylas/models/messages.py b/nylas/models/messages.py index 342df89..9caf5bf 100644 --- a/nylas/models/messages.py +++ b/nylas/models/messages.py @@ -128,6 +128,7 @@ class Message: "fields": NotRequired[Fields], "search_query_native": NotRequired[str], "select": NotRequired[str], + "metadata_pair": NotRequired[str] }, ) """ @@ -159,6 +160,8 @@ 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. """ diff --git a/nylas/models/notetakers.py b/nylas/models/notetakers.py index a889fec..17badf6 100644 --- a/nylas/models/notetakers.py +++ b/nylas/models/notetakers.py @@ -268,7 +268,6 @@ class ListNotetakerQueryParams(ListQueryParams): def __post_init__(self): """Convert enums to string values for API requests.""" - super().__post_init__() # Convert state enum to string if present if hasattr(self, "state") and isinstance(self.state, NotetakerState): self.state = self.state.value