Skip to content

TT-5543: JAVA SDK support for Events batch operations - #341

Merged
googsvg merged 2 commits into
mainfrom
TT-5543-java-sdk-support-for-new-events-batch-operations
Nov 5, 2026
Merged

googsvg merged 2 commits into
mainfrom
TT-5543-java-sdk-support-for-new-events-batch-operations

Conversation

@googsvg

@googsvg googsvg commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Implements TT-5543 (parent TT-5542).

Summary

  • add Events.batch() for POST /v3/grants/{grant_id}/events/batch, which runs many event create/update/delete operations in one request (Google and Microsoft)
  • add BatchEventsRequest and BatchEventOperation with create / update / delete factories. The constructor is private, so an update or delete can't be built without an eventId, and a create or update can't be built without a body
  • reuse the existing CreateEventRequest / UpdateEventRequest as operation bodies and Event as result data; no new event models
  • add BatchEventsQueryParams (calendar_id, notify_participants, grant_email, tentative_as_busy, select). This is a new type because no existing event query-param type has grant_email
  • add BatchEventsResponse / BatchEventResult (status, data, error, retry_after, provider_event_created)
  • 207 Multi-Status is returned, not thrown. The caller checks each result. Any other non-2xx status for the whole call (e.g. 400 for an invalid batch) throws NylasApiError as usual. No NylasClient changes were needed, because it already treats every 2xx as success
  • per the ticket, the SDK does not check the 50-operation limit, split batches, retry automatically or check the provider
  • add BatchEventsExample (loop over results, retry 429/503 after retry_after, never retry items with provider_event_created: true), plus README / .env.example entries and a changelog entry

Purely additive: no existing signatures or behavior changed.

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.

@codecov-commenter

codecov-commenter commented Nov 4, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.93%. Comparing base (f1b2855) to head (ac37439).

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #341      +/-   ##
============================================
+ Coverage     83.72%   83.93%   +0.20%     
- Complexity      486      489       +3     
============================================
  Files            44       44              
  Lines          1358     1363       +5     
  Branches        115      115              
============================================
+ Hits           1137     1144       +7     
+ Misses          149      148       -1     
+ Partials         72       71       -1     

☔ 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.

@googsvg
googsvg merged commit 221ee0b into main Nov 5, 2026
5 checks passed

This branch was successfully deployed

1 active deployment
sdk-reference — ac37439d Deployed Nov 5, 2026 by googsvg via docs #537
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.

3 participants