Skip to content

Add Policies API support with typed models, client wiring, and expanded test coverage#467

Merged
pengfeiye merged 2 commits intomainfrom
TT-4430-python-sdk-for-crud-rules-policies-1
Apr 22, 2026
Merged

Add Policies API support with typed models, client wiring, and expanded test coverage#467
pengfeiye merged 2 commits intomainfrom
TT-4430-python-sdk-for-crud-rules-policies-1

Conversation

@pengfeiye
Copy link
Copy Markdown
Contributor

License

I confirm that this contribution is made under the terms of the MIT license and that I have the authority necessary to make this contribution on behalf of its copyright owner.

Summary

  • Added Policies models in nylas/models/policies.py for list/query params, create/update request shapes, and nested response data (options, limits, spam_detection).
  • Implemented Policies resource in nylas/resources/policies.py with CRUD methods mapped to /v3/policies endpoints.
  • Wired Client.policies in nylas/client.py so the SDK exposes the new API surface.
  • Updated tests/test_client.py to verify the new client property.
  • Added tests/resources/test_policies.py with coverage for:
    • complete and minimal deserialization paths,
    • list/create/find/update/destroy request behavior,
    • query parameter forwarding,
    • overrides forwarding on all methods.
  • Updated CHANGELOG.md (Unreleased) with a Policies feature entry.

@pengfeiye pengfeiye merged commit 6f089b1 into main Apr 22, 2026
7 checks passed
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