PG→Mongo Ingest CLI - v1.0.0
    Preparing search index...
    interface Message {
        schemaVersion: 1;
        tenantId: string;
        messageId: string;
        chatId: string;
        correlationId?: null | string;
        causationMessageId?: null | string;
        channel:
            | "whatsapp"
            | "telegram"
            | "instagram"
            | "twilio_sms"
            | "twilio_rcs"
            | "chatwoot"
            | "email"
            | "webhook"
            | "system"
            | "other";
        direction: "inbound"
        | "outbound";
        type: "message" | "system" | "status";
        origin: "provider" | "internal";
        createdAt: string;
        sender: {
            channelId: string;
            role: "system" | "user" | "agent" | "bot";
            displayName?: null | string;
        };
        recipients: {
            channelId: string;
            role: "system"
            | "user"
            | "agent"
            | "bot";
            displayName?: null | string;
        }[];
        content: Record<string, unknown>;
        context?: null | Record<string, unknown>;
        raw: unknown;
        derived: {
            source: string;
            kind:
                | "other"
                | "asr"
                | "ocr"
                | "nlp"
                | "moderation"
                | "translation"
                | "summary"
                | "tagging";
            ts: string;
            data: unknown;
            meta?: null
            | Record<string, unknown>;
        }[];
    }
    Index

    Properties

    schemaVersion: 1
    tenantId: string
    messageId: string
    chatId: string
    correlationId?: null | string
    causationMessageId?: null | string
    channel:
        | "whatsapp"
        | "telegram"
        | "instagram"
        | "twilio_sms"
        | "twilio_rcs"
        | "chatwoot"
        | "email"
        | "webhook"
        | "system"
        | "other"
    direction: "inbound" | "outbound"
    type: "message" | "system" | "status"
    origin: "provider" | "internal"
    createdAt: string
    sender: {
        channelId: string;
        role: "system" | "user" | "agent" | "bot";
        displayName?: null | string;
    }
    recipients: {
        channelId: string;
        role: "system" | "user" | "agent" | "bot";
        displayName?: null | string;
    }[]
    content: Record<string, unknown>
    context?: null | Record<string, unknown>
    raw: unknown
    derived: {
        source: string;
        kind:
            | "other"
            | "asr"
            | "ocr"
            | "nlp"
            | "moderation"
            | "translation"
            | "summary"
            | "tagging";
        ts: string;
        data: unknown;
        meta?: null
        | Record<string, unknown>;
    }[]