Paradaux
IssuesPAR-14PlannedOpen ↗
0

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 notesTreasuryApi 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 contextTreasuryApi 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 updatedJun 7, 2026, 9:09 PM
  • paradaux changed status to Status → PlannedJun 7, 2026, 9:09 PM
  • tesks description: Description updatedJun 4, 2026, 10:02 AM
  • tesks commentedJun 4, 2026, 9:57 AM
  • tesks assigned Assigned to rianJun 4, 2026, 9:27 AM