rustigram-types 0.12.0

Telegram Bot API type definitions for rustigram
Documentation
//! Type definitions for the Telegram Bot API.
//!
//! This crate contains every struct, enum, and type alias described in the
//! [official Bot API documentation](https://core.telegram.org/bots/api).
//! All types implement [`serde::Serialize`] and [`serde::Deserialize`] and
//! map directly to the JSON objects Telegram sends and receives.
//!
//! You rarely need to depend on this crate directly — the `rustigram` facade
//! re-exports everything you need for day-to-day bot development.
//!
//! # Organisation
//!
//! | Module | Contents |
//! |---|---|
//! | [`background`] | [`background::BackgroundFill`], [`background::BackgroundType`], [`background::ChatBackground`] |
//! | [`business`] | Business profile types, [`business::Birthdate`], [`business::UserRating`] |
//! | [`chat`] | [`chat::Chat`], [`chat::ChatFullInfo`], [`chat::ChatPermissions`], locations, venues |
//! | [`chat_member`] | All six [`chat_member::ChatMember`] variants |
//! | [`checklist`] | [`checklist::Checklist`], [`checklist::ChecklistTask`], [`checklist::InputChecklist`], service messages |
//! | [`direct_messages`] | [`direct_messages::DirectMessagesTopic`], price-changed service messages |
//! | [`mod@file`] | [`file::File`], [`file::PhotoSize`], [`file::InputFile`], [`file::VideoQuality`], media types |
//! | [`managed_bot`] | [`managed_bot::ManagedBotCreated`] |
//! | [`message`] | [`message::Message`], [`message::MessageEntity`], [`message::ParseMode`], reply types |
//! | [`update`] | [`update::Update`], [`update::UpdateKind`], [`update::CallbackQuery`], [`update::BusinessBotRights`] |
//! | [`user`] | [`user::User`], [`user::ChatId`], [`user::BotCommand`] |
//! | [`keyboard`] | Inline and reply keyboards, [`keyboard::ReplyMarkup`] |
//! | [`payments`] | [`payments::LabeledPrice`], invoices, Star transactions, [`payments::TransactionPartner`], [`payments::OwnedGift`] |
//! | [`poll`] | [`poll::Poll`], [`poll::PollAnswer`], [`poll::InputPollOption`] |
//! | [`rich_message`] | [`rich_message::RichMessage`], [`rich_message::RichBlock`], [`rich_message::RichText`], [`rich_message::InputRichMessage`] |
//! | [`sticker`] | [`sticker::Sticker`], [`sticker::StickerSet`], [`sticker::InputSticker`] |
//! | [`suggested_post`] | [`suggested_post::SuggestedPostInfo`], [`suggested_post::SuggestedPostParameters`], service messages |
//! | [`inline`] | [`inline::InlineQuery`], all `InlineQueryResult` variants |
//! | [`story`] | Story types and area definitions |
//! | [`forum`] | [`forum::ForumTopic`] and the six forum service messages |
//! | [`shared`] | [`shared::UsersShared`], [`shared::ChatShared`], [`shared::SharedUser`] |
//! | [`video_chat`] | The four video chat service messages |
//! | [`passport`] | Telegram Passport types and error variants |
//! | [`games`] | [`games::GameHighScore`] |
//! | [`gifts`] | [`gifts::Gift`], [`gifts::Gifts`] |
//! | [`giveaway`] | [`giveaway::Giveaway`] and the three giveaway service messages |
//! | [`reaction`] | Re-exports [`message::ReactionType`] |
//! | [`webhook`] | [`webhook::WebhookInfo`] |
#![warn(missing_docs)]

/// Chat background types.
pub mod background;
/// Business account profile types.
pub mod business;
/// Chat and location types.
pub mod chat;
/// Chat member status types.
pub mod chat_member;
/// Checklist content type and related service messages.
pub mod checklist;
/// Community (linked chats) types.
pub mod community;
/// Direct messages topic and channel pricing service messages.
pub mod direct_messages;
/// File and media types.
pub mod file;
/// Forum topic types.
pub mod forum;
/// Game types.
pub mod games;
/// Gift types.
pub mod gifts;
/// Giveaway types and service messages.
pub mod giveaway;
/// Inline query and result types.
pub mod inline;
/// Keyboard and markup types.
pub mod keyboard;
/// Managed bot service message types.
pub mod managed_bot;
/// Message and entity types.
pub mod message;
/// Telegram Passport types.
pub mod passport;
/// Payment and invoice types.
pub mod payments;
/// Poll types.
pub mod poll;
/// Reaction types.
pub mod reaction;
/// Rich message types (Bot API 10.1).
pub mod rich_message;
/// Users and chats shared with the bot via keyboard request buttons.
pub mod shared;
/// Sticker types.
pub mod sticker;
/// Story types.
pub mod story;
/// Suggested post types and service messages.
pub mod suggested_post;
/// Update and event types.
pub mod update;
/// User and bot command types.
pub mod user;
/// Video chat service message types.
pub mod video_chat;
/// Webhook info types.
pub mod webhook;

pub use background::{
    BackgroundFill, BackgroundFillFreeformGradient, BackgroundFillGradient, BackgroundFillSolid,
    BackgroundType, BackgroundTypeChatTheme, BackgroundTypeFill, BackgroundTypePattern,
    BackgroundTypeWallpaper, ChatBackground,
};
pub use business::{
    Birthdate, BusinessIntro, BusinessLocation, BusinessOpeningHours, BusinessOpeningHoursInterval,
    UserRating,
};
pub use chat::{
    Chat, ChatFullInfo, ChatInviteLink, ChatJoinRequest, ChatLocation, ChatPermissions, ChatPhoto,
    ChatType, InputMediaLink, Link, Location, Venue,
};
pub use chat_member::{
    ChatMember, ChatMemberAdministrator, ChatMemberBanned, ChatMemberLeft, ChatMemberMember,
    ChatMemberOwner, ChatMemberRestricted,
};
pub use checklist::{
    Checklist, ChecklistTask, ChecklistTasksAdded, ChecklistTasksDone, InputChecklist,
    InputChecklistTask,
};
pub use community::{Community, CommunityChatAdded, CommunityChatRemoved};
pub use direct_messages::{
    DirectMessagePriceChanged, DirectMessagesTopic, PaidMessagePriceChanged,
};
pub use file::{
    Animation, Audio, Document, File, InputFile, InputMedia, InputMediaAnimation, InputMediaAudio,
    InputMediaDocument, InputMediaLivePhoto, InputMediaLocation, InputMediaPhoto,
    InputMediaSticker, InputMediaVenue, InputMediaVideo, InputMediaVoiceNote, InputPaidMedia,
    InputPaidMediaLivePhoto, InputPaidMediaPhoto, InputPaidMediaVideo, InputProfilePhoto,
    InputProfilePhotoAnimated, InputProfilePhotoStatic, LivePhoto, PassportFile, PhotoSize, Video,
    VideoNote, VideoQuality, Voice,
};
pub use forum::{
    ForumTopic, ForumTopicClosed, ForumTopicCreated, ForumTopicEdited, ForumTopicReopened,
    GeneralForumTopicHidden, GeneralForumTopicUnhidden,
};
pub use games::{CallbackGame, Game, GameHighScore};
pub use gifts::{
    Gift, GiftBackground, GiftInfo, Gifts, UniqueGift, UniqueGiftBackdrop,
    UniqueGiftBackdropColors, UniqueGiftColors, UniqueGiftInfo, UniqueGiftModel, UniqueGiftSymbol,
};
pub use giveaway::{Giveaway, GiveawayCompleted, GiveawayCreated, GiveawayWinners};
pub use inline::{
    ChosenInlineResult, InlineQuery, InlineQueryResult, InlineQueryResultArticle,
    InlineQueryResultAudio, InlineQueryResultCachedAudio, InlineQueryResultCachedDocument,
    InlineQueryResultCachedGif, InlineQueryResultCachedMpeg4Gif, InlineQueryResultCachedPhoto,
    InlineQueryResultCachedSticker, InlineQueryResultCachedVideo, InlineQueryResultCachedVoice,
    InlineQueryResultContact, InlineQueryResultDocument, InlineQueryResultGame,
    InlineQueryResultGif, InlineQueryResultLocation, InlineQueryResultMpeg4Gif,
    InlineQueryResultPhoto, InlineQueryResultVenue, InlineQueryResultVideo, InlineQueryResultVoice,
    InlineQueryResultsButton, InputContactMessageContent, InputInvoiceMessageContent,
    InputLocationMessageContent, InputMessageContent, InputTextMessageContent,
    InputVenueMessageContent, PreparedInlineMessage, SentGuestMessage, SentWebAppMessage,
};
pub use keyboard::{
    ButtonStyle, CopyTextButton, ForceReply, InlineKeyboardButton, InlineKeyboardMarkup,
    KeyboardButton, KeyboardButtonPollType, KeyboardButtonRequestChat,
    KeyboardButtonRequestManagedBot, KeyboardButtonRequestUsers, LoginUrl, MenuButton,
    PreparedKeyboardButton, ReplyKeyboardMarkup, ReplyKeyboardRemove, ReplyMarkup,
    SwitchInlineQueryChosenChat,
};
pub use managed_bot::ManagedBotCreated;
pub use message::{
    ChatOwnerChanged, ChatOwnerLeft, Contact, Dice, ExternalReplyInfo, InaccessibleMessage,
    LinkPreviewOptions, MaybeInaccessibleMessage, Message, MessageAutoDeleteTimerChanged,
    MessageEntity, MessageEntityKind, MessageId, MessageOrigin, ParseMode, ProximityAlertTriggered,
    ReactionType, ReplyParameters, TextQuote, WebAppData, WebAppInfo, WriteAccessAllowed,
};
pub use passport::{
    EncryptedCredentials, EncryptedPassportElement, PassportData, PassportElementError,
};
pub use payments::{
    AcceptedGiftTypes, AffiliateInfo, BotSubscriptionUpdated, Invoice, LabeledPrice, OrderInfo,
    OwnedGift, OwnedGiftRegular, OwnedGiftUnique, OwnedGifts, PaidMedia, PaidMediaInfo,
    PaidMediaLivePhoto, PaidMediaPhoto, PaidMediaPreview, PaidMediaVideo, PreCheckoutQuery,
    RefundedPayment, RevenueWithdrawalState, ShippingAddress, ShippingOption, ShippingQuery,
    StarAmount, StarTransaction, StarTransactions, SuccessfulPayment, TransactionPartner,
    TransactionPartnerAffiliateProgram, TransactionPartnerChat, TransactionPartnerFragment,
    TransactionPartnerTelegramApi, TransactionPartnerUser,
};
pub use poll::{
    InputPollMedia, InputPollOption, InputPollOptionMedia, Poll, PollAnswer, PollMedia, PollOption,
    PollOptionAdded, PollOptionDeleted, PollType,
};
pub use rich_message::{
    InputRichBlock, InputRichBlockAnchor, InputRichBlockAnimation, InputRichBlockAudio,
    InputRichBlockBlockQuotation, InputRichBlockCollage, InputRichBlockDetails,
    InputRichBlockDivider, InputRichBlockFooter, InputRichBlockList, InputRichBlockListItem,
    InputRichBlockMap, InputRichBlockMathematicalExpression, InputRichBlockParagraph,
    InputRichBlockPhoto, InputRichBlockPreformatted, InputRichBlockPullQuotation,
    InputRichBlockSectionHeading, InputRichBlockSlideshow, InputRichBlockTable,
    InputRichBlockThinking, InputRichBlockVideo, InputRichBlockVoiceNote, InputRichMessage,
    InputRichMessageContent, InputRichMessageMedia, InputRichMessageMediaKind, RichBlock,
    RichBlockAnchor, RichBlockAnimation, RichBlockAudio, RichBlockBlockQuotation, RichBlockCaption,
    RichBlockCollage, RichBlockDetails, RichBlockDivider, RichBlockFooter, RichBlockList,
    RichBlockListItem, RichBlockMap, RichBlockMathematicalExpression, RichBlockParagraph,
    RichBlockPhoto, RichBlockPreformatted, RichBlockPullQuotation, RichBlockSectionHeading,
    RichBlockSlideshow, RichBlockTable, RichBlockTableCell, RichBlockThinking, RichBlockVideo,
    RichBlockVoiceNote, RichMessage, RichText, RichTextAnchor, RichTextAnchorLink,
    RichTextBankCardNumber, RichTextBold, RichTextBotCommand, RichTextCashtag, RichTextCode,
    RichTextCustomEmoji, RichTextDateTime, RichTextEmailAddress, RichTextHashtag, RichTextItalic,
    RichTextMarked, RichTextMathematicalExpression, RichTextMention, RichTextNode,
    RichTextPhoneNumber, RichTextReference, RichTextReferenceLink, RichTextSpoiler,
    RichTextStrikethrough, RichTextSubscript, RichTextSuperscript, RichTextTextMention,
    RichTextUnderline, RichTextUrl,
};
pub use shared::{ChatShared, SharedUser, UsersShared};
pub use sticker::{
    InputSticker, MaskPoint, MaskPosition, Sticker, StickerFormat, StickerSet, StickerType,
};
pub use story::{
    InputStoryContent, InputStoryContentPhoto, InputStoryContentVideo, LocationAddress, Story,
    StoryArea, StoryAreaPosition, StoryAreaType,
};
pub use suggested_post::{
    SuggestedPostApprovalFailed, SuggestedPostApproved, SuggestedPostDeclined, SuggestedPostInfo,
    SuggestedPostPaid, SuggestedPostParameters, SuggestedPostPrice, SuggestedPostRefunded,
};
pub use update::{
    BusinessBotRights, BusinessConnection, BusinessMessagesDeleted, CallbackQuery, ChatBoost,
    ChatBoostAdded, ChatBoostRemoved, ChatBoostSource, ChatBoostSourceGiftCode,
    ChatBoostSourceGiveaway, ChatBoostSourcePremium, ChatBoostUpdated, ChatMemberUpdated,
    ManagedBotUpdated, MessageReactionCountUpdated, MessageReactionUpdated, PaidMediaPurchased,
    ReactionCount, Update, UpdateKind, UserChatBoosts,
};
pub use user::{
    BotAccessSettings, BotCommand, BotCommandScope, BotDescription, BotName, BotShortDescription,
    ChatAdministratorRights, ChatId, User, UserProfileAudios, UserProfilePhotos,
};
pub use video_chat::{
    VideoChatEnded, VideoChatParticipantsInvited, VideoChatScheduled, VideoChatStarted,
};
pub use webhook::WebhookInfo;