Add tentative_as_busy field to GetFreeBusyRequest#481
Conversation
AaronDDM
left a comment
There was a problem hiding this comment.
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.
56018cb to
9e2b482
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
AaronDDM
left a comment
There was a problem hiding this comment.
Good afternoon! Thanks for the quick turnaround — the CHANGELOG entry under Unreleased is in now, which was the only blocker from my last pass.
Everything else still looks good: the NotRequired[bool] typing, the docstring, and the test covering the request passthrough are all consistent with how tentative_as_busy is handled on the other models. Approving. 🚀
Summary
Adds an optional
tentative_as_busy: NotRequired[bool]field to theGetFreeBusyRequestTypedDict innylas/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 asbusy: false. Only applicable for Microsoft and EWS calendar providers; defaults totrue.Changes
nylas/models/free_busy.py: importNotRequiredfromtyping_extensionsand addtentative_as_busy: NotRequired[bool]toGetFreeBusyRequest, with a matching docstring entry.tests/resources/test_calendars.py: addtest_get_free_busy_with_tentative_as_busyverifying 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.