Expose ticket waves on public event responses #66
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/public-ticket-waves"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Prerequisite for wave support in the webapp. Refs #61.
Why
A buyer can't choose a ticket wave without its id, and nothing public carries one:
PublicEventExtraisEventExtraBase, which didn't includeticket_wavesSo
GET /events/{id}and/events/publichanded a client everything except the one field it needs to say which tier it wants — whileapi_ticket_createrefuses with "Please select a ticket wave" whenever several are open. Only the organizer, through the authenticated?all_wallets=truelisting, could see waves at all.That makes a checkout wave picker impossible for anyone but the organizer, which blocks the webapp work.
What
Moves
ticket_wavesfromEventExtraup toEventExtraBase, leavingpromo_codesas the only organizer-private field inextra.The judgement call
A
TicketWaveholds an id, title, date window, currency, price, remaining stock and the fiat flags. All of it is sales information a buyer needs in order to choose, and none of it is organizer-private the way promo codes are.The one real consequence is that buyers can now see upcoming tiers and their prices before they open — "early bird until Friday, then €25". That is exactly what #61 recorded as the cost of settling on flat Nostr tags, so surfacing it over REST reads as a gain rather than a leak. Worth a second opinion at review, since it is a product decision rather than a technical one, and it is easy to reverse by projecting a narrower wave shape if you'd rather future pricing stayed hidden until it opens.
Tests
Two, pinning both ends of the projection:
PublicEventExtracarries waves and never promo codes, and a serialisedPublicEventshows the same. 122 pass; ruff, black clean; mypy error set unchanged from baseline.I also re-ran the field-ownership AST check from the rebase playbook after moving the field — the merge previously produced a silent reparenting of
TicketWaveinto the wrong class, and this is the same kind of edit.Sequencing
Independent of #65 (the wave-preservation guard), though both touch this area. Both want a release decision —
mainis already taggedv1.6.8-aio.1, so they either ride av1.6.8-aio.2together or wait for the next events release.