create_venture_event
Record an event on a venture deal. The deal must already have an initial_investment before any other event type can be created (initial_investment must come first). Event date cannot precede the initial_investment date.
Rules per type (the schema is flat but the service enforces these — invalid combinations return a clear ValidationError): • initial_investment: grossAmount is auto-derived from the deal's principal + entryFee — do NOT pass it. cashFlowMode must be 'linked' or 'out_of_wallet'. • capital_call, fee_payment, distribution: require grossAmount. cashFlowMode must be 'linked' or 'out_of_wallet'. • exit: requires grossAmount AND navAfter. cashFlowMode must be 'linked' or 'out_of_wallet'. • nav_update, writedown: require navAfter. cashFlowMode must be 'none'.
For cashFlowMode='linked', the sum of linked transactions' amounts must equal the event's lpNetAmount (derived from grossAmount minus auto-computed carry for distribution/exit). For cashFlowMode='out_of_wallet', no transactions are linked — the event amount is recorded but does NOT affect bank balances or cash-flow charts.
Carry on distribution/exit is auto-computed (European waterfall by default). Pass lpNetAmountOverride / gpCarryOverride to override the computed values (e.g. when matching a GP's statement).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | Event type | |
| notes | No | Free-text notes | |
| dealId | Yes | Venture deal ID (from list_venture_deals) | |
| navAfter | No | Post-event NAV (decimal string). Required for nav_update, writedown, AND exit. | |
| eventDate | Yes | Event date in YYYY-MM-DD | |
| grossAmount | No | Gross amount (decimal string). Required for capital_call, fee_payment, distribution, exit. | |
| quantityPct | No | Optional partial-exit quantity fraction in [0,1] (used for partial exits). | |
| cashFlowMode | Yes | linked = tie to existing bank txs; out_of_wallet = record event only; none = required for nav_update / writedown | |
| transactionIds | No | Bank transaction ids to link. Required when cashFlowMode=linked; must NOT be provided otherwise. | |
| gpCarryOverride | No | Override the auto-computed gpCarryAmount (distribution/exit only). | |
| lpNetAmountOverride | No | Override the auto-computed lpNetAmount (distribution/exit only). |