export type NormalizedChannelType = "telegram" | "slack" | "whatsapp" | "discord" | "wechat" | "custom";
export type NormalizedChannelMessagePartType = "text" | "image" | "audio" | "video" | "file" | "location" | "event" | "custom";
export type NormalizedChannelRetryBackoffPolicy = "fixed" | "exponential" | "provider-managed";
export type NormalizedChannelIdempotencyScope = "reply-target" | "conversation" | "channel-request";
export type NormalizedChannelDeliveryStatus = "pending" | "delivered" | "retrying" | "failed" | "expired" | "cancelled";
export interface NormalizedChannelMessagePart {
    partType: NormalizedChannelMessagePartType;
    text?: string;
    mimeType?: string;
    assetRef?: string;
    sizeBytes?: number;
    data?: Record<string, unknown>;
}
export interface NormalizedChannelAttachment {
    attachmentId: string;
    mimeType?: string;
    filename?: string;
    downloadUrl?: string;
    assetRef?: string;
    sizeBytes?: number;
}
export interface NormalizedChannelExecutionHints {
    intent?: string;
    locale?: string;
    expectsReply?: boolean;
    data?: Record<string, unknown>;
}
export interface NormalizedChannelDeliveryPolicy {
    allowEdit?: boolean;
    allowReplyThread?: boolean;
    maxRetryCount?: number;
    retryBackoffPolicy?: NormalizedChannelRetryBackoffPolicy;
    idempotencyScope?: NormalizedChannelIdempotencyScope;
}
export interface NormalizedChannelInboundRequest {
    channelRequestId: string;
    channelType: NormalizedChannelType;
    channelTenantId?: string;
    channelConversationId: string;
    channelUserId: string;
    receivedAt: string;
    dedupeKey: string;
    gatewayTargetRef: string;
    replyTargetRef: string;
    messageParts: NormalizedChannelMessagePart[];
    attachments?: NormalizedChannelAttachment[];
    executionHints?: NormalizedChannelExecutionHints;
}
export interface NormalizedChannelReplyTarget {
    replyTargetRef: string;
    channelType: NormalizedChannelType;
    channelTenantId?: string;
    channelConversationId: string;
    channelMessageRef?: string;
    recipientRef: string;
    threadRef?: string;
    expiresAt?: string;
    deliveryPolicy?: NormalizedChannelDeliveryPolicy;
    data?: Record<string, unknown>;
}
export interface NormalizedChannelReplyRequest {
    deliveryAttemptId: string;
    replyTargetRef: string;
    channelType: NormalizedChannelType;
    channelTenantId?: string;
    channelConversationId: string;
    recipientRef: string;
    threadRef?: string;
    replyToMessageId: string;
    gatewayId: string;
    text?: string;
    mediaUrl?: string;
    mediaUrls?: string[];
    fileName?: string;
    mimeType?: string;
    data?: Record<string, unknown>;
}
export interface NormalizedChannelDeliveryOutcome {
    deliveryAttemptId: string;
    replyTargetRef: string;
    deliveryStatus: NormalizedChannelDeliveryStatus;
    providerMessageRef?: string;
    providerErrorCode?: string;
    providerErrorMessage?: string;
    attemptedAt: string;
    ackedAt?: string;
    retryCount: number;
    nextRetryAt?: string;
}
