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.
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.