import type { TelegramEphemeralMessageParameters, TelegramReplyParameters } from './generated/types.js'; interface EphemeralMessageLike { ephemeral_message_id?: number; receiver_user?: { id: number; }; from?: { id: number; is_bot: boolean; }; chat?: { id: number | string; }; } interface EphemeralSendOverrides { ephemeral_message_parameters?: TelegramEphemeralMessageParameters; reply_parameters?: TelegramReplyParameters; /** pass `false` to skip ephemeral auto-injection and send a regular message */ ephemeral?: boolean; } /** * ephemeral auto-injection for send-family shortcuts: an incoming ephemeral message can only * be answered ephemerally (within 15s, authorized by `reply_parameters.ephemeral_message_id`), * so sends from such a context fill `ephemeral_message_parameters` + the ephemeral reply anchor. * explicit call-site values win field by field; `ephemeral: false` opts out; non-ephemeral * contexts contribute nothing. the flag itself never reaches the wire — `undefined` drops at * serialization, shadowing the value the params spread carried */ export declare function ephemeralSendParams(raw: EphemeralMessageLike, params: EphemeralSendOverrides): { ephemeral: undefined; } | { ephemeral?: never; } | { reply_parameters: { message_id?: number; chat_id?: number | string; ephemeral_message_id: number; allow_sending_without_reply?: boolean; quote?: string | import("./formattable.js").Formattable; quote_parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); quote_entities?: import("./index.js").TelegramMessageEntity[]; quote_position?: number; checklist_task_id?: number; poll_option_id?: string; }; ephemeral_message_parameters?: { receiver_user_id: number; callback_query_id?: string; replace_callback_query_message?: boolean; }; ephemeral: undefined; } | { reply_parameters: { message_id?: number; chat_id?: number | string; ephemeral_message_id: number; allow_sending_without_reply?: boolean; quote?: string | import("./formattable.js").Formattable; quote_parse_mode?: "HTML" | "Markdown" | "MarkdownV2" | (string & {}); quote_entities?: import("./index.js").TelegramMessageEntity[]; quote_position?: number; checklist_task_id?: number; poll_option_id?: string; }; ephemeral_message_parameters?: { receiver_user_id: number; callback_query_id?: string; replace_callback_query_message?: boolean; }; ephemeral?: never; }; /** * the target triple the `editEphemeralMessage*` / `deleteEphemeralMessage` twins require; * `undefined` when the wrapped message is not ephemeral (or lacks a resolvable receiver) */ export declare function ephemeralTarget(raw: EphemeralMessageLike): { chat_id: string | number; receiver_user_id: number; ephemeral_message_id: number; } | undefined; /** * callback-query sends opt into ephemeral by passing `ephemeral_message_parameters` — only then * does the query id auto-fill as the authorization token (a blanket fill would make every send * ephemeral) */ export declare function callbackEphemeralParams(queryId: string, params: EphemeralSendOverrides): { ephemeral_message_parameters: { callback_query_id: string; receiver_user_id: number; replace_callback_query_message?: boolean; }; } | { ephemeral_message_parameters?: never; }; export {}; //# sourceMappingURL=ephemeral.d.ts.map