// This file was auto-generated by Fern from our API Definition.

export interface WhatsappMessageStatusList {
    type: "list";
    /** The provided ruleset ID */
    ruleset_id: string;
    pages: WhatsappMessageStatusList.Pages;
    /** Total number of events */
    total_count: number;
    events: WhatsappMessageStatusList.Events.Item[];
}

export namespace WhatsappMessageStatusList {
    export interface Pages {
        type: "pages";
        /** Number of results per page */
        per_page: number;
        /** Total number of pages */
        total_pages: number;
        /** Information for fetching next page (null if no more pages) */
        next?: Pages.Next;
    }

    export namespace Pages {
        /**
         * Information for fetching next page (null if no more pages)
         */
        export interface Next {
            /** Cursor for the next page */
            starting_after?: string;
        }
    }

    export type Events = Events.Item[];

    export namespace Events {
        export interface Item {
            /** Event ID */
            id: string;
            /** ID of the conversation */
            conversation_id: string;
            /** Current status of the message */
            status: Item.Status;
            /** Event type */
            type: "broadcast_outbound";
            /** Creation timestamp */
            created_at: number;
            /** Last update timestamp */
            updated_at: number;
            /** WhatsApp's message identifier */
            whatsapp_message_id: string;
            /** Name of the WhatsApp template used */
            template_name?: string;
        }

        export namespace Item {
            /** Current status of the message */
            export const Status = {
                Sent: "sent",
                Delivered: "delivered",
                Read: "read",
                Failed: "failed",
            } as const;
            export type Status = (typeof Status)[keyof typeof Status];
        }
    }
}
