package tgapi // BusinessIntro contains information about the business intro. // Since: Bot API 7.2 // See https://core.telegram.org/bots/api#businessintro type BusinessIntro struct { // Title Optional. Title text of the business intro Title string `json:"title,omitempty"` // Message Optional. Message text of the business intro Message string `json:"message,omitempty"` // Sticker Optional. Sticker of the business intro Sticker *Sticker `json:"sticker,omitempty"` } // BusinessLocation contains information about the business location. // Since: Bot API 7.2 // See https://core.telegram.org/bots/api#businesslocation type BusinessLocation struct { // Address Address of the business Address string `json:"address"` // Location Optional. Location of the business Location *Location `json:"location,omitempty"` } // BusinessOpeningHoursInterval represents an interval of opening hours. // Since: Bot API 7.2 // See https://core.telegram.org/bots/api#businessopeninghoursinterval type BusinessOpeningHoursInterval struct { // OpeningMinute The minute's sequence number in a week, starting on Monday, marking the start of the time // interval during which the business is open; 0 - 7 * 24 * 60 OpeningMinute int `json:"opening_minute"` // ClosingMinute The minute's sequence number in a week, starting on Monday, marking the end of the time // interval during which the business is open; 0 - 8 * 24 * 60 ClosingMinute int `json:"closing_minute"` } // BusinessOpeningHours represents the opening hours of a business. // Since: Bot API 7.2 // See https://core.telegram.org/bots/api#businessopeninghours type BusinessOpeningHours struct { // TimeZoneName Unique name of the time zone for which the opening hours are defined TimeZoneName string `json:"time_zone_name"` // OpeningHours List of time intervals describing business opening hours OpeningHours []BusinessOpeningHoursInterval `json:"opening_hours"` } // BusinessBotRights represents the rights of a business bot. // All fields are optional booleans that, when present, are always true. // Since: Bot API 9.0 // See https://core.telegram.org/bots/api#businessbotrights type BusinessBotRights struct { // CanReply Optional. True, if the bot can send and edit messages in the private chats that had incoming // messages in the last 24 hours CanReply *bool `json:"can_reply,omitempty"` // CanReadMessages Optional. True, if the bot can mark incoming private messages as read CanReadMessages *bool `json:"can_read_messages,omitempty"` // CanDeleteSentMessages Optional. True, if the bot can delete messages sent by the bot CanDeleteSentMessages *bool `json:"can_delete_sent_messages,omitempty"` // CanDeleteAllMessages Optional. True, if the bot can delete all private messages in managed chats CanDeleteAllMessages *bool `json:"can_delete_all_messages,omitempty"` // CanEditName Optional. True, if the bot can edit the first and last name of the business account CanEditName *bool `json:"can_edit_name,omitempty"` // CanEditBio Optional. True, if the bot can edit the bio of the business account CanEditBio *bool `json:"can_edit_bio,omitempty"` // CanEditProfilePhoto Optional. True, if the bot can edit the profile photo of the business account CanEditProfilePhoto *bool `json:"can_edit_profile_photo,omitempty"` // CanEditUsername Optional. True, if the bot can edit the username of the business account CanEditUsername *bool `json:"can_edit_username,omitempty"` // CanChangeGiftSettings Optional. True, if the bot can change the privacy settings pertaining to gifts for // the business account CanChangeGiftSettings *bool `json:"can_change_gift_settings,omitempty"` // CanViewGiftsAndStars Optional. True, if the bot can view gifts and the amount of Telegram Stars owned by // the business account CanViewGiftsAndStars *bool `json:"can_view_gifts_and_stars,omitempty"` // CanConvertGiftsToStars Optional. True, if the bot can convert regular gifts owned by the business account // to Telegram Stars CanConvertGiftsToStars *bool `json:"can_convert_gifts_to_stars,omitempty"` // CanTransferAndUpgradeGifts Optional. True, if the bot can transfer and upgrade gifts owned by the // business account CanTransferAndUpgradeGifts *bool `json:"can_transfer_and_upgrade_gifts,omitempty"` // CanTransferStars Optional. True, if the bot can transfer Telegram Stars received by the business account // to its own account, or use them to upgrade and transfer gifts CanTransferStars *bool `json:"can_transfer_stars,omitempty"` // CanManageStories Optional. True, if the bot can post, edit and delete stories on behalf of the business // account CanManageStories *bool `json:"can_manage_stories,omitempty"` } // BusinessConnection contains information about a business connection. // Since: Bot API 7.2 // See https://core.telegram.org/bots/api#businessconnection type BusinessConnection struct { // ID Unique identifier of the business connection ID string `json:"id"` // User Business account user that created the business connection User User `json:"user"` // UserChatID Identifier of a private chat with the user who created the business connection. This number // may have more than 32 significant bits and some programming languages may have difficulty/silent defects // in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float // type are safe for storing this identifier. UserChatID int64 `json:"user_chat_id"` // Date Date the connection was established in Unix time Date int `json:"date"` // Rights Optional. Rights of the business bot Rights *BusinessBotRights `json:"rights,omitempty"` // IsEnabled True, if the connection is active IsEnabled bool `json:"is_enabled"` } // BusinessMessagesDeleted is received when messages are deleted from a connected business account. // Since: Bot API 7.2 // See https://core.telegram.org/bots/api#businessmessagesdeleted type BusinessMessagesDeleted struct { // BusinessConnectionID Unique identifier of the business connection BusinessConnectionID string `json:"business_connection_id"` // Chat Information about a chat in the business account. The bot may not have access to the chat or the // corresponding user. Chat Chat `json:"chat"` // MessageIDs The list of identifiers of deleted messages in the chat of the business account MessageIDs []int `json:"message_ids"` } // InputStoryContentType indicates the type of input story content. type InputStoryContentType string const ( // InputStoryContentPhotoType identifies photo story content. InputStoryContentPhotoType InputStoryContentType = "photo" // InputStoryContentVideoType identifies video story content. InputStoryContentVideoType InputStoryContentType = "video" ) // InputStoryContent represents the content of a story to be posted. // Since: Bot API 9.0 // See https://core.telegram.org/bots/api#inputstorycontent type InputStoryContent struct { // Type identifies the photo or video story-content variant. Type InputStoryContentType `json:"type"` // Photo fields Photo *string `json:"photo,omitempty"` // Video fields Video *string `json:"video,omitempty"` // Duration Optional. Precise duration of the video in seconds; 0-60 Duration *float64 `json:"duration,omitempty"` // CoverFrameTimestamp Optional. Timestamp in seconds of the frame that will be used as the static cover for // the story. Defaults to 0.0. CoverFrameTimestamp *float64 `json:"cover_frame_timestamp,omitempty"` // IsAnimation Optional. Pass True if the video has no sound IsAnimation *bool `json:"is_animation,omitempty"` } // StoryAreaPosition describes the position of a clickable area on a story. // Since: Bot API 9.0 // See https://core.telegram.org/bots/api#storyareaposition type StoryAreaPosition struct { // XPercentage The abscissa of the area's center, as a percentage of the media width XPercentage float64 `json:"x_percentage"` // YPercentage The ordinate of the area's center, as a percentage of the media height YPercentage float64 `json:"y_percentage"` // WidthPercentage The width of the area's rectangle, as a percentage of the media width WidthPercentage float64 `json:"width_percentage"` // HeightPercentage The height of the area's rectangle, as a percentage of the media height HeightPercentage float64 `json:"height_percentage"` // RotationAngle The clockwise rotation angle of the rectangle, in degrees; 0-360 RotationAngle float64 `json:"rotation_angle"` // CornerRadiusPercentage The radius of the rectangle corner rounding, as a percentage of the media width CornerRadiusPercentage float64 `json:"corner_radius_percentage"` } // StoryAreaTypeType indicates the type of story area. type StoryAreaTypeType string const ( // StoryAreaTypeLocationType identifies a location story area. StoryAreaTypeLocationType StoryAreaTypeType = "location" // StoryAreaTypeReactionType identifies a suggested reaction story area. StoryAreaTypeReactionType StoryAreaTypeType = "suggested_reaction" // StoryAreaTypeLinkType identifies a link story area. StoryAreaTypeLinkType StoryAreaTypeType = "link" // StoryAreaTypeWeatherType identifies a weather story area. StoryAreaTypeWeatherType StoryAreaTypeType = "weather" // StoryAreaTypeUniqueGiftType identifies a unique gift story area. StoryAreaTypeUniqueGiftType StoryAreaTypeType = "unique_gift" ) // StoryAreaType describes the type of a clickable area on a story. // Since: Bot API 9.0 // See https://core.telegram.org/bots/api#storyareatype type StoryAreaType struct { // Type identifies the concrete story-area variant. Type StoryAreaTypeType `json:"type"` // Latitude Location latitude in degrees // Location Latitude *float64 `json:"latitude,omitempty"` // Longitude Location longitude in degrees Longitude *float64 `json:"longitude,omitempty"` // Address Optional. Address of the location Address *LocationAddress `json:"address,omitempty"` // ReactionType Type of the reaction // Suggested reaction ReactionType *ReactionType `json:"reaction_type,omitempty"` // IsDark Optional. Pass True if the reaction area has a dark background IsDark *bool `json:"is_dark,omitempty"` // IsFlipped Optional. Pass True if reaction area corner is flipped IsFlipped *bool `json:"is_flipped,omitempty"` // URL HTTP or tg:// URL to be opened when the area is clicked // Link URL *string `json:"url,omitempty"` // Temperature Temperature, in degree Celsius // Weather Temperature *float64 `json:"temperature,omitempty"` // Emoji Emoji representing the weather Emoji *string `json:"emoji,omitempty"` // BackgroundColor A color of the area background in the ARGB format BackgroundColor *int `json:"background_color,omitempty"` // Name Unique name of the gift // Unique gift Name *string `json:"name,omitempty"` } // StoryArea represents a clickable area on a story. // Since: Bot API 9.0 // See https://core.telegram.org/bots/api#storyarea type StoryArea struct { // Position Position of the area Position StoryAreaPosition `json:"position"` // Type Type of the area Type StoryAreaType `json:"type"` }