//#region ../@warlock.js/herald/src/use-case-broadcast.d.ts /** * Minimal mirror of `@warlock.js/core`'s `UseCaseBroadcastEvent`. * * Kept local on purpose: this adapter is **structurally typed** so `@warlock.js/herald` * takes no dependency on `@warlock.js/core`. The shape only needs the fields the * adapter reads (`event` for the channel, `payload` for the body). */ type UseCaseBroadcastEvent = { useCase: string; event: string; id: string; at: Date; payload: unknown; }; /** * Channel adapter that publishes use-case broadcast events onto a herald broker. * * Register it in the use-cases config so successful use cases fan out to the bus: * * @example * // src/config/use-cases.ts * import { heraldBroadcast } from "@warlock.js/herald"; * * export default { * broadcast: { * enabled: true, * channels: [heraldBroadcast({ broker: "default" })], * }, * } satisfies UseCaseConfigurations; * * @param options - Optional broker name (defaults to the default broker) */ declare function heraldBroadcast(options?: { broker?: string; }): { broadcast(event: UseCaseBroadcastEvent): Promise; }; //#endregion export { UseCaseBroadcastEvent, heraldBroadcast }; //# sourceMappingURL=use-case-broadcast.d.mts.map