/**
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
* Copyright (C) 2023-2026 Roj
*
* This file is part of MTKruto.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*/
import { Api, SecretChats } from "../2_tl.js";
import type { Contact } from "./0_contact.js";
import type { Location } from "./0_location.js";
import { type SecretMessageEntity } from "./0_secret_message_entity.js";
import type { Voice } from "./0_voice.js";
import type { Animation } from "./1_animation.js";
import type { Audio } from "./1_audio.js";
import type { Document } from "./1_document.js";
import type { Photo } from "./1_photo.js";
import { type Sticker } from "./1_sticker.js";
import type { Venue } from "./1_venue.js";
import type { VideoNote } from "./1_video_note.js";
import type { Video } from "./1_video.js";
/** @unlisted */
export interface _SecretMessageBase {
/** The identifier of the secret chat that the message belongs to. */
chatId: number;
/** The message's identifier. */
id: string;
/** The identifier of the message that this message replies to. */
replyToMessageId?: string;
/** Whether the message was sent silently. */
isSilent: boolean;
/** The message's time-to-live. */
ttl: number;
/** The name of the inline bot that was used to send the message. */
viaBot?: string;
}
/** @unlisted */
export interface _SecretMessageMediaBase extends _SecretMessageBase {
/** The message's media group ID. */
mediaGroupId?: string;
/** The message's caption. */
caption: string;
/** The entities of the message's caption. */
entities: SecretMessageEntity[];
/** Information required for downloading the file. */
fileInformation: string;
}
/**
* A secret text message.
* @unlisted
*/
export interface SecretMessageText extends _SecretMessageBase {
type: "text";
/** The message's text. */
text: string;
/** The entities of the message's text. */
entities: SecretMessageEntity[];
}
/**
* A secret message sharing a location.
* @unlisted
*/
export interface SecretMessageLocation extends _SecretMessageBase {
type: "location";
/** The location. */
location: Location;
}
/**
* A secret message sharing a contact.
* @unlisted
*/
export interface SecretMessageContact extends _SecretMessageBase {
type: "contact";
/** The contact. */
contact: Contact;
}
/**
* A secret message sharing a venue.
* @unlisted
*/
export interface SecretMessageVenue extends _SecretMessageBase {
type: "venue";
/** The venue. */
venue: Venue;
}
/**
* A secret message sharing a web page.
* @unlisted
*/
export interface SecretMessageWebPage extends _SecretMessageBase {
type: "webPage";
/** The URL of the web page. */
url: string;
/** The message's caption. */
caption: string;
/** The entities of the message's caption. */
entities: SecretMessageEntity[];
}
/**
* A secret message sharing a photo.
* @unlisted
*/
export interface SecretMessagePhoto extends _SecretMessageMediaBase {
type: "photo";
/** The photo included in the message. */
photo: Photo;
}
/**
* A secret message sharing a video.
* @unlisted
*/
export interface SecretMessageVideo extends _SecretMessageMediaBase {
type: "video";
/** The video included in the message. */
video: Video;
}
/**
* A secret message sharing a video note.
* @unlisted
*/
export interface SecretMessageVideoNote extends _SecretMessageMediaBase {
type: "videoNote";
/** The video note included in the message. */
videoNote: VideoNote;
}
/**
* A secret message sharing an audio.
* @unlisted
*/
export interface SecretMessageAudio extends _SecretMessageMediaBase {
type: "audio";
/** The audio included in the message. */
audio: Audio;
}
/**
* A secret message sharing a document.
* @unlisted
*/
export interface SecretMessageDocument extends _SecretMessageMediaBase {
type: "document";
/** The document included in the message. */
document: Document;
}
/**
* A secret message sharing a sticker.
* @unlisted
*/
export interface SecretMessageSticker extends _SecretMessageBase {
type: "sticker";
/** The sticker included in the message. */
sticker: Sticker;
}
/**
* A secret message sharing an animation.
* @unlisted
*/
export interface SecretMessageAnimation extends _SecretMessageMediaBase {
type: "animation";
/** The animation included in the message. */
animation: Animation;
}
/**
* A secret message sharing a voice.
* @unlisted
*/
export interface SecretMessageVoice extends _SecretMessageMediaBase {
type: "voice";
/** The voice included in the message. */
voice: Voice;
}
/** Any type of secret message. */
export type SecretMessage = SecretMessageText | SecretMessageLocation | SecretMessageContact | SecretMessageVenue | SecretMessageWebPage | SecretMessagePhoto | SecretMessageVideo | SecretMessageVideoNote | SecretMessageAudio | SecretMessageDocument | SecretMessageSticker | SecretMessageAnimation | SecretMessageVoice;
export declare function constructSecretMessage(chatId: number, message: SecretChats.decryptedMessage, encryptedMessage: Api.EncryptedMessage): SecretMessage;
//# sourceMappingURL=2_secret_message.d.ts.map