Completed in PR #28 (656836d): public Business API getAccountIds, getDefaultAccountId and getFirmIdByAccountId, documented player/account paths, and API/mapper regression tests. The earlier note saying the PR is open is superseded.
Verified against merged source and test changes. Done denotes implementation on develop, not production deployment; tests were not rerun during this reconciliation.
Add the ability to resolve firm/player → account ID and back via the Treasury API.
Technical notes — TreasuryApi already does owner-UUID↔account (getAccountByUUID, getAccountsByOwner, getAccountsByTypeAndOwner, resolveOrCreatePersonal) and accountId→account (getAccountById). What's missing is firm: the firm/firm_accounts tables are owned by business-rian (only the REST FirmMapper joins them), and Account carries ownerUuid but no firmId. Layering call: the firmId↔accountId resolver belongs in business-api (which owns the firm tables), not treasury-api; for the BUSINESS-account case getAccountsByTypeAndOwner(BUSINESS, …) already exists. Complements PAR-15.
PR: https://github.com/ParadauxIO/hibernia-economy/pull/28 (targets develop; open, not merged). Commit: 656836d.
Added FirmApi.getAccountIds, getDefaultAccountId, and getFirmIdByAccountId through existing Business services, plus documented Treasury player/account lookup paths. Contract covers missing/default values, removed links, archived firms and older providers; no migration needed.
Validation: bash gradlew build -Pci=true completed successfully across all JVM modules, including MariaDB integration tests and coverage gates. All 616 Business tests passed, including new API/mapper regression cases. git diff --check passed. Existing Treasury Javadoc unresolved-link diagnostic was emitted but did not fail the build.
Code context —
TreasuryApialready does owner-UUID↔account (getAccountByUUID,getAccountsByOwner,getAccountsByTypeAndOwner,resolveOrCreatePersonal) and accountId→account (getAccountById). What's missing is firm: thefirm/firm_accountstables are owned by business-rian (only the RESTFirmMapperjoins them), andAccountcarriesownerUuidbut no firmId.Approach (layering call): the firmId↔accountId resolver belongs in
business-api(which owns the firm tables), nottreasury-api; for the BUSINESS-account casegetAccountsByTypeAndOwner(BUSINESS, …)already exists. Mostly a decision about where the mapping lives. Complements PAR-15.