PAR-14
Ability to go from firm / player to account ID and vice-versa in Treasury API
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.
Comments
tesks · Jun 4, 2026, 9:57 AM
Code context — 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.
Approach (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. Mostly a decision about where the mapping lives. Complements PAR-15.
Activity
- paradaux description: Description updated
- paradaux changed status to Status → Planned
- tesks description: Description updated
- tesks commented
- tesks assigned Assigned to rian