Skip to content

Expose built element counts per floor and trade [HMA-1938] - #366

Draft
bryandebourbon2 wants to merge 1 commit into
masterfrom
HMA-1938-built-elements-by-floor-and-trade
Draft

Expose built element counts per floor and trade [HMA-1938]#366
bryandebourbon2 wants to merge 1 commit into
masterfrom
HMA-1938-built-elements-by-floor-and-trade

Conversation

@bryandebourbon2

@bryandebourbon2 bryandebourbon2 commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Adds Avvir.api.projects.getProjectFloorTradeBuiltElementCounts({ projectId }, user) for the gateway's new GET /projects/{projectId}/built-elements-by-floor-and-trade, returning { [floorFirebaseId]: { [tradeCode]: number } }.

The as-built IFC export's trade step (HMA-1938) uses it to disable a trade with nothing built in the selected areas. The deviation magnitudes it already fetches cannot answer that: a trade built at its designed position reports a magnitude of zero, exactly like a trade that was never built.

Tests

3 new cases in tests/api/project_api_test.ts (URL, auth headers, response shape). 64 passing locally for that file.

Release

Avvir/avvir-web's HMA-1938 branch needs this published as avvir@8.9.3; it is pinned at avvir@^8.9.3 and will not compile until then.

Related

  • Avvir/avvir-web-gateway#1465 — the endpoint
  • Avvir/avvir-web — the trade step that consumes it

🤖 Generated with Claude Code

Adds Avvir.api.projects.getProjectFloorTradeBuiltElementCounts for the gateway's
new GET /projects/{projectId}/built-elements-by-floor-and-trade.

The as-built IFC export's trade step uses it to disable a trade with nothing built
in the selected areas. The deviation magnitudes it already fetches cannot answer
that: a trade built at its designed position reports a magnitude of zero, exactly
like a trade that was never built.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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