Feat: Add typed SDK support for the grouped time report#99
Merged
Conversation
Model GET /projects/api/v3/time/report/{type} generically: a single request
type with a six-value Type enum (user, project, company, tasklist, task, team)
selecting the grouping dimension, plus the response's per-type row slices with
typed Included maps for the users and projects sideloads.
- Constructor requires the date window; skipCounts hard-coded; hasMore-only
pagination meta with standard Iterate().
- Sparse fieldsets wired per repo conventions (generated output committed).
- Example test (in-process mock, no env vars) covering rows + included users,
plus an env-gated integration test.
- Totals endpoint deliberately not modelled.
Task: https://digitalcrew.teamwork.com/app/tasks/26469936
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Adds typed SDK support for the grouped time report —
GET /projects/api/v3/time/report/{type}.json— modelled generically (one request type covering all six group dimensions) rather than a user-only narrowing.TimeReportTypeenum selects the grouping dimension:user,project,company,tasklist,task,team. Exactly one response slice is populated per call.startDate/endDate(date-only), comma-joined ID-list filters (projectIds,userIds,taskIds,tasklistIds,teamIds,companyIds,timelogTagIds),includeArchivedProjects,reportType, sideloadinclude, and pagination.loggedTime,billableTime,nonBillableTime,billedTime,estimatedTime) areint64minutes.Includedmaps for theusersandprojectssideloads.The workload endpoint was the structural template (date-windowed, paginated, sideloaded).
Acceptance criteria
Typeenum; constructor requires the date windowskipCounts=truehard-coded; pagination meta exposeshasMoreonly; standardIterate()worksIncludedmaps for users and projectsgo generateoutput committed; CI greenVerification
go build,go vet,gofmt -l, andgo test ./projects/ -run TimeReportall clean;go generate ./...produces zero drift.🤖 Generated with Claude Code