Skip to content

M9-S2: seller listing endpoints — submit, update-draft, and my-listings query#105

Merged
erikshafer merged 1 commit into
mainfrom
m9-s2-seller-listing-endpoints
Jun 13, 2026
Merged

M9-S2: seller listing endpoints — submit, update-draft, and my-listings query#105
erikshafer merged 1 commit into
mainfrom
m9-s2-seller-listing-endpoints

Conversation

@erikshafer

Copy link
Copy Markdown
Owner

Summary

  • Wire three missing seller-facing HTTP endpoints in the Selling BC as backend precursors for the seller console (M9-S4+)
  • Add SellerListingSummary as a Marten inline snapshot projection, resolving OQ-2 from the M9 milestone doc
  • Nine integration tests covering happy paths, guard conditions, seller isolation, and projection status tracking

New endpoints

Endpoint Method Auth Pattern
/api/selling/listings/submit POST AllowAnonymous Thin gateway → SubmitListing
/api/selling/listings/draft PUT AllowAnonymous Thin gateway → UpdateDraftListing
/api/selling/listings?sellerId= GET AllowAnonymous Query against SellerListingSummary

Findings

  • SnapshotLifecycle moved from Marten.Events.Projections to JasperFx.Events.Projections in Marten 9
  • Wolverine HTTP binds query parameters by convention for GET endpoints — no [FromQuery] needed (nor available in BC projects)

Test baseline

Metric Before After
Selling BC tests 36 45 (+9)
Full solution tests 307 316 (+9)
Build warnings 2 CS0108 2 CS0108 (baseline held)

Test plan

  • POST /api/selling/listings/submit returns 202, cascades command, listing transitions to Published
  • PUT /api/selling/listings/draft returns 202, cascades command, fields updated on aggregate
  • GET /api/selling/listings?sellerId= returns seller's listings from inline projection
  • Query returns empty list for unknown seller
  • Query filters by seller — no cross-seller leakage
  • Projection reflects status changes after submit
  • Guard tests verify 202 from thin gateway for invalid-state commands
  • Existing 307 tests unchanged
  • No frontend changes — client/ untouched

…gs query

Wire three missing seller-facing HTTP endpoints in the Selling BC as backend
precursors for the seller console (M9-S4+):

- POST /api/selling/listings/submit — thin gateway over SubmitListing
- PUT /api/selling/listings/draft — thin gateway over UpdateDraftListing
- GET /api/selling/listings?sellerId= — query against new SellerListingSummary

Add SellerListingSummary as a Marten inline snapshot projection (resolves OQ-2
from the M9 milestone doc). Nine integration tests cover happy paths, guards,
seller isolation, and projection status tracking. 316 total tests (was 307).
@erikshafer erikshafer self-assigned this Jun 13, 2026
@erikshafer erikshafer merged commit 7c498d1 into main Jun 13, 2026
14 checks passed
@erikshafer erikshafer deleted the m9-s2-seller-listing-endpoints branch June 13, 2026 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant