webiny-api-event-publisher-catalog

Catalogs DomainEvent and EventPublisher abstractions for Webiny API event publishing.

8.0k|673|Updated Jan 9, 2018
One-click install
npx skills add https://github.com/webiny/webiny-js --skill webiny-api-event-publisher-catalog
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: webiny-api-event-publisher-catalog
Source: https://github.com/webiny/webiny-js/tree/main/skills/user-skills/generated/api/event-publisher
Command: npx skills add https://github.com/webiny/webiny-js --skill webiny-api-event-publisher-catalog

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developers working with the Webiny framework need to know which event-publishing abstractions exist and where to import them from, but discovering the correct interfaces and source files requires digging through the codebase.

Core Features & Use Cases

  • Abstraction Catalog: Lists the DomainEvent base class and EventPublisher abstraction with exact import paths and source file locations.
  • Implementation Guidance: Points to related pattern skills (webiny-use-case-pattern, webiny-event-handler-pattern) for wiring up event handlers.
  • Use Case: When building a Webiny API feature that must notify other parts of the system after an action, look up EventPublisher here, read the source file for exact types, and publish a custom DomainEvent subclass to registered handlers.

Quick Start

Show me the Webiny event publisher abstractions and how to import EventPublisher to publish a domain event.

Frequently Asked Questions about webiny-api-event-publisher-catalog

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I publish domain events in a Webiny API?

Import EventPublisher from webiny/api/event-publisher and call it with a subclass of DomainEvent. The publisher dispatches the event to all registered handlers in the Webiny API layer.

What is the DomainEvent class in Webiny?

DomainEvent is the base class for all domain events in Webiny, defined in @webiny/api-core/features/eventPublisher. You extend it to create custom events that EventPublisher can dispatch.

Where do I import EventPublisher from in Webiny?

Import it with: import { EventPublisher } from "webiny/api/event-publisher". The underlying source lives in @webiny/api-core/features/eventPublisher/index.ts, which you should read for exact types.

Does Webiny event publishing include handler implementation patterns?

The catalog itself only lists abstractions and import paths. For implementation patterns, it directs you to the webiny-use-case-pattern and webiny-event-handler-pattern skills.

What are the limitations of the Webiny event publisher catalog?

It covers only two abstractions, DomainEvent and EventPublisher, and does not include executable code or handler registration logic. You must read the referenced source files to get exact interfaces before coding.