platform-codebase/package/CHANGELOG.md
2026-01-18 09:21:37 -08:00

1.9 KiB

Changelog

All notable changes to the @lilith/domain-events package will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[2.5.0] - 2026-01-11

Added

  • Merchant domain events (17 new event types):
    • Product lifecycle: PRODUCT_CREATED, PRODUCT_UPDATED, PRODUCT_PUBLISHED, PRODUCT_ARCHIVED, PRODUCT_DELETED
    • Inventory management: INVENTORY_OUT_OF_STOCK, INVENTORY_LOW_STOCK, INVENTORY_RESTOCKED, INVENTORY_RESERVED, INVENTORY_RELEASED
    • Product variants: VARIANT_ADDED, VARIANT_UPDATED, VARIANT_DELETED
    • Subscription tiers: SUBSCRIPTION_TIER_CREATED, SUBSCRIPTION_TIER_UPDATED, SUBSCRIPTION_TIER_PRICING_CHANGED, SUBSCRIPTION_TIER_FEATURES_CHANGED, SUBSCRIPTION_TIER_ARCHIVED
  • New file src/types/merchant-events.ts with comprehensive payload interfaces
  • 17 new emitter methods in DomainEventsEmitter:
    • emitProductCreated(), emitProductUpdated(), emitProductPublished(), emitProductArchived(), emitProductDeleted()
    • emitInventoryOutOfStock(), emitInventoryLowStock(), emitInventoryRestocked(), emitInventoryReserved(), emitInventoryReleased()
    • emitVariantAdded(), emitVariantUpdated(), emitVariantDeleted()
    • emitSubscriptionTierCreated(), emitSubscriptionTierUpdated(), emitSubscriptionTierPricingChanged(), emitSubscriptionTierFeaturesChanged(), emitSubscriptionTierArchived()

Dependencies

  • Imports merchant types from @platform/merchant shared package

Migration Notes

  • Merchant feature integration requires:
    1. Update to @lilith/domain-events@^2.5.0
    2. Import DomainEventsModule.forFeature() in merchant modules
    3. Inject DomainEventsEmitter into services
    4. Emit events after DB writes (dual-write pattern)

[2.4.2] - Previous Release

(Previous changelog entries preserved)