/**
 * Delivery emitters — typed wrappers for DeliveryEvent domain.
 */
import { createEventEnvelope } from '@pellux/goodvibes-sdk/platform/runtime/events/envelope';
function deliveryEvent(type, data, ctx) {
    return createEventEnvelope(type, { type, ...data }, ctx);
}
export function emitDeliveryQueued(bus, ctx, data) {
    bus.emit('deliveries', deliveryEvent('DELIVERY_QUEUED', data, ctx));
}
export function emitDeliveryStarted(bus, ctx, data) {
    bus.emit('deliveries', deliveryEvent('DELIVERY_STARTED', data, ctx));
}
export function emitDeliverySucceeded(bus, ctx, data) {
    bus.emit('deliveries', deliveryEvent('DELIVERY_SUCCEEDED', data, ctx));
}
export function emitDeliveryFailed(bus, ctx, data) {
    bus.emit('deliveries', deliveryEvent('DELIVERY_FAILED', data, ctx));
}
export function emitDeliveryDeadLettered(bus, ctx, data) {
    bus.emit('deliveries', deliveryEvent('DELIVERY_DEAD_LETTERED', data, ctx));
}
