Fire-and-forget emit. Returns immediately; failures flow to the
onEmitError callback (or console.warn if none configured) — never
thrown into your business logic.
Use this when you want the trigger to be observability/best-effort — not on the critical path of the request.
Strongly typed via the class's Zod generic.
Awaiting variant — awaits the 202 acknowledgement from Bondi and throws
on failure. Use when you need to ensure the event was accepted before
returning to the caller (e.g. inside a transaction commit hook).
Strongly typed via the class's Zod generic.
Internal: BondiModule injects after construction.
Base class for Bondi trigger emitters in NestJS apps.
@BondiTrigger({ name: 'contact.created', payload: contactPayload }) export class ContactCreatedTrigger extends BondiTriggerBase {}
constructor(private contactCreated: ContactCreatedTrigger) {} this.contactCreated.emit({ id: '123', email: 'a@b.com' }); // type-safe via generic
BondiModule wires the BondiClient + integration slug after construction.