Skip to content

feat: add V2 paginated flowsheet endpoint#155

Open
jakebromberg wants to merge 2 commits intorefactor/rename-play-freq-to-rotation-binfrom
dto/v2-flowsheet-endpoint
Open

feat: add V2 paginated flowsheet endpoint#155
jakebromberg wants to merge 2 commits intorefactor/rename-play-freq-to-rotation-binfrom
dto/v2-flowsheet-endpoint

Conversation

@jakebromberg
Copy link
Member

@jakebromberg jakebromberg commented Feb 13, 2026

Summary

  • Add paginated GET /v2/flowsheet/ and GET /v2/flowsheet/latest endpoints returning discriminated union entries
  • Extract getShowMetadata from getPlaylist to avoid redundant entry fetches
  • Add ShowMetadata type and getEntryCount for pagination support
  • Add unit tests for V2 controller handlers (pagination, validation, error handling)

Stacked on #154 (rename play_freq to rotation_bin).

Review fixes applied

  • totalPages response field matches api.yaml (was total_pages)
  • Removed entry_type: string shadow on IFSEntry (inherits typed enum from FSEntry)
  • Moved app.yaml rename changes to PR refactor: rename play_freq to rotation_bin #154
  • Consistent single quotes in route definitions
  • Added jest.clearAllMocks() in test beforeEach

Test plan

  • Unit tests pass (144/144)
  • Integration tests pass
  • V2 endpoint returns correct discriminated union shapes

Jake Bromberg added 2 commits February 13, 2026 14:37
Rename the rotation table column from play_freq to rotation_bin to align
with api.yaml naming conventions. Includes a manual SQL migration that
drops and recreates library_artist_view and rotation_library_view since
they reference the renamed column. Updates all source files, types,
tests, and seed data.
Add paginated GET /v2/flowsheet/ and GET /v2/flowsheet/latest endpoints
returning discriminated union entries with pre-parsed fields. Extract
getShowMetadata from getPlaylist to avoid redundant entry fetches in
the V2 controller.

Add unit tests for V2 controller handlers covering pagination logic,
input validation, error handling, and show info endpoint.
@jakebromberg jakebromberg force-pushed the dto/v2-flowsheet-endpoint branch from 4f3d45f to ea1c39c Compare February 13, 2026 22:40
@jakebromberg jakebromberg force-pushed the refactor/rename-play-freq-to-rotation-bin branch 2 times, most recently from 0663daa to 6d0e713 Compare February 14, 2026 01:00
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.

1 participant