feat: Add Activity Streams, Intervals, and Bulk Operations Support #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request: Add Activity Streams, Intervals, and Bulk Operations Support
Summary
This PR adds support for three important API features that were missing from the client:
These features were added to the Intervals.icu API in 2024-2025 and are now available via the REST API.
Changes
New Types Added
ActivityStream- Stream data structureStreamType- All available stream types (watts, heartrate, cadence, etc.)StreamsOptions- Options for stream requestsUpdateStreamsResult- Stream update responseInterval- Interval/lap dataIntervalsDTO- Intervals containerUpdateIntervalsOptions- Interval update optionsBulkEventInput- Bulk event input with external_id supportDoomedEvent- Event for bulk deletionDeleteEventsResponse- Bulk deletion responseNew Client Methods
Activity Streams
getActivityStreams()- Get time-series data for activitiesupdateActivityStreams()- Update streams from JSONupdateActivityStreamsFromCSV()- Update streams from CSVActivity Intervals
getActivityIntervals()- Get activity intervals/lapsupdateActivityIntervals()- Update or replace intervalsdeleteActivityIntervals()- Delete specific intervalssplitInterval()- Split an interval at indexupdateInterval()- Update a specific intervalgetActivityWithIntervals()- Get activity with intervals includedBulk Operations
createEventsBulk()- Create multiple events at oncedeleteEventsBulk()- Delete events by ID or external_iddeleteEventsRange()- Delete events by date range and categoryupdateEventsRange()- Bulk update events in date rangeupdateWellnessBulk()- Bulk update wellness recordsAPI Documentation References
Example Usage
Testing
All existing tests pass (49/49). The changes are fully typed and backward compatible.
Breaking Changes
None. All changes are additive.
Checklist
🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com