Package-level declarations
Types
A product of the catalog: a draft until it is published on the storefront, which takes a brand and a category; it can be delisted and published again. Its name, description, brand, category and price change at any time.
The state of a Product, changed in place by its events. It is the storefront's read model too: the snapshot queries filter it by category, brand and status and sort it by price, so each of those leads an index whose further keys are the storefront's usual filter and sort ("the published products of a category, cheapest first").
The storefront's reads of the catalog, service routes beside the product's queries: a product as a shopper sees it, a category's products in a page, and the price of a basket's lines. Each reads as its caller (RouteCall.queries), so it sees what the caller may; only a published product is on the storefront.