import { l as ReplyPayload } from "./types-Bo6laTsg.js"; import { A as LiveMessageState, N as MessageDurabilityPolicy, O as DurableMessageSendIntent, P as MessageReceipt, R as MessageSendContext, z as RenderedMessageBatch } from "./types-qFgVZoFh.js"; import { S as OutboundPayloadDeliverySuppressionReason, b as OutboundDeliveryResult } from "./outbound.types-CeQt-xHY.js"; import { i as OutboundDeliveryIntent, t as DeliverOutboundPayloadsParams } from "./deliver-Dct7lo7t.js"; //#region src/channels/message/send.d.ts type DurableMessageBatchSendParams = Omit & { payloads: ReplyPayload[]; attempt?: number; signal?: AbortSignal; /** @deprecated Use `signal`. */ abortSignal?: AbortSignal; previousReceipt?: MessageReceipt; }; type DurableMessageSuppressionReason = OutboundPayloadDeliverySuppressionReason | "no_visible_result"; type DurableMessageFailureStage = "platform_send" | "queue" | "unknown"; type DurableMessagePayloadDeliveryOutcome = { index: number; status: "sent"; results: OutboundDeliveryResult[]; } | { index: number; status: "suppressed"; reason: DurableMessageSuppressionReason; hookEffect?: { cancelReason?: string; metadata?: Record; }; } | { index: number; status: "failed"; error: unknown; sentBeforeError: boolean; stage: DurableMessageFailureStage; }; type DurableMessageBatchSendResult = { status: "sent"; results: OutboundDeliveryResult[]; receipt: MessageReceipt; deliveryIntent?: OutboundDeliveryIntent; payloadOutcomes?: DurableMessagePayloadDeliveryOutcome[]; } | { status: "suppressed"; results: []; receipt: MessageReceipt; deliveryIntent?: OutboundDeliveryIntent; reason: DurableMessageSuppressionReason; payloadOutcomes?: DurableMessagePayloadDeliveryOutcome[]; } | { status: "partial_failed"; results: OutboundDeliveryResult[]; receipt: MessageReceipt; error: unknown; sentBeforeError: true; deliveryIntent?: OutboundDeliveryIntent; payloadOutcomes?: DurableMessagePayloadDeliveryOutcome[]; } | { status: "failed"; error: unknown; stage?: DurableMessageFailureStage; payloadOutcomes?: DurableMessagePayloadDeliveryOutcome[]; }; type SerializedDurableMessagePayloadOutcome = { index: number; status: "sent"; resultCount: number; } | { index: number; status: "suppressed"; reason: DurableMessageSuppressionReason; hookEffect?: { cancelReason?: string; metadata?: Record; }; } | { index: number; status: "failed"; error: string; sentBeforeError: boolean; stage: DurableMessageFailureStage; }; type DurableMessageSendContextParams = DurableMessageBatchSendParams & { durability?: Exclude; /** Runs after the durable queue intent exists and before platform delivery starts. */ onDeliveryIntent?: (intent: DurableMessageSendIntent) => void; preview?: LiveMessageState; onPreviewUpdate?: (rendered: RenderedMessageBatch, state: LiveMessageState) => Promise> | LiveMessageState; onEditReceipt?: (receipt: MessageReceipt, rendered: RenderedMessageBatch) => Promise | MessageReceipt; onDeleteReceipt?: (receipt: MessageReceipt) => Promise | void; onCommitReceipt?: (receipt: MessageReceipt) => Promise | void; onSendFailure?: (error: unknown) => Promise | void; }; type DurableMessageSendContext = MessageSendContext; //#endregion export { SerializedDurableMessagePayloadOutcome as a, DurableMessageSendContextParams as i, DurableMessageBatchSendResult as n, DurableMessageSendContext as r, DurableMessageBatchSendParams as t };