Skip to content

Add tentative_as_busy field to GetFreeBusyRequest#481

Open
pengfeiye wants to merge 2 commits into
mainfrom
TA-3803-add-tenative-as-busy-to-python-sdk
Open

Add tentative_as_busy field to GetFreeBusyRequest#481
pengfeiye wants to merge 2 commits into
mainfrom
TA-3803-add-tenative-as-busy-to-python-sdk

Conversation

@pengfeiye

@pengfeiye pengfeiye commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds an optional tentative_as_busy: NotRequired[bool] field to the GetFreeBusyRequest TypedDict in nylas/models/free_busy.py. This field already existed on the Events query params and Availability models, but was missing from the free-busy request.

When set to false, tentative calendar events are treated as busy: false. Only applicable for Microsoft and EWS calendar providers; defaults to true.

Changes

  • nylas/models/free_busy.py: import NotRequired from typing_extensions and add tentative_as_busy: NotRequired[bool] to GetFreeBusyRequest, with a matching docstring entry.
  • tests/resources/test_calendars.py: add test_get_free_busy_with_tentative_as_busy verifying the field is passed through in the request body.

Testing

  • python -m pytest tests/resources/test_calendars.py -k "free_busy" — 2 passed.

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.

@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 afternoon! Thanks for this — clean change and the test covers the request passthrough nicely.

One blocker before merge:

  • No CHANGELOG.md entry. Please add a line under Unreleased, e.g. * Added tentative_as_busy field to GetFreeBusyRequest.

The field, docstring, and NotRequired[bool] typing all look correct and match how tentative_as_busy is handled on the other event/availability models. Requesting changes only for the changelog — happy to approve once that's in.

@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.08%. Comparing base (00e3f81) to head (a567462).
⚠️ Report is 24 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #481      +/-   ##
==========================================
+ Coverage   98.90%   99.08%   +0.17%     
==========================================
  Files          52       65      +13     
  Lines        2293     3072     +779     
==========================================
+ Hits         2268     3044     +776     
- Misses         25       28       +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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