Skip to content

NYL-22: Add Contact metadata and webhook parity - #485

Open
quzhi1 wants to merge 2 commits into
mainfrom
codex/NYL-22-contacts-sdk-parity
Open

NYL-22: Add Contact metadata and webhook parity#485
quzhi1 wants to merge 2 commits into
mainfrom
codex/NYL-22-contacts-sdk-parity

Conversation

@quzhi1

@quzhi1 quzhi1 commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add Contact metadata request/response models and metadata_pair contact filtering
  • document metadata replace, preserve, and clear behavior plus provider webhook support boundaries
  • verify the existing contact.updated and contact.deleted wire values and guard against unsupported contact.created

Test plan

  • /Users/zhi.q/nylas-python/.venv/bin/python -m pytest (485 passed, 3 deselected)

@AaronDDM AaronDDM left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good morning! Looks good — models, docstrings, changelog and tests all covered, and the enum already had the contact triggers so the docstring-only change there is right.

One suggestion below. Approving.

Comment thread tests/resources/test_contacts.py

@AaronDDM AaronDDM left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good morning! Re-reviewed after 6406a73.

The _build_query_params test is exactly what was missing — that's the piece that could have silently regressed. UpdateContactRequest is an alias of CreateContactRequest, so metadata covers both paths. CHANGELOG has an Unreleased entry and the docstrings cover the update semantics.

One non-blocking cross-SDK note below. Approving.


assert (
url
== "https://test.nylas.com/v3/grants/abc-123/contacts?metadata_pair=key1:sync_eligible"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking, just noting it: Python emits the colon raw (metadata_pair=key1:sync_eligible) while Node and Ruby percent-encode it (key1%3Async_eligible). Both are valid per RFC 3986 and the API decodes either, so nothing to change here — it's pre-existing serializer behavior in each SDK, not something this PR introduced. Flagging it in case it ever comes up in a support ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants