From 3e0036f7df0aa37e3ac8f819a0b2eb5f4113921e Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sun, 13 Apr 2025 09:05:08 +0600 Subject: [PATCH 01/36] start 25.0.0 --- CHANGELOG.md | 2 ++ gradle.properties | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 608aa050e9..078ebab0c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # TelegramBotAPI changelog +## 25.0.0 + ## 24.0.2 * `Version`: diff --git a/gradle.properties b/gradle.properties index b70c3b85aa..f76aa4a978 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,4 +6,4 @@ kotlin.incremental=true kotlin.incremental.js=true library_group=dev.inmo -library_version=24.0.2 +library_version=25.0.0 From fd48a5226632051bee6be546244f1ffbc4d4ea83 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sun, 13 Apr 2025 09:28:41 +0600 Subject: [PATCH 02/36] add BusinessBotRights --- .../kotlin/dev/inmo/tgbotapi/types/Common.kt | 13 +++++ .../business_connection/BusinessBotRights.kt | 50 +++++++++++++++++++ .../business_connection/BusinessConnection.kt | 10 ++-- .../RawBusinessConnection.kt | 10 ++-- 4 files changed, 74 insertions(+), 9 deletions(-) create mode 100644 tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/business_connection/BusinessBotRights.kt diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt index a91b4510fe..6e2795035f 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt @@ -186,6 +186,19 @@ const val hasMainWebAppField = "has_main_web_app" const val canJoinGroupsField = "can_join_groups" const val canReadAllGroupMessagesField = "can_read_all_group_messages" const val canReplyField = "can_reply" +const val canReadMessagesField = "can_read_messages" +const val canDeleteOutgoingMessagesField = "can_delete_outgoing_messages" +const val canDeleteAllMessagesField = "can_delete_all_messages" +const val canEditNameField = "can_edit_name" +const val canEditBioField = "can_edit_bio" +const val canEditProfilePhotoField = "can_edit_profile_photo" +const val canEditUsernameField = "can_edit_username" +const val canChangeGiftSettingsField = "can_change_gift_settings" +const val canViewGiftsAndStarsField = "can_view_gifts_and_stars" +const val canConvertGiftsToStarsField = "can_convert_gifts_to_stars" +const val canTransferAndUpgradeGiftsField = "can_transfer_and_upgrade_gifts" +const val canTransferStarsField = "can_transfer_stars" +const val canManageStoriesField = "can_manage_stories" const val supportInlineQueriesField = "supports_inline_queries" const val canConnectToBusinessField = "can_connect_to_business" const val textEntitiesField = "text_entities" diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/business_connection/BusinessBotRights.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/business_connection/BusinessBotRights.kt new file mode 100644 index 0000000000..5bdde3368f --- /dev/null +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/business_connection/BusinessBotRights.kt @@ -0,0 +1,50 @@ +package dev.inmo.tgbotapi.types.business_connection + +import dev.inmo.tgbotapi.types.canChangeGiftSettingsField +import dev.inmo.tgbotapi.types.canConvertGiftsToStarsField +import dev.inmo.tgbotapi.types.canDeleteAllMessagesField +import dev.inmo.tgbotapi.types.canDeleteOutgoingMessagesField +import dev.inmo.tgbotapi.types.canEditBioField +import dev.inmo.tgbotapi.types.canEditNameField +import dev.inmo.tgbotapi.types.canEditProfilePhotoField +import dev.inmo.tgbotapi.types.canEditUsernameField +import dev.inmo.tgbotapi.types.canManageStoriesField +import dev.inmo.tgbotapi.types.canReadMessagesField +import dev.inmo.tgbotapi.types.canReplyField +import dev.inmo.tgbotapi.types.canTransferAndUpgradeGiftsField +import dev.inmo.tgbotapi.types.canTransferStarsField +import dev.inmo.tgbotapi.types.canViewGiftsAndStarsField +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable + +@Serializable +data class BusinessBotRights( + @SerialName(canReplyField) + val canReply: Boolean = false, + @SerialName(canReadMessagesField) + val canMarkMessagesAsRead: Boolean = false, + @SerialName(canDeleteOutgoingMessagesField) + val canDeleteOutgoingMessages: Boolean = false, + @SerialName(canDeleteAllMessagesField) + val canDeleteAllMessages: Boolean = false, + @SerialName(canEditNameField) + val canEditName: Boolean = false, + @SerialName(canEditBioField) + val canEditBio: Boolean = false, + @SerialName(canEditProfilePhotoField) + val canEditProfilePhoto: Boolean = false, + @SerialName(canEditUsernameField) + val canEditUsername: Boolean = false, + @SerialName(canChangeGiftSettingsField) + val canChangeGiftSettings: Boolean = false, + @SerialName(canViewGiftsAndStarsField) + val canViewGiftsAndStars: Boolean = false, + @SerialName(canConvertGiftsToStarsField) + val canConvertGiftsToStars: Boolean = false, + @SerialName(canTransferAndUpgradeGiftsField) + val canTransferAndUpgradeGifts: Boolean = false, + @SerialName(canTransferStarsField) + val canTransferStars: Boolean = false, + @SerialName(canManageStoriesField) + val canManageStories: Boolean = false, +) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/business_connection/BusinessConnection.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/business_connection/BusinessConnection.kt index 6701bd1b25..e6226828e2 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/business_connection/BusinessConnection.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/business_connection/BusinessConnection.kt @@ -16,7 +16,9 @@ sealed interface BusinessConnection : WithBusinessConnectionId { val user: PreviewUser val userChatId: ChatId val date: TelegramDate + val rights: BusinessBotRights val canReply: Boolean + get() = rights.canReply val isEnabled: Boolean override val businessConnectionId: BusinessConnectionId @@ -32,8 +34,8 @@ sealed interface BusinessConnection : WithBusinessConnectionId { override val userChatId: ChatId, @SerialName(dateField) override val date: TelegramDate, - @SerialName(canReplyField) - override val canReply: Boolean, + @SerialName(rightsField) + override val rights: BusinessBotRights = BusinessBotRights(), ) : BusinessConnection { @EncodeDefault override val isEnabled: Boolean = true @@ -49,8 +51,8 @@ sealed interface BusinessConnection : WithBusinessConnectionId { override val userChatId: ChatId, @SerialName(dateField) override val date: TelegramDate, - @SerialName(canReplyField) - override val canReply: Boolean, + @SerialName(rightsField) + override val rights: BusinessBotRights = BusinessBotRights(), ) : BusinessConnection { @EncodeDefault override val isEnabled: Boolean = false diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/business_connection/RawBusinessConnection.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/business_connection/RawBusinessConnection.kt index f90c682fd0..b9e9f35c2e 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/business_connection/RawBusinessConnection.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/business_connection/RawBusinessConnection.kt @@ -15,8 +15,8 @@ internal data class RawBusinessConnection( val userChatId: ChatId, @SerialName(dateField) val date: TelegramDate, - @SerialName(canReplyField) - val canReply: Boolean, + @SerialName(rightsField) + val rights: BusinessBotRights = BusinessBotRights(), @SerialName(isEnabledField) val isEnabled: Boolean ) { @@ -27,14 +27,14 @@ internal data class RawBusinessConnection( user = user, userChatId = userChatId, date = date, - canReply = canReply + rights = rights ) false -> BusinessConnection.Disabled( id = id, user = user, userChatId = userChatId, date = date, - canReply = canReply + rights = rights ) } @@ -43,7 +43,7 @@ internal data class RawBusinessConnection( user = businessConnection.user, userChatId = businessConnection.userChatId, date = businessConnection.date, - canReply = businessConnection.canReply, + rights = businessConnection.rights, isEnabled = businessConnection.isEnabled, ) } From a3949c752d98d942059b11e11b01625b7d2ac3f9 Mon Sep 17 00:00:00 2001 From: "bpavuk (aider)" <75901693+bpavuk@users.noreply.github.com> Date: Sun, 13 Apr 2025 13:53:23 +0300 Subject: [PATCH 03/36] feat: Add UniqueGiftSymbol data type --- .gitignore | 1 + gradle/wrapper/gradle-wrapper.properties | 2 +- .../kotlin/dev/inmo/tgbotapi/types/Common.kt | 2 ++ .../inmo/tgbotapi/types/UniqueGiftSymbol.kt | 22 +++++++++++++++++++ 4 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UniqueGiftSymbol.kt diff --git a/.gitignore b/.gitignore index d344e95940..72f7a6bb59 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ out/ local.properties kotlin-js-store/ secret.gradle +.aider* diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 32949f9ccb..e6045a9835 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt index a91b4510fe..ca073999f0 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt @@ -5,6 +5,7 @@ import dev.inmo.tgbotapi.utils.BuiltinMimeTypes import kotlinx.serialization.Serializable import kotlin.jvm.JvmInline + typealias ForwardSignature = String typealias ForwardSenderName = String typealias AuthorSignature = ForwardSignature @@ -494,6 +495,7 @@ const val subscriptionPriceField = "subscription_price" const val copyTextField = "copy_text" const val giftField = "gift" const val giftsField = "gifts" +const val rarityPerMilleField = "rarity_per_mille" const val pointField = "point" const val xShiftField = "x_shift" diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UniqueGiftSymbol.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UniqueGiftSymbol.kt new file mode 100644 index 0000000000..9f267ee1fb --- /dev/null +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UniqueGiftSymbol.kt @@ -0,0 +1,22 @@ +package dev.inmo.tgbotapi.types + +import dev.inmo.tgbotapi.types.files.Sticker +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable + +/** + * This object describes the symbol shown on the pattern of a unique gift. + * + * @param name Name of the symbol + * @param sticker The sticker that represents the unique gift + * @param rarityPerMille The number of unique gifts that receive this model for every 1000 gifts upgraded + */ +@Serializable +data class UniqueGiftSymbol( + @SerialName(nameField) + val name: String, + @SerialName(stickerField) + val sticker: Sticker, + @SerialName(rarityPerMilleField) + val rarityPerMille: Int +) From 99559f477e17fb4338fd130af66f61a29fed1435 Mon Sep 17 00:00:00 2001 From: "bpavuk (aider)" <75901693+bpavuk@users.noreply.github.com> Date: Sun, 13 Apr 2025 14:25:02 +0300 Subject: [PATCH 04/36] feat: Add UniqueGiftModel type --- .../inmo/tgbotapi/types/UniqueGiftModel.kt | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UniqueGiftModel.kt diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UniqueGiftModel.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UniqueGiftModel.kt new file mode 100644 index 0000000000..ed0d9f26e0 --- /dev/null +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UniqueGiftModel.kt @@ -0,0 +1,22 @@ +package dev.inmo.tgbotapi.types + +import dev.inmo.tgbotapi.types.files.Sticker +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable + +/** + * This object describes the model of a unique gift. + * + * @param name Name of the model + * @param sticker The sticker that represents the unique gift + * @param rarityPerMille The number of unique gifts that receive this model for every 1000 gifts upgraded + */ +@Serializable +data class UniqueGiftModel( + @SerialName(nameField) + val name: String, + @SerialName(stickerField) + val sticker: Sticker, + @SerialName(rarityPerMilleField) + val rarityPerMille: Int +) From cd3ba8f480c983286afe7e12356cf678bfc240fd Mon Sep 17 00:00:00 2001 From: "bpavuk (aider)" <75901693+bpavuk@users.noreply.github.com> Date: Sun, 13 Apr 2025 14:26:55 +0300 Subject: [PATCH 05/36] feat: Add UniqueGiftBackdropColors data class --- .../kotlin/dev/inmo/tgbotapi/types/Common.kt | 5 ++++ .../types/UniqueGiftBackdropColors.kt | 24 +++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UniqueGiftBackdropColors.kt diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt index ca073999f0..9b85df9481 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt @@ -666,6 +666,11 @@ const val upgradeStarCountField = "upgrade_star_count" const val payToUpgradeField = "pay_for_upgrade" const val paidMediaField = "paid_media" +const val centerColorField = "center_color" +const val edgeColorField = "edge_color" +const val symbolColorField = "symbol_color" +const val textColorField = "text_color" + const val businessConnectionIdField = "business_connection_id" const val businessIntroField = "business_intro" const val businessLocationField = "business_location" diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UniqueGiftBackdropColors.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UniqueGiftBackdropColors.kt new file mode 100644 index 0000000000..49a30d98ad --- /dev/null +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UniqueGiftBackdropColors.kt @@ -0,0 +1,24 @@ +package dev.inmo.tgbotapi.types + +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable + +/** + * This object describes the colors of the backdrop of a unique gift. + * + * @param centerColor The color in the center of the backdrop in RGB format + * @param edgeColor The color on the edges of the backdrop in RGB format + * @param symbolColor The color to be applied to the symbol in RGB format + * @param textColor The color for the text on the backdrop in RGB format + */ +@Serializable +data class UniqueGiftBackdropColors( + @SerialName(centerColorField) + val centerColor: Int, + @SerialName(edgeColorField) + val edgeColor: Int, + @SerialName(symbolColorField) + val symbolColor: Int, + @SerialName(textColorField) + val textColor: Int +) From 4c9d888668f7057874fa8c9715a9e627afc0966d Mon Sep 17 00:00:00 2001 From: "bpavuk (aider)" <75901693+bpavuk@users.noreply.github.com> Date: Sun, 13 Apr 2025 14:32:30 +0300 Subject: [PATCH 06/36] feat: Add UniqueGiftBackdrop type --- .../inmo/tgbotapi/types/UniqueGiftBackdrop.kt | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UniqueGiftBackdrop.kt diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UniqueGiftBackdrop.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UniqueGiftBackdrop.kt new file mode 100644 index 0000000000..35259a1f45 --- /dev/null +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UniqueGiftBackdrop.kt @@ -0,0 +1,21 @@ +package dev.inmo.tgbotapi.types + +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable + +/** + * This object describes the backdrop of a unique gift. + * + * @param name Name of the backdrop + * @param colors Colors of the backdrop + * @param rarityPerMille The number of unique gifts that receive this backdrop for every 1000 gifts upgraded + */ +@Serializable +data class UniqueGiftBackdrop( + @SerialName(nameField) + val name: String, + @SerialName(colorsField) + val colors: UniqueGiftBackdropColors, + @SerialName(rarityPerMilleField) + val rarityPerMille: Int +) From 2ac83156f6031fe54243feed5cb589d976d59800 Mon Sep 17 00:00:00 2001 From: "bpavuk (aider)" <75901693+bpavuk@users.noreply.github.com> Date: Sun, 13 Apr 2025 14:35:37 +0300 Subject: [PATCH 07/36] feat: Add UniqueGift type with related fields and constants --- .../kotlin/dev/inmo/tgbotapi/types/Common.kt | 6 ++++ .../dev/inmo/tgbotapi/types/UniqueGift.kt | 30 +++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UniqueGift.kt diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt index 9b85df9481..18fb2a67a7 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt @@ -671,6 +671,12 @@ const val edgeColorField = "edge_color" const val symbolColorField = "symbol_color" const val textColorField = "text_color" +const val baseNameField = "base_name" +const val numberField = "number" +const val modelField = "model" +const val symbolField = "symbol" +const val backdropField = "backdrop" + const val businessConnectionIdField = "business_connection_id" const val businessIntroField = "business_intro" const val businessLocationField = "business_location" diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UniqueGift.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UniqueGift.kt new file mode 100644 index 0000000000..1a65ff2813 --- /dev/null +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UniqueGift.kt @@ -0,0 +1,30 @@ +package dev.inmo.tgbotapi.types + +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable + +/** + * This object describes a unique gift that was upgraded from a regular gift. + * + * @param baseName Human-readable name of the regular gift from which this unique gift was upgraded + * @param name Unique name of the gift. This name can be used in `https://t.me/nft/...` links and story areas + * @param number Unique number of the upgraded gift among gifts upgraded from the same regular gift + * @param model Model of the gift + * @param symbol Symbol of the gift + * @param backdrop Backdrop of the gift + */ +@Serializable +data class UniqueGift( + @SerialName(baseNameField) + val baseName: String, + @SerialName(nameField) + val name: String, + @SerialName(numberField) + val number: Int, + @SerialName(modelField) + val model: UniqueGiftModel, + @SerialName(symbolField) + val symbol: UniqueGiftSymbol, + @SerialName(backdropField) + val backdrop: UniqueGiftBackdrop +) From ef60549e1c10d230b5657b229c6099e4912b3797 Mon Sep 17 00:00:00 2001 From: "bpavuk (aider)" <75901693+bpavuk@users.noreply.github.com> Date: Sun, 13 Apr 2025 14:38:25 +0300 Subject: [PATCH 08/36] feat: Add AcceptedGiftTypes data class and related constants --- .../inmo/tgbotapi/types/AcceptedGiftTypes.kt | 24 +++++++++++++++++++ .../kotlin/dev/inmo/tgbotapi/types/Common.kt | 5 ++++ 2 files changed, 29 insertions(+) create mode 100644 tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/AcceptedGiftTypes.kt diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/AcceptedGiftTypes.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/AcceptedGiftTypes.kt new file mode 100644 index 0000000000..d2c94d67fe --- /dev/null +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/AcceptedGiftTypes.kt @@ -0,0 +1,24 @@ +package dev.inmo.tgbotapi.types + +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable + +/** + * This object describes the types of gifts that can be gifted to a user or a chat. + * + * @param unlimitedGifts True, if unlimited regular gifts are accepted + * @param limitedGifts True, if limited regular gifts are accepted + * @param uniqueGifts True, if unique gifts or gifts that can be upgraded to unique for free are accepted + * @param premiumSubscription True, if a Telegram Premium subscription is accepted + */ +@Serializable +data class AcceptedGiftTypes( + @SerialName(unlimitedGiftsField) + val unlimitedGifts: Boolean, + @SerialName(limitedGiftsField) + val limitedGifts: Boolean, + @SerialName(uniqueGiftsField) + val uniqueGifts: Boolean, + @SerialName(premiumSubscriptionField) + val premiumSubscription: Boolean +) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt index 18fb2a67a7..5f17610e37 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt @@ -677,6 +677,11 @@ const val modelField = "model" const val symbolField = "symbol" const val backdropField = "backdrop" +const val unlimitedGiftsField = "unlimited_gifts" +const val limitedGiftsField = "limited_gifts" +const val uniqueGiftsField = "unique_gifts" +const val premiumSubscriptionField = "premium_subscription" + const val businessConnectionIdField = "business_connection_id" const val businessIntroField = "business_intro" const val businessLocationField = "business_location" From 93d0e009bbf3c4090191d52f1366263e0429aa5c Mon Sep 17 00:00:00 2001 From: bpavuk <75901693+bpavuk@users.noreply.github.com> Date: Sun, 13 Apr 2025 15:49:05 +0300 Subject: [PATCH 09/36] feat: replaced `canReceiveGifts` with `acceptedGiftTypes` and `AcceptedGiftTypes` class --- .../dev/inmo/tgbotapi/types/chat/Extended.kt | 33 +++++++++++-------- .../tgbotapi/types/chat/ExtendedAbstracts.kt | 5 +-- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/Extended.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/Extended.kt index fe3e1e760e..723f6acb44 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/Extended.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/Extended.kt @@ -58,8 +58,8 @@ data class ExtendedChannelChatImpl( override val newMembersSeeHistory: Boolean = false, @SerialName(maxReactionCountField) override val maxReactionsCount: Int = 3, - @SerialName(canSendGiftsField) - override val canReceiveGifts: Boolean = false, + @SerialName(acceptedGiftTypesField) + override val acceptedGiftTypes: AcceptedGiftTypes, ) : ExtendedChannelChat @Serializable @@ -100,8 +100,8 @@ data class ExtendedGroupChatImpl( override val newMembersSeeHistory: Boolean = false, @SerialName(maxReactionCountField) override val maxReactionsCount: Int = 3, - @SerialName(canSendGiftsField) - override val canReceiveGifts: Boolean = false, + @SerialName(acceptedGiftTypesField) + override val acceptedGiftTypes: AcceptedGiftTypes, ) : ExtendedGroupChat @Serializable @@ -150,8 +150,8 @@ data class ExtendedPrivateChatImpl( override val personalChat: PreviewChannelChat? = null, @SerialName(maxReactionCountField) override val maxReactionsCount: Int = 3, - @SerialName(canSendGiftsField) - override val canReceiveGifts: Boolean = false, + @SerialName(acceptedGiftTypesField) + override val acceptedGiftTypes: AcceptedGiftTypes, ) : ExtendedPrivateChat typealias ExtendedUser = ExtendedPrivateChatImpl @@ -218,8 +218,8 @@ data class ExtendedSupergroupChatImpl( override val customEmojiStickerSetName: StickerSetName? = null, @SerialName(maxReactionCountField) override val maxReactionsCount: Int = 3, - @SerialName(canSendGiftsField) - override val canReceiveGifts: Boolean = false, + @SerialName(acceptedGiftTypesField) + override val acceptedGiftTypes: AcceptedGiftTypes, ) : ExtendedSupergroupChat @Serializable @@ -284,8 +284,8 @@ data class ExtendedForumChatImpl( override val customEmojiStickerSetName: StickerSetName? = null, @SerialName(maxReactionCountField) override val maxReactionsCount: Int = 3, - @SerialName(canSendGiftsField) - override val canReceiveGifts: Boolean = false, + @SerialName(acceptedGiftTypesField) + override val acceptedGiftTypes: AcceptedGiftTypes, ) : ExtendedForumChat @Serializable @@ -320,8 +320,8 @@ data class ExtendedBot( override val maxReactionsCount: Int = 3, @SerialName(hasMainWebAppField) val hasMainWebApp: Boolean = false, - @SerialName(canSendGiftsField) - override val canReceiveGifts: Boolean = false, + @SerialName(acceptedGiftTypesField) + override val acceptedGiftTypes: AcceptedGiftTypes, ) : Bot(), ExtendedChat { @SerialName(isBotField) private val isBot = true @@ -351,6 +351,11 @@ data class UnknownExtendedChat( override val profileBackgroundCustomEmojiId: CustomEmojiId? = null @SerialName(maxReactionCountField) override val maxReactionsCount: Int = 3 - @SerialName(canSendGiftsField) - override val canReceiveGifts: Boolean = false + @SerialName(acceptedGiftTypesField) + override val acceptedGiftTypes: AcceptedGiftTypes = AcceptedGiftTypes( + unlimitedGifts = false, + limitedGifts = false, + uniqueGifts = false, + premiumSubscription = false + ) } diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/ExtendedAbstracts.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/ExtendedAbstracts.kt index a66675f745..4b8374914c 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/ExtendedAbstracts.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/ExtendedAbstracts.kt @@ -20,10 +20,7 @@ sealed interface ExtendedChat : Chat { val profileBackgroundCustomEmojiId: CustomEmojiId? val maxReactionsCount: Int - /** - * Represent `can_send_gifts` field - */ - val canReceiveGifts: Boolean + val acceptedGiftTypes: AcceptedGiftTypes } @Serializable(ExtendedChatSerializer.Companion::class) From 9f3024476cc5f44b0df37714908207e8c5173e5d Mon Sep 17 00:00:00 2001 From: bpavuk <75901693+bpavuk@users.noreply.github.com> Date: Sun, 13 Apr 2025 15:49:19 +0300 Subject: [PATCH 10/36] feat: implemented GiftInfo class --- .../kotlin/dev/inmo/tgbotapi/types/Common.kt | 7 +++++ .../dev/inmo/tgbotapi/types/gifts/GiftInfo.kt | 26 +++++++++++++++++++ .../inmo/tgbotapi/types/message/RawMessage.kt | 4 +++ 3 files changed, 37 insertions(+) create mode 100644 tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/GiftInfo.kt diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt index 5f17610e37..71c89d90e6 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt @@ -493,9 +493,16 @@ const val creatorField = "creator" const val subscriptionPeriodField = "subscription_period" const val subscriptionPriceField = "subscription_price" const val copyTextField = "copy_text" + const val giftField = "gift" const val giftsField = "gifts" const val rarityPerMilleField = "rarity_per_mille" +const val acceptedGiftTypesField = "accepted_gift_types" +const val ownedGiftIdField = "owned_gift_id" +const val convertStarCountField = "convert_star_count" +const val prepaidUpgradeStarCountField = "prepaid_upgrade_star_count" +const val canBeUpgradedField = "can_be_upgraded" +const val isPrivateField = "is_private" const val pointField = "point" const val xShiftField = "x_shift" diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/GiftInfo.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/GiftInfo.kt new file mode 100644 index 0000000000..d85df96526 --- /dev/null +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/GiftInfo.kt @@ -0,0 +1,26 @@ +package dev.inmo.tgbotapi.types.gifts + +import dev.inmo.tgbotapi.types.* +import dev.inmo.tgbotapi.types.message.RawMessageEntities +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable + +@Serializable +data class GiftInfo private constructor( + @SerialName(giftField) + val gift: Gift, + @SerialName(ownedGiftIdField) + val ownedGiftId: GiftId? = null, + @SerialName(convertStarCountField) + val convertStarCount: Int? = null, + @SerialName(prepaidUpgradeStarCountField) + val prepaidUpgradeStarCount: Int? = null, + @SerialName(canBeUpgradedField) + val canBeUpgraded: Boolean = false, + @SerialName(textField) + val text: String? = null, + @SerialName(entitiesField) + val entities: RawMessageEntities, + @SerialName(isPrivateField) + val isPrivate: Boolean = false +) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/RawMessage.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/RawMessage.kt index 2fa2995bc8..ec99fdcb25 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/RawMessage.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/RawMessage.kt @@ -10,6 +10,7 @@ import dev.inmo.tgbotapi.types.dice.Dice import dev.inmo.tgbotapi.types.files.* import dev.inmo.tgbotapi.types.files.Sticker import dev.inmo.tgbotapi.types.games.RawGame +import dev.inmo.tgbotapi.types.gifts.GiftInfo import dev.inmo.tgbotapi.types.giveaway.* import dev.inmo.tgbotapi.types.message.content.GiveawayContent import dev.inmo.tgbotapi.types.location.Location @@ -160,6 +161,9 @@ internal data class RawMessage( private val giveaway: Giveaway? = null, private val giveaway_winners: GiveawayPublicResults? = null, private val giveaway_completed: GiveawayPrivateResults? = null, + + // Gifts + private val gift: GiftInfo? = null ) { private val checkedFrom = from ?.takeIf { !it.isFakeTelegramUser() } private val content: MessageContent? by lazy { From 46a1ed27b7151dc2e278821ebdd133b507a17cff Mon Sep 17 00:00:00 2001 From: bpavuk <75901693+bpavuk@users.noreply.github.com> Date: Sun, 13 Apr 2025 15:58:36 +0300 Subject: [PATCH 11/36] feat: implemented UniqueGiftInfo class --- .../kotlin/dev/inmo/tgbotapi/types/Common.kt | 1 + .../inmo/tgbotapi/types/gifts/UniqueGiftInfo.kt | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftInfo.kt diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt index 71c89d90e6..029644ea93 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt @@ -503,6 +503,7 @@ const val convertStarCountField = "convert_star_count" const val prepaidUpgradeStarCountField = "prepaid_upgrade_star_count" const val canBeUpgradedField = "can_be_upgraded" const val isPrivateField = "is_private" +const val transferStarCountField = "transfer_star_count" const val pointField = "point" const val xShiftField = "x_shift" diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftInfo.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftInfo.kt new file mode 100644 index 0000000000..c76918b0a5 --- /dev/null +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftInfo.kt @@ -0,0 +1,17 @@ +package dev.inmo.tgbotapi.types.gifts + +import dev.inmo.tgbotapi.types.* +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable + +@Serializable +data class UniqueGiftInfo private constructor( + @SerialName(giftField) + val gift: UniqueGift, + @SerialName(originField) + val origin: String? = null, + @SerialName(ownedGiftIdField) + val ownedGiftId: GiftId? = null, + @SerialName(transferStarCountField) + val transferStarCount: Int? = null +) From 648535370429b0e04767b5f8d6da41e6e5d5ff41 Mon Sep 17 00:00:00 2001 From: bpavuk <75901693+bpavuk@users.noreply.github.com> Date: Sun, 13 Apr 2025 15:58:36 +0300 Subject: [PATCH 12/36] fix: UniqueGiftInfo constructor is now public --- .../kotlin/dev/inmo/tgbotapi/types/Common.kt | 1 + .../inmo/tgbotapi/types/gifts/UniqueGiftInfo.kt | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftInfo.kt diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt index 71c89d90e6..029644ea93 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt @@ -503,6 +503,7 @@ const val convertStarCountField = "convert_star_count" const val prepaidUpgradeStarCountField = "prepaid_upgrade_star_count" const val canBeUpgradedField = "can_be_upgraded" const val isPrivateField = "is_private" +const val transferStarCountField = "transfer_star_count" const val pointField = "point" const val xShiftField = "x_shift" diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftInfo.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftInfo.kt new file mode 100644 index 0000000000..ae68159dd5 --- /dev/null +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftInfo.kt @@ -0,0 +1,17 @@ +package dev.inmo.tgbotapi.types.gifts + +import dev.inmo.tgbotapi.types.* +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable + +@Serializable +data class UniqueGiftInfo( + @SerialName(giftField) + val gift: UniqueGift, + @SerialName(originField) + val origin: String? = null, + @SerialName(ownedGiftIdField) + val ownedGiftId: GiftId? = null, + @SerialName(transferStarCountField) + val transferStarCount: Int? = null +) From 1bfe431393ca2be821bc79c745079c5de860ca0c Mon Sep 17 00:00:00 2001 From: bpavuk <75901693+bpavuk@users.noreply.github.com> Date: Sun, 13 Apr 2025 16:27:52 +0300 Subject: [PATCH 13/36] fix: added defaults to AcceptedGiftTypes --- .../kotlin/dev/inmo/tgbotapi/types/AcceptedGiftTypes.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/AcceptedGiftTypes.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/AcceptedGiftTypes.kt index d2c94d67fe..4fe17417d1 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/AcceptedGiftTypes.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/AcceptedGiftTypes.kt @@ -14,11 +14,11 @@ import kotlinx.serialization.Serializable @Serializable data class AcceptedGiftTypes( @SerialName(unlimitedGiftsField) - val unlimitedGifts: Boolean, + val unlimitedGifts: Boolean = true, @SerialName(limitedGiftsField) - val limitedGifts: Boolean, + val limitedGifts: Boolean = true, @SerialName(uniqueGiftsField) - val uniqueGifts: Boolean, + val uniqueGifts: Boolean = true, @SerialName(premiumSubscriptionField) - val premiumSubscription: Boolean + val premiumSubscription: Boolean = true ) From 3312b64564021b364489afcdfd4890b5b26783c3 Mon Sep 17 00:00:00 2001 From: bpavuk <75901693+bpavuk@users.noreply.github.com> Date: Sun, 13 Apr 2025 16:30:37 +0300 Subject: [PATCH 14/36] fix: added default AcceptedGiftTypes in Extended.kt --- .../dev/inmo/tgbotapi/types/chat/Extended.kt | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/Extended.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/Extended.kt index 723f6acb44..fdbf125fba 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/Extended.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/Extended.kt @@ -59,7 +59,7 @@ data class ExtendedChannelChatImpl( @SerialName(maxReactionCountField) override val maxReactionsCount: Int = 3, @SerialName(acceptedGiftTypesField) - override val acceptedGiftTypes: AcceptedGiftTypes, + override val acceptedGiftTypes: AcceptedGiftTypes = AcceptedGiftTypes(), ) : ExtendedChannelChat @Serializable @@ -101,7 +101,7 @@ data class ExtendedGroupChatImpl( @SerialName(maxReactionCountField) override val maxReactionsCount: Int = 3, @SerialName(acceptedGiftTypesField) - override val acceptedGiftTypes: AcceptedGiftTypes, + override val acceptedGiftTypes: AcceptedGiftTypes = AcceptedGiftTypes(), ) : ExtendedGroupChat @Serializable @@ -151,7 +151,7 @@ data class ExtendedPrivateChatImpl( @SerialName(maxReactionCountField) override val maxReactionsCount: Int = 3, @SerialName(acceptedGiftTypesField) - override val acceptedGiftTypes: AcceptedGiftTypes, + override val acceptedGiftTypes: AcceptedGiftTypes = AcceptedGiftTypes(), ) : ExtendedPrivateChat typealias ExtendedUser = ExtendedPrivateChatImpl @@ -219,7 +219,7 @@ data class ExtendedSupergroupChatImpl( @SerialName(maxReactionCountField) override val maxReactionsCount: Int = 3, @SerialName(acceptedGiftTypesField) - override val acceptedGiftTypes: AcceptedGiftTypes, + override val acceptedGiftTypes: AcceptedGiftTypes = AcceptedGiftTypes(), ) : ExtendedSupergroupChat @Serializable @@ -285,7 +285,7 @@ data class ExtendedForumChatImpl( @SerialName(maxReactionCountField) override val maxReactionsCount: Int = 3, @SerialName(acceptedGiftTypesField) - override val acceptedGiftTypes: AcceptedGiftTypes, + override val acceptedGiftTypes: AcceptedGiftTypes = AcceptedGiftTypes(), ) : ExtendedForumChat @Serializable @@ -321,7 +321,7 @@ data class ExtendedBot( @SerialName(hasMainWebAppField) val hasMainWebApp: Boolean = false, @SerialName(acceptedGiftTypesField) - override val acceptedGiftTypes: AcceptedGiftTypes, + override val acceptedGiftTypes: AcceptedGiftTypes = AcceptedGiftTypes(), ) : Bot(), ExtendedChat { @SerialName(isBotField) private val isBot = true @@ -352,10 +352,5 @@ data class UnknownExtendedChat( @SerialName(maxReactionCountField) override val maxReactionsCount: Int = 3 @SerialName(acceptedGiftTypesField) - override val acceptedGiftTypes: AcceptedGiftTypes = AcceptedGiftTypes( - unlimitedGifts = false, - limitedGifts = false, - uniqueGifts = false, - premiumSubscription = false - ) + override val acceptedGiftTypes: AcceptedGiftTypes = AcceptedGiftTypes() } From e720da708c819c6bc00fb35d36b3216fa0143baa Mon Sep 17 00:00:00 2001 From: bpavuk <75901693+bpavuk@users.noreply.github.com> Date: Sun, 13 Apr 2025 16:32:47 +0300 Subject: [PATCH 15/36] fix: moved AcceptedGiftTypes.kt to the appropriate package --- .../kotlin/dev/inmo/tgbotapi/types/chat/Extended.kt | 2 +- .../dev/inmo/tgbotapi/types/chat/ExtendedAbstracts.kt | 2 +- .../inmo/tgbotapi/types/{ => gifts}/AcceptedGiftTypes.kt | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) rename tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/{ => gifts}/AcceptedGiftTypes.kt (78%) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/Extended.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/Extended.kt index fdbf125fba..5278834c65 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/Extended.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/Extended.kt @@ -5,11 +5,11 @@ import dev.inmo.tgbotapi.types.business_connection.BusinessIntro import dev.inmo.tgbotapi.types.business_connection.BusinessLocation import dev.inmo.tgbotapi.types.business_connection.BusinessOpeningHours import dev.inmo.tgbotapi.types.colors.ColorId +import dev.inmo.tgbotapi.types.gifts.AcceptedGiftTypes import dev.inmo.tgbotapi.types.message.abstracts.Message import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializeOnlySerializer import dev.inmo.tgbotapi.types.reactions.Reaction import dev.inmo.tgbotapi.utils.RiskFeature -import korlibs.time.DateTime import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable import kotlinx.serialization.json.JsonObject diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/ExtendedAbstracts.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/ExtendedAbstracts.kt index 4b8374914c..3a362d8857 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/ExtendedAbstracts.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/ExtendedAbstracts.kt @@ -5,7 +5,7 @@ import dev.inmo.tgbotapi.types.business_connection.BusinessIntro import dev.inmo.tgbotapi.types.business_connection.BusinessLocation import dev.inmo.tgbotapi.types.business_connection.BusinessOpeningHours import dev.inmo.tgbotapi.types.colors.ColorId -import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage +import dev.inmo.tgbotapi.types.gifts.AcceptedGiftTypes import dev.inmo.tgbotapi.types.message.abstracts.Message import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializeOnlySerializer import dev.inmo.tgbotapi.types.reactions.Reaction diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/AcceptedGiftTypes.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes.kt similarity index 78% rename from tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/AcceptedGiftTypes.kt rename to tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes.kt index 4fe17417d1..6fa54f4477 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/AcceptedGiftTypes.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes.kt @@ -1,5 +1,9 @@ -package dev.inmo.tgbotapi.types +package dev.inmo.tgbotapi.types.gifts +import dev.inmo.tgbotapi.types.limitedGiftsField +import dev.inmo.tgbotapi.types.premiumSubscriptionField +import dev.inmo.tgbotapi.types.uniqueGiftsField +import dev.inmo.tgbotapi.types.unlimitedGiftsField import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable From 6fceee4199d69e3d2580104878745247c8b20a63 Mon Sep 17 00:00:00 2001 From: bpavuk <75901693+bpavuk@users.noreply.github.com> Date: Sun, 13 Apr 2025 16:33:31 +0300 Subject: [PATCH 16/36] fix: moved classes related to unique gifts to appropriate packages --- .../dev/inmo/tgbotapi/types/{ => gifts}/UniqueGift.kt | 3 ++- .../inmo/tgbotapi/types/{ => gifts}/UniqueGiftBackdrop.kt | 5 ++++- .../tgbotapi/types/{ => gifts}/UniqueGiftBackdropColors.kt | 6 +++++- .../dev/inmo/tgbotapi/types/{ => gifts}/UniqueGiftModel.kt | 5 ++++- .../dev/inmo/tgbotapi/types/{ => gifts}/UniqueGiftSymbol.kt | 5 ++++- 5 files changed, 19 insertions(+), 5 deletions(-) rename tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/{ => gifts}/UniqueGift.kt (93%) rename tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/{ => gifts}/UniqueGiftBackdrop.kt (76%) rename tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/{ => gifts}/UniqueGiftBackdropColors.kt (76%) rename tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/{ => gifts}/UniqueGiftModel.kt (77%) rename tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/{ => gifts}/UniqueGiftSymbol.kt (78%) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UniqueGift.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGift.kt similarity index 93% rename from tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UniqueGift.kt rename to tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGift.kt index 1a65ff2813..cf2e0dcf61 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UniqueGift.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGift.kt @@ -1,5 +1,6 @@ -package dev.inmo.tgbotapi.types +package dev.inmo.tgbotapi.types.gifts +import dev.inmo.tgbotapi.types.* import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UniqueGiftBackdrop.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftBackdrop.kt similarity index 76% rename from tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UniqueGiftBackdrop.kt rename to tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftBackdrop.kt index 35259a1f45..bbe5d01aeb 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UniqueGiftBackdrop.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftBackdrop.kt @@ -1,5 +1,8 @@ -package dev.inmo.tgbotapi.types +package dev.inmo.tgbotapi.types.gifts +import dev.inmo.tgbotapi.types.colorsField +import dev.inmo.tgbotapi.types.nameField +import dev.inmo.tgbotapi.types.rarityPerMilleField import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UniqueGiftBackdropColors.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftBackdropColors.kt similarity index 76% rename from tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UniqueGiftBackdropColors.kt rename to tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftBackdropColors.kt index 49a30d98ad..0b19dd1089 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UniqueGiftBackdropColors.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftBackdropColors.kt @@ -1,5 +1,9 @@ -package dev.inmo.tgbotapi.types +package dev.inmo.tgbotapi.types.gifts +import dev.inmo.tgbotapi.types.centerColorField +import dev.inmo.tgbotapi.types.edgeColorField +import dev.inmo.tgbotapi.types.symbolColorField +import dev.inmo.tgbotapi.types.textColorField import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UniqueGiftModel.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftModel.kt similarity index 77% rename from tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UniqueGiftModel.kt rename to tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftModel.kt index ed0d9f26e0..cc42a199c9 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UniqueGiftModel.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftModel.kt @@ -1,6 +1,9 @@ -package dev.inmo.tgbotapi.types +package dev.inmo.tgbotapi.types.gifts import dev.inmo.tgbotapi.types.files.Sticker +import dev.inmo.tgbotapi.types.nameField +import dev.inmo.tgbotapi.types.rarityPerMilleField +import dev.inmo.tgbotapi.types.stickerField import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UniqueGiftSymbol.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftSymbol.kt similarity index 78% rename from tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UniqueGiftSymbol.kt rename to tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftSymbol.kt index 9f267ee1fb..ee6796424b 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/UniqueGiftSymbol.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftSymbol.kt @@ -1,6 +1,9 @@ -package dev.inmo.tgbotapi.types +package dev.inmo.tgbotapi.types.gifts import dev.inmo.tgbotapi.types.files.Sticker +import dev.inmo.tgbotapi.types.nameField +import dev.inmo.tgbotapi.types.rarityPerMilleField +import dev.inmo.tgbotapi.types.stickerField import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable From 314c8d9ad1415e9aecfca708eb6166ea9e895a8a Mon Sep 17 00:00:00 2001 From: bpavuk <75901693+bpavuk@users.noreply.github.com> Date: Sun, 13 Apr 2025 16:34:41 +0300 Subject: [PATCH 17/36] fix: using RGBColor abstractions instead of raw Int values now. --- .../tgbotapi/types/gifts/UniqueGiftBackdropColors.kt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftBackdropColors.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftBackdropColors.kt index 0b19dd1089..94bbc57e9a 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftBackdropColors.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftBackdropColors.kt @@ -4,6 +4,7 @@ import dev.inmo.tgbotapi.types.centerColorField import dev.inmo.tgbotapi.types.edgeColorField import dev.inmo.tgbotapi.types.symbolColorField import dev.inmo.tgbotapi.types.textColorField +import dev.inmo.tgbotapi.utils.RGBColor import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @@ -18,11 +19,11 @@ import kotlinx.serialization.Serializable @Serializable data class UniqueGiftBackdropColors( @SerialName(centerColorField) - val centerColor: Int, + val centerColor: RGBColor, @SerialName(edgeColorField) - val edgeColor: Int, + val edgeColor: RGBColor, @SerialName(symbolColorField) - val symbolColor: Int, + val symbolColor: RGBColor, @SerialName(textColorField) - val textColor: Int + val textColor: RGBColor ) From 03ea8dfe7f209ee0bd183c91ab8a6d5308018cf0 Mon Sep 17 00:00:00 2001 From: bpavuk <75901693+bpavuk@users.noreply.github.com> Date: Sun, 13 Apr 2025 16:37:07 +0300 Subject: [PATCH 18/36] fix: removed useless docs --- .../inmo/tgbotapi/types/gifts/AcceptedGiftTypes.kt | 9 +-------- .../dev/inmo/tgbotapi/types/gifts/UniqueGift.kt | 11 +---------- .../inmo/tgbotapi/types/gifts/UniqueGiftBackdrop.kt | 8 +------- .../tgbotapi/types/gifts/UniqueGiftBackdropColors.kt | 9 +-------- .../dev/inmo/tgbotapi/types/gifts/UniqueGiftModel.kt | 8 +------- .../dev/inmo/tgbotapi/types/gifts/UniqueGiftSymbol.kt | 8 +------- 6 files changed, 6 insertions(+), 47 deletions(-) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes.kt index 6fa54f4477..dbb9ebca5b 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes.kt @@ -7,14 +7,7 @@ import dev.inmo.tgbotapi.types.unlimitedGiftsField import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable -/** - * This object describes the types of gifts that can be gifted to a user or a chat. - * - * @param unlimitedGifts True, if unlimited regular gifts are accepted - * @param limitedGifts True, if limited regular gifts are accepted - * @param uniqueGifts True, if unique gifts or gifts that can be upgraded to unique for free are accepted - * @param premiumSubscription True, if a Telegram Premium subscription is accepted - */ + @Serializable data class AcceptedGiftTypes( @SerialName(unlimitedGiftsField) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGift.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGift.kt index cf2e0dcf61..30f30c7e6e 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGift.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGift.kt @@ -4,16 +4,7 @@ import dev.inmo.tgbotapi.types.* import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable -/** - * This object describes a unique gift that was upgraded from a regular gift. - * - * @param baseName Human-readable name of the regular gift from which this unique gift was upgraded - * @param name Unique name of the gift. This name can be used in `https://t.me/nft/...` links and story areas - * @param number Unique number of the upgraded gift among gifts upgraded from the same regular gift - * @param model Model of the gift - * @param symbol Symbol of the gift - * @param backdrop Backdrop of the gift - */ + @Serializable data class UniqueGift( @SerialName(baseNameField) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftBackdrop.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftBackdrop.kt index bbe5d01aeb..22bd75b826 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftBackdrop.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftBackdrop.kt @@ -6,13 +6,7 @@ import dev.inmo.tgbotapi.types.rarityPerMilleField import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable -/** - * This object describes the backdrop of a unique gift. - * - * @param name Name of the backdrop - * @param colors Colors of the backdrop - * @param rarityPerMille The number of unique gifts that receive this backdrop for every 1000 gifts upgraded - */ + @Serializable data class UniqueGiftBackdrop( @SerialName(nameField) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftBackdropColors.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftBackdropColors.kt index 94bbc57e9a..fac98b28ed 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftBackdropColors.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftBackdropColors.kt @@ -8,14 +8,7 @@ import dev.inmo.tgbotapi.utils.RGBColor import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable -/** - * This object describes the colors of the backdrop of a unique gift. - * - * @param centerColor The color in the center of the backdrop in RGB format - * @param edgeColor The color on the edges of the backdrop in RGB format - * @param symbolColor The color to be applied to the symbol in RGB format - * @param textColor The color for the text on the backdrop in RGB format - */ + @Serializable data class UniqueGiftBackdropColors( @SerialName(centerColorField) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftModel.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftModel.kt index cc42a199c9..2f95e03a30 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftModel.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftModel.kt @@ -7,13 +7,7 @@ import dev.inmo.tgbotapi.types.stickerField import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable -/** - * This object describes the model of a unique gift. - * - * @param name Name of the model - * @param sticker The sticker that represents the unique gift - * @param rarityPerMille The number of unique gifts that receive this model for every 1000 gifts upgraded - */ + @Serializable data class UniqueGiftModel( @SerialName(nameField) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftSymbol.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftSymbol.kt index ee6796424b..3ce903732c 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftSymbol.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftSymbol.kt @@ -7,13 +7,7 @@ import dev.inmo.tgbotapi.types.stickerField import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable -/** - * This object describes the symbol shown on the pattern of a unique gift. - * - * @param name Name of the symbol - * @param sticker The sticker that represents the unique gift - * @param rarityPerMille The number of unique gifts that receive this model for every 1000 gifts upgraded - */ + @Serializable data class UniqueGiftSymbol( @SerialName(nameField) From b53fb8da36cc91c1aad83a6f7582ccea8b15c9be Mon Sep 17 00:00:00 2001 From: bpavuk <75901693+bpavuk@users.noreply.github.com> Date: Sun, 13 Apr 2025 16:42:28 +0300 Subject: [PATCH 19/36] feat: added constructor to GiftInfo --- .../dev/inmo/tgbotapi/types/gifts/GiftInfo.kt | 54 +++++++++++++------ 1 file changed, 37 insertions(+), 17 deletions(-) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/GiftInfo.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/GiftInfo.kt index d85df96526..03f37347f4 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/GiftInfo.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/GiftInfo.kt @@ -2,25 +2,45 @@ package dev.inmo.tgbotapi.types.gifts import dev.inmo.tgbotapi.types.* import dev.inmo.tgbotapi.types.message.RawMessageEntities +import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList +import dev.inmo.tgbotapi.types.message.toRawMessageEntities import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable +import kotlin.jvm.JvmName + @Serializable data class GiftInfo private constructor( - @SerialName(giftField) - val gift: Gift, - @SerialName(ownedGiftIdField) - val ownedGiftId: GiftId? = null, - @SerialName(convertStarCountField) - val convertStarCount: Int? = null, - @SerialName(prepaidUpgradeStarCountField) - val prepaidUpgradeStarCount: Int? = null, - @SerialName(canBeUpgradedField) - val canBeUpgraded: Boolean = false, - @SerialName(textField) - val text: String? = null, - @SerialName(entitiesField) - val entities: RawMessageEntities, - @SerialName(isPrivateField) - val isPrivate: Boolean = false -) + @SerialName(giftField) val gift: Gift, + @SerialName(ownedGiftIdField) val ownedGiftId: GiftId? = null, + @SerialName(convertStarCountField) val convertStarCount: Int? = null, + @SerialName(prepaidUpgradeStarCountField) val prepaidUpgradeStarCount: Int? = null, + @SerialName(canBeUpgradedField) val canBeUpgraded: Boolean = false, + @SerialName(textField) val text: String? = null, + @SerialName(entitiesField) val entities: RawMessageEntities, + @SerialName(isPrivateField) val isPrivate: Boolean = false +) { + companion object { + @JvmName("PublicConstructor") + operator fun invoke( + gift: Gift, + ownedGiftId: GiftId? = null, + convertStarCount: Int? = null, + prepaidUpgradeStarCount: Int? = null, + canBeUpgraded: Boolean = false, + text: String? = null, + textSources: TextSourcesList = emptyList(), + position: Int, + isPrivate: Boolean = false + ) = GiftInfo( + gift, + ownedGiftId, + convertStarCount, + prepaidUpgradeStarCount, + canBeUpgraded, + text, + textSources.toRawMessageEntities(position), + isPrivate + ) + } +} From 7cb576e6b1c0585b2991683fbf859649cdbdd1ad Mon Sep 17 00:00:00 2001 From: Bodya <75901693+bpavuk@users.noreply.github.com> Date: Sun, 13 Apr 2025 17:10:10 +0300 Subject: [PATCH 20/36] fix: fixed defaults in AcceptedGiftTypes --- .../dev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes.kt index dbb9ebca5b..8d0b4cb92c 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes.kt @@ -11,11 +11,11 @@ import kotlinx.serialization.Serializable @Serializable data class AcceptedGiftTypes( @SerialName(unlimitedGiftsField) - val unlimitedGifts: Boolean = true, + val unlimitedGifts: Boolean = false, @SerialName(limitedGiftsField) - val limitedGifts: Boolean = true, + val limitedGifts: Boolean = false, @SerialName(uniqueGiftsField) - val uniqueGifts: Boolean = true, + val uniqueGifts: Boolean = false, @SerialName(premiumSubscriptionField) - val premiumSubscription: Boolean = true + val premiumSubscription: Boolean = false ) From d40919f099658d8d176a52bca749a3538ea36f13 Mon Sep 17 00:00:00 2001 From: Bodya <75901693+bpavuk@users.noreply.github.com> Date: Sun, 13 Apr 2025 17:11:31 +0300 Subject: [PATCH 21/36] style: separated annotations and values with line breaks in GiftInfo.kt --- .../dev/inmo/tgbotapi/types/gifts/GiftInfo.kt | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/GiftInfo.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/GiftInfo.kt index 03f37347f4..b0c77d8d38 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/GiftInfo.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/GiftInfo.kt @@ -11,14 +11,22 @@ import kotlin.jvm.JvmName @Serializable data class GiftInfo private constructor( - @SerialName(giftField) val gift: Gift, - @SerialName(ownedGiftIdField) val ownedGiftId: GiftId? = null, - @SerialName(convertStarCountField) val convertStarCount: Int? = null, - @SerialName(prepaidUpgradeStarCountField) val prepaidUpgradeStarCount: Int? = null, - @SerialName(canBeUpgradedField) val canBeUpgraded: Boolean = false, - @SerialName(textField) val text: String? = null, - @SerialName(entitiesField) val entities: RawMessageEntities, - @SerialName(isPrivateField) val isPrivate: Boolean = false + @SerialName(giftField) + val gift: Gift, + @SerialName(ownedGiftIdField) + val ownedGiftId: GiftId? = null, + @SerialName(convertStarCountField) + val convertStarCount: Int? = null, + @SerialName(prepaidUpgradeStarCountField) + val prepaidUpgradeStarCount: Int? = null, + @SerialName(canBeUpgradedField) + val canBeUpgraded: Boolean = false, + @SerialName(textField) + val text: String? = null, + @SerialName(entitiesField) + val entities: RawMessageEntities, + @SerialName(isPrivateField) + val isPrivate: Boolean = false ) { companion object { @JvmName("PublicConstructor") From cb6127bf91efef63099b893434f773438d06a775 Mon Sep 17 00:00:00 2001 From: Bodya <75901693+bpavuk@users.noreply.github.com> Date: Sun, 13 Apr 2025 17:14:24 +0300 Subject: [PATCH 22/36] fix: `accepted_gift_types` field is not optional anymore --- .../kotlin/dev/inmo/tgbotapi/types/chat/Extended.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/Extended.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/Extended.kt index 5278834c65..a2b0dd6cda 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/Extended.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/Extended.kt @@ -21,6 +21,8 @@ data class ExtendedChannelChatImpl( override val id: ChatId, @SerialName(titleField) override val title: String, + @SerialName(acceptedGiftTypesField) + override val acceptedGiftTypes: AcceptedGiftTypes, @SerialName(usernameField) override val username: Username? = null, @SerialName(activeUsernamesField) @@ -57,9 +59,7 @@ data class ExtendedChannelChatImpl( @SerialName(hasVisibleHistoryField) override val newMembersSeeHistory: Boolean = false, @SerialName(maxReactionCountField) - override val maxReactionsCount: Int = 3, - @SerialName(acceptedGiftTypesField) - override val acceptedGiftTypes: AcceptedGiftTypes = AcceptedGiftTypes(), + override val maxReactionsCount: Int = 3 ) : ExtendedChannelChat @Serializable From b604444f7dab2ee9aa427c30a20fa429cb57e9c5 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Wed, 16 Apr 2025 18:07:45 +0600 Subject: [PATCH 23/36] add core requests for business account (excluding gifts) --- .../requests/abstracts/BusinessRequest.kt | 13 ++++ .../DeleteBusinessMessages.kt | 27 ++++++++ .../GetBusinessAccountStarBalance.kt | 36 +++++++++++ .../business_connection/InputProfilePhoto.kt | 62 +++++++++++++++++++ .../ReadBusinessMessage.kt | 33 ++++++++++ .../RemoveBusinessAccountProfilePhoto.kt | 39 ++++++++++++ .../SetBusinessAccountBio.kt | 37 +++++++++++ .../SetBusinessAccountName.kt | 36 +++++++++++ .../SetBusinessAccountProfilePhoto.kt | 45 ++++++++++++++ .../SetBusinessAccountUsername.kt | 36 +++++++++++ .../TransferBusinessAccountStarBalance.kt | 39 ++++++++++++ .../kotlin/dev/inmo/tgbotapi/types/Common.kt | 4 ++ .../types/payments/stars/StarAmount.kt | 14 +++++ .../tgbotapi/utils/DeserializeWithUnknown.kt | 15 +++++ 14 files changed, 436 insertions(+) create mode 100644 tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/abstracts/BusinessRequest.kt create mode 100644 tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/DeleteBusinessMessages.kt create mode 100644 tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/GetBusinessAccountStarBalance.kt create mode 100644 tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto.kt create mode 100644 tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/ReadBusinessMessage.kt create mode 100644 tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/RemoveBusinessAccountProfilePhoto.kt create mode 100644 tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountBio.kt create mode 100644 tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountName.kt create mode 100644 tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountProfilePhoto.kt create mode 100644 tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountUsername.kt create mode 100644 tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/TransferBusinessAccountStarBalance.kt create mode 100644 tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/payments/stars/StarAmount.kt create mode 100644 tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/utils/DeserializeWithUnknown.kt diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/abstracts/BusinessRequest.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/abstracts/BusinessRequest.kt new file mode 100644 index 0000000000..4dbb31ff3b --- /dev/null +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/abstracts/BusinessRequest.kt @@ -0,0 +1,13 @@ +package dev.inmo.tgbotapi.requests.abstracts + +import dev.inmo.tgbotapi.abstracts.types.WithBusinessConnectionId +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId +import kotlinx.serialization.json.JsonObject + +interface BusinessRequest : Request, WithBusinessConnectionId { + interface Simple : BusinessRequest, SimpleRequest + interface Multipart : BusinessRequest, MultipartRequest.Common, SimpleRequest { + override val data: SimpleRequest + get() = this + } +} diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/DeleteBusinessMessages.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/DeleteBusinessMessages.kt new file mode 100644 index 0000000000..11f49c1bfb --- /dev/null +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/DeleteBusinessMessages.kt @@ -0,0 +1,27 @@ +package dev.inmo.tgbotapi.requests.business_connection + +import dev.inmo.tgbotapi.requests.abstracts.BusinessRequest +import dev.inmo.tgbotapi.types.MessageId +import dev.inmo.tgbotapi.types.businessConnectionIdField +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId +import dev.inmo.tgbotapi.types.messageIdsField +import kotlinx.serialization.DeserializationStrategy +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable +import kotlinx.serialization.SerializationStrategy +import kotlinx.serialization.builtins.serializer + +@Serializable +data class DeleteBusinessMessages( + @SerialName(businessConnectionIdField) + override val businessConnectionId: BusinessConnectionId, + @SerialName(messageIdsField) + val messagesIds: List +) : BusinessRequest.Simple { + override fun method(): String = "deleteBusinessMessages" + + override val resultDeserializer: DeserializationStrategy + get() = Boolean.serializer() + override val requestSerializer: SerializationStrategy<*> + get() = serializer() +} \ No newline at end of file diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/GetBusinessAccountStarBalance.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/GetBusinessAccountStarBalance.kt new file mode 100644 index 0000000000..a6f21b154c --- /dev/null +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/GetBusinessAccountStarBalance.kt @@ -0,0 +1,36 @@ +package dev.inmo.tgbotapi.requests.business_connection + +import dev.inmo.tgbotapi.requests.abstracts.BusinessRequest +import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest +import dev.inmo.tgbotapi.types.ChatId +import dev.inmo.tgbotapi.types.MessageId +import dev.inmo.tgbotapi.types.Username +import dev.inmo.tgbotapi.types.bioField +import dev.inmo.tgbotapi.types.businessConnectionIdField +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId +import dev.inmo.tgbotapi.types.chatIdField +import dev.inmo.tgbotapi.types.firstNameField +import dev.inmo.tgbotapi.types.lastNameField +import dev.inmo.tgbotapi.types.message.RawMessage +import dev.inmo.tgbotapi.types.messageIdField +import dev.inmo.tgbotapi.types.messageIdsField +import dev.inmo.tgbotapi.types.payments.stars.StarAmount +import dev.inmo.tgbotapi.types.usernameField +import kotlinx.serialization.DeserializationStrategy +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable +import kotlinx.serialization.SerializationStrategy +import kotlinx.serialization.builtins.serializer + +@Serializable +data class GetBusinessAccountStarBalance( + @SerialName(businessConnectionIdField) + override val businessConnectionId: BusinessConnectionId, +) : BusinessRequest.Simple { + override fun method(): String = "getBusinessAccountStarBalance" + + override val resultDeserializer: DeserializationStrategy + get() = StarAmount.serializer() + override val requestSerializer: SerializationStrategy<*> + get() = serializer() +} \ No newline at end of file diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto.kt new file mode 100644 index 0000000000..ce3ca843d3 --- /dev/null +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto.kt @@ -0,0 +1,62 @@ +package dev.inmo.tgbotapi.requests.business_connection + +import dev.inmo.tgbotapi.requests.abstracts.MultipartFile +import dev.inmo.tgbotapi.types.DoubleSeconds +import dev.inmo.tgbotapi.types.Seconds +import dev.inmo.tgbotapi.types.StickerFormat +import dev.inmo.tgbotapi.types.animationField +import dev.inmo.tgbotapi.types.mainFrameTimestampField +import dev.inmo.tgbotapi.types.photoField +import dev.inmo.tgbotapi.utils.deserializeWithRaw +import kotlinx.serialization.EncodeDefault +import kotlinx.serialization.KSerializer +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable +import kotlinx.serialization.descriptors.SerialDescriptor +import kotlinx.serialization.encoding.Decoder +import kotlinx.serialization.encoding.Encoder +import kotlinx.serialization.json.JsonObject + +@Serializable +sealed interface InputProfilePhoto { + val type: String + val mediaPair: Pair + @Serializable + data class Static( + @SerialName(photoField) + val photo: MultipartFile + ) : InputProfilePhoto { + override val mediaPair: Pair + get() = photoField to photo + @EncodeDefault + override val type: String = "static" + } + @Serializable + data class Animated( + @SerialName(animationField) + val animation: MultipartFile, + @SerialName(mainFrameTimestampField) + val mainFrameTimestamp: DoubleSeconds? = null + ) : InputProfilePhoto { + override val mediaPair: Pair + get() = animationField to animation + @EncodeDefault + override val type: String = "animated" + } + + companion object : KSerializer { + override val descriptor: SerialDescriptor + get() = JsonObject.serializer().descriptor + + override fun deserialize(decoder: Decoder): InputProfilePhoto { + error("Deserialization is not supported yet") + } + + override fun serialize(encoder: Encoder, value: InputProfilePhoto) { + when (value) { + is Animated -> Animated.serializer().serialize(encoder, value) + is Static -> Static.serializer().serialize(encoder, value) + } + } + } +} \ No newline at end of file diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/ReadBusinessMessage.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/ReadBusinessMessage.kt new file mode 100644 index 0000000000..71286d3fb3 --- /dev/null +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/ReadBusinessMessage.kt @@ -0,0 +1,33 @@ +package dev.inmo.tgbotapi.requests.business_connection + +import dev.inmo.tgbotapi.requests.abstracts.BusinessRequest +import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest +import dev.inmo.tgbotapi.types.ChatId +import dev.inmo.tgbotapi.types.MessageId +import dev.inmo.tgbotapi.types.businessConnectionIdField +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId +import dev.inmo.tgbotapi.types.chatIdField +import dev.inmo.tgbotapi.types.message.RawMessage +import dev.inmo.tgbotapi.types.messageIdField +import kotlinx.serialization.DeserializationStrategy +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable +import kotlinx.serialization.SerializationStrategy +import kotlinx.serialization.builtins.serializer + +@Serializable +data class ReadBusinessMessage( + @SerialName(businessConnectionIdField) + override val businessConnectionId: BusinessConnectionId, + @SerialName(chatIdField) + val chatId: ChatId, + @SerialName(messageIdField) + val messageId: MessageId +) : BusinessRequest.Simple { + override fun method(): String = "readBusinessMessage" + + override val resultDeserializer: DeserializationStrategy + get() = Boolean.serializer() + override val requestSerializer: SerializationStrategy<*> + get() = serializer() +} \ No newline at end of file diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/RemoveBusinessAccountProfilePhoto.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/RemoveBusinessAccountProfilePhoto.kt new file mode 100644 index 0000000000..58e70d9458 --- /dev/null +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/RemoveBusinessAccountProfilePhoto.kt @@ -0,0 +1,39 @@ +package dev.inmo.tgbotapi.requests.business_connection + +import dev.inmo.tgbotapi.requests.abstracts.BusinessRequest +import dev.inmo.tgbotapi.requests.abstracts.MultipartFile +import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest +import dev.inmo.tgbotapi.types.ChatId +import dev.inmo.tgbotapi.types.MessageId +import dev.inmo.tgbotapi.types.Username +import dev.inmo.tgbotapi.types.businessConnectionIdField +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId +import dev.inmo.tgbotapi.types.chatIdField +import dev.inmo.tgbotapi.types.firstNameField +import dev.inmo.tgbotapi.types.isPublicField +import dev.inmo.tgbotapi.types.lastNameField +import dev.inmo.tgbotapi.types.message.RawMessage +import dev.inmo.tgbotapi.types.messageIdField +import dev.inmo.tgbotapi.types.messageIdsField +import dev.inmo.tgbotapi.types.photoField +import dev.inmo.tgbotapi.types.usernameField +import kotlinx.serialization.DeserializationStrategy +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable +import kotlinx.serialization.SerializationStrategy +import kotlinx.serialization.builtins.serializer + +@Serializable +data class RemoveBusinessAccountProfilePhoto( + @SerialName(businessConnectionIdField) + override val businessConnectionId: BusinessConnectionId, + @SerialName(isPublicField) + val isPublic: Boolean = false +) : BusinessRequest.Simple { + override fun method(): String = "removeBusinessAccountProfilePhoto" + + override val resultDeserializer: DeserializationStrategy + get() = Boolean.serializer() + override val requestSerializer: SerializationStrategy<*> + get() = serializer() +} \ No newline at end of file diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountBio.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountBio.kt new file mode 100644 index 0000000000..fc1157b260 --- /dev/null +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountBio.kt @@ -0,0 +1,37 @@ +package dev.inmo.tgbotapi.requests.business_connection + +import dev.inmo.tgbotapi.requests.abstracts.BusinessRequest +import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest +import dev.inmo.tgbotapi.types.ChatId +import dev.inmo.tgbotapi.types.MessageId +import dev.inmo.tgbotapi.types.Username +import dev.inmo.tgbotapi.types.bioField +import dev.inmo.tgbotapi.types.businessConnectionIdField +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId +import dev.inmo.tgbotapi.types.chatIdField +import dev.inmo.tgbotapi.types.firstNameField +import dev.inmo.tgbotapi.types.lastNameField +import dev.inmo.tgbotapi.types.message.RawMessage +import dev.inmo.tgbotapi.types.messageIdField +import dev.inmo.tgbotapi.types.messageIdsField +import dev.inmo.tgbotapi.types.usernameField +import kotlinx.serialization.DeserializationStrategy +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable +import kotlinx.serialization.SerializationStrategy +import kotlinx.serialization.builtins.serializer + +@Serializable +data class SetBusinessAccountBio( + @SerialName(businessConnectionIdField) + override val businessConnectionId: BusinessConnectionId, + @SerialName(bioField) + val bio: String +) : BusinessRequest.Simple { + override fun method(): String = "setBusinessAccountBio" + + override val resultDeserializer: DeserializationStrategy + get() = Boolean.serializer() + override val requestSerializer: SerializationStrategy<*> + get() = serializer() +} \ No newline at end of file diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountName.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountName.kt new file mode 100644 index 0000000000..26a97883fa --- /dev/null +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountName.kt @@ -0,0 +1,36 @@ +package dev.inmo.tgbotapi.requests.business_connection + +import dev.inmo.tgbotapi.requests.abstracts.BusinessRequest +import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest +import dev.inmo.tgbotapi.types.ChatId +import dev.inmo.tgbotapi.types.MessageId +import dev.inmo.tgbotapi.types.businessConnectionIdField +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId +import dev.inmo.tgbotapi.types.chatIdField +import dev.inmo.tgbotapi.types.firstNameField +import dev.inmo.tgbotapi.types.lastNameField +import dev.inmo.tgbotapi.types.message.RawMessage +import dev.inmo.tgbotapi.types.messageIdField +import dev.inmo.tgbotapi.types.messageIdsField +import kotlinx.serialization.DeserializationStrategy +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable +import kotlinx.serialization.SerializationStrategy +import kotlinx.serialization.builtins.serializer + +@Serializable +data class SetBusinessAccountName( + @SerialName(businessConnectionIdField) + override val businessConnectionId: BusinessConnectionId, + @SerialName(firstNameField) + val firstName: String, + @SerialName(lastNameField) + val lastName: String +) : BusinessRequest.Simple { + override fun method(): String = "setBusinessAccountName" + + override val resultDeserializer: DeserializationStrategy + get() = Boolean.serializer() + override val requestSerializer: SerializationStrategy<*> + get() = serializer() +} \ No newline at end of file diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountProfilePhoto.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountProfilePhoto.kt new file mode 100644 index 0000000000..c55f828fa4 --- /dev/null +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountProfilePhoto.kt @@ -0,0 +1,45 @@ +package dev.inmo.tgbotapi.requests.business_connection + +import dev.inmo.tgbotapi.requests.abstracts.BusinessRequest +import dev.inmo.tgbotapi.requests.abstracts.MultipartFile +import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest +import dev.inmo.tgbotapi.types.ChatId +import dev.inmo.tgbotapi.types.MessageId +import dev.inmo.tgbotapi.types.Username +import dev.inmo.tgbotapi.types.businessConnectionIdField +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId +import dev.inmo.tgbotapi.types.chatIdField +import dev.inmo.tgbotapi.types.firstNameField +import dev.inmo.tgbotapi.types.isPublicField +import dev.inmo.tgbotapi.types.lastNameField +import dev.inmo.tgbotapi.types.message.RawMessage +import dev.inmo.tgbotapi.types.messageIdField +import dev.inmo.tgbotapi.types.messageIdsField +import dev.inmo.tgbotapi.types.photoField +import dev.inmo.tgbotapi.types.usernameField +import kotlinx.serialization.DeserializationStrategy +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable +import kotlinx.serialization.SerializationStrategy +import kotlinx.serialization.builtins.serializer + +@Serializable +data class SetBusinessAccountProfilePhoto( + @SerialName(businessConnectionIdField) + override val businessConnectionId: BusinessConnectionId, + @SerialName(photoField) + val photo: InputProfilePhoto, + @SerialName(isPublicField) + val isPublic: Boolean = false +) : BusinessRequest.Multipart { + override fun method(): String = "setBusinessAccountProfilePhoto" + + override val resultDeserializer: DeserializationStrategy + get() = Boolean.serializer() + override val requestSerializer: SerializationStrategy<*> + get() = serializer() + + override val mediaMap: Map = mapOf( + photo.mediaPair + ) +} \ No newline at end of file diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountUsername.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountUsername.kt new file mode 100644 index 0000000000..65c6df71fc --- /dev/null +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountUsername.kt @@ -0,0 +1,36 @@ +package dev.inmo.tgbotapi.requests.business_connection + +import dev.inmo.tgbotapi.requests.abstracts.BusinessRequest +import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest +import dev.inmo.tgbotapi.types.ChatId +import dev.inmo.tgbotapi.types.MessageId +import dev.inmo.tgbotapi.types.Username +import dev.inmo.tgbotapi.types.businessConnectionIdField +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId +import dev.inmo.tgbotapi.types.chatIdField +import dev.inmo.tgbotapi.types.firstNameField +import dev.inmo.tgbotapi.types.lastNameField +import dev.inmo.tgbotapi.types.message.RawMessage +import dev.inmo.tgbotapi.types.messageIdField +import dev.inmo.tgbotapi.types.messageIdsField +import dev.inmo.tgbotapi.types.usernameField +import kotlinx.serialization.DeserializationStrategy +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable +import kotlinx.serialization.SerializationStrategy +import kotlinx.serialization.builtins.serializer + +@Serializable +data class SetBusinessAccountUsername( + @SerialName(businessConnectionIdField) + override val businessConnectionId: BusinessConnectionId, + @SerialName(usernameField) + val username: Username +) : BusinessRequest.Simple { + override fun method(): String = "setBusinessAccountUsername" + + override val resultDeserializer: DeserializationStrategy + get() = Boolean.serializer() + override val requestSerializer: SerializationStrategy<*> + get() = serializer() +} \ No newline at end of file diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/TransferBusinessAccountStarBalance.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/TransferBusinessAccountStarBalance.kt new file mode 100644 index 0000000000..fad1e1b902 --- /dev/null +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/TransferBusinessAccountStarBalance.kt @@ -0,0 +1,39 @@ +package dev.inmo.tgbotapi.requests.business_connection + +import dev.inmo.tgbotapi.requests.abstracts.BusinessRequest +import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest +import dev.inmo.tgbotapi.types.ChatId +import dev.inmo.tgbotapi.types.MessageId +import dev.inmo.tgbotapi.types.Username +import dev.inmo.tgbotapi.types.bioField +import dev.inmo.tgbotapi.types.businessConnectionIdField +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId +import dev.inmo.tgbotapi.types.chatIdField +import dev.inmo.tgbotapi.types.firstNameField +import dev.inmo.tgbotapi.types.lastNameField +import dev.inmo.tgbotapi.types.message.RawMessage +import dev.inmo.tgbotapi.types.messageIdField +import dev.inmo.tgbotapi.types.messageIdsField +import dev.inmo.tgbotapi.types.payments.stars.StarAmount +import dev.inmo.tgbotapi.types.starCountField +import dev.inmo.tgbotapi.types.usernameField +import kotlinx.serialization.DeserializationStrategy +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable +import kotlinx.serialization.SerializationStrategy +import kotlinx.serialization.builtins.serializer + +@Serializable +data class TransferBusinessAccountStarBalance( + @SerialName(businessConnectionIdField) + override val businessConnectionId: BusinessConnectionId, + @SerialName(starCountField) + val starCount: Int +) : BusinessRequest.Simple { + override fun method(): String = "transferBusinessAccountStars" + + override val resultDeserializer: DeserializationStrategy + get() = Boolean.serializer() + override val requestSerializer: SerializationStrategy<*> + get() = serializer() +} \ No newline at end of file diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt index 6e2795035f..5ed47f6f00 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt @@ -19,6 +19,7 @@ typealias GooglePlaceType = String typealias MembersLimit = Int typealias Seconds = Int +typealias DoubleSeconds = Double typealias MilliSeconds = Long typealias LongSeconds = Long typealias UnixTimeStamp = LongSeconds @@ -505,6 +506,7 @@ const val creatorField = "creator" const val subscriptionPeriodField = "subscription_period" const val subscriptionPriceField = "subscription_price" const val copyTextField = "copy_text" +const val isPublicField = "is_public" const val giftField = "gift" const val giftsField = "gifts" @@ -600,6 +602,8 @@ const val voiceField = "voice" const val videoNoteField = "video_note" const val mediaField = "media" +const val mainFrameTimestampField = "main_frame_timestamp" + const val disableEditMessageField = "disable_edit_message" const val scoreField = "score" const val forceField = "force" diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/payments/stars/StarAmount.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/payments/stars/StarAmount.kt new file mode 100644 index 0000000000..a7b2ad824a --- /dev/null +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/payments/stars/StarAmount.kt @@ -0,0 +1,14 @@ +package dev.inmo.tgbotapi.types.payments.stars + +import dev.inmo.tgbotapi.types.amountField +import dev.inmo.tgbotapi.types.nanostarAmountField +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable + +@Serializable +data class StarAmount( + @SerialName(amountField) + val amount: Long, + @SerialName(nanostarAmountField) + val nanostarAmount: Long = 0, +) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/utils/DeserializeWithUnknown.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/utils/DeserializeWithUnknown.kt new file mode 100644 index 0000000000..0cd36caee6 --- /dev/null +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/utils/DeserializeWithUnknown.kt @@ -0,0 +1,15 @@ +package dev.inmo.tgbotapi.utils + +import kotlinx.serialization.KSerializer +import kotlinx.serialization.encoding.Decoder +import kotlinx.serialization.json.JsonDecoder +import kotlinx.serialization.json.JsonElement + +fun Decoder.deserializeWithRaw(serializer: KSerializer): Pair { + return if (this is JsonDecoder) { + val json = decodeJsonElement() + this.json.decodeFromJsonElement(serializer, json) to json + } else { + serializer.deserialize(this) to null + } +} From deb8d7b43a541d3889ad6da9b5255e9a0e450d7d Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Wed, 16 Apr 2025 18:42:13 +0600 Subject: [PATCH 24/36] add api bindings to new requests --- .../api/business/DeleteBusinessMessages.kt | 20 ++++++++++++++ ...eleteBusinessMessagesGeneratedVariation.kt | 16 +++++++++++ .../business/GetBusinessAccountStarBalance.kt | 12 +++++++++ .../api/business/ReadBusinessMessage.kt | 27 +++++++++++++++++++ .../ReadBusinessMessageGeneratedVariation.kt | 20 ++++++++++++++ .../RemoveBusinessAccountProfilePhoto.kt | 11 ++++++++ .../api/business/SetBusinessAccountBio.kt | 12 +++++++++ .../api/business/SetBusinessAccountName.kt | 13 +++++++++ .../SetBusinessAccountProfilePhoto.kt | 14 ++++++++++ .../business/SetBusinessAccountUsername.kt | 17 ++++++++++++ ...sinessAccountUsernameGeneratedVariation.kt | 16 +++++++++++ .../TransferBusinessAccountStarBalance.kt | 13 +++++++++ .../SetBusinessAccountName.kt | 2 +- 13 files changed, 192 insertions(+), 1 deletion(-) create mode 100644 tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/DeleteBusinessMessages.kt create mode 100644 tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/DeleteBusinessMessagesGeneratedVariation.kt create mode 100644 tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/GetBusinessAccountStarBalance.kt create mode 100644 tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/ReadBusinessMessage.kt create mode 100644 tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/ReadBusinessMessageGeneratedVariation.kt create mode 100644 tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/RemoveBusinessAccountProfilePhoto.kt create mode 100644 tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/SetBusinessAccountBio.kt create mode 100644 tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/SetBusinessAccountName.kt create mode 100644 tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/SetBusinessAccountProfilePhoto.kt create mode 100644 tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/SetBusinessAccountUsername.kt create mode 100644 tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/SetBusinessAccountUsernameGeneratedVariation.kt create mode 100644 tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/TransferBusinessAccountStarBalance.kt diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/DeleteBusinessMessages.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/DeleteBusinessMessages.kt new file mode 100644 index 0000000000..4e68eaa0ca --- /dev/null +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/DeleteBusinessMessages.kt @@ -0,0 +1,20 @@ +package dev.inmo.tgbotapi.extensions.api.business + +import dev.inmo.micro_utils.ksp.variations.GenerateVariations +import dev.inmo.micro_utils.ksp.variations.GenerationVariant +import dev.inmo.tgbotapi.bot.TelegramBot +import dev.inmo.tgbotapi.requests.business_connection.DeleteBusinessMessages +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId +import dev.inmo.tgbotapi.types.ChatId +import dev.inmo.tgbotapi.types.MessageId +import dev.inmo.tgbotapi.types.chat.Chat +import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage + +@GenerateVariations +public suspend fun TelegramBot.deleteBusinessMessages( + businessConnectionId: BusinessConnectionId, + @GenerationVariant(List::class, "messages.map { it.messageId }", "messages", AccessibleMessage::class) + messageIds: List +): Boolean = execute( + DeleteBusinessMessages(businessConnectionId, messageIds) +) diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/DeleteBusinessMessagesGeneratedVariation.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/DeleteBusinessMessagesGeneratedVariation.kt new file mode 100644 index 0000000000..3afc52db65 --- /dev/null +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/DeleteBusinessMessagesGeneratedVariation.kt @@ -0,0 +1,16 @@ +// THIS CODE HAVE BEEN GENERATED AUTOMATICALLY +// TO REGENERATE IT JUST DELETE FILE +// ORIGINAL FILE: DeleteBusinessMessages.kt +package dev.inmo.tgbotapi.extensions.api.business + +import dev.inmo.tgbotapi.bot.TelegramBot +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId +import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage +import kotlin.Boolean +import kotlin.collections.List + +public suspend fun TelegramBot.deleteBusinessMessages(businessConnectionId: BusinessConnectionId, + messages: List): Boolean = deleteBusinessMessages( + businessConnectionId = businessConnectionId, messageIds = with(messages) {messages.map { + it.messageId }} +) diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/GetBusinessAccountStarBalance.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/GetBusinessAccountStarBalance.kt new file mode 100644 index 0000000000..48e26bc641 --- /dev/null +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/GetBusinessAccountStarBalance.kt @@ -0,0 +1,12 @@ +package dev.inmo.tgbotapi.extensions.api.business + +import dev.inmo.tgbotapi.bot.TelegramBot +import dev.inmo.tgbotapi.requests.business_connection.GetBusinessAccountStarBalance +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId +import dev.inmo.tgbotapi.types.payments.stars.StarAmount + +public suspend fun TelegramBot.getBusinessAccountStarBalance( + businessConnectionId: BusinessConnectionId +): StarAmount = execute( + GetBusinessAccountStarBalance(businessConnectionId) +) \ No newline at end of file diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/ReadBusinessMessage.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/ReadBusinessMessage.kt new file mode 100644 index 0000000000..4ef29107f1 --- /dev/null +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/ReadBusinessMessage.kt @@ -0,0 +1,27 @@ +package dev.inmo.tgbotapi.extensions.api.business + +import dev.inmo.micro_utils.ksp.variations.GenerateVariations +import dev.inmo.micro_utils.ksp.variations.GenerationVariant +import dev.inmo.tgbotapi.bot.TelegramBot +import dev.inmo.tgbotapi.requests.business_connection.ReadBusinessMessage +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId +import dev.inmo.tgbotapi.types.ChatId +import dev.inmo.tgbotapi.types.MessageId +import dev.inmo.tgbotapi.types.chat.Chat +import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage +import dev.inmo.tgbotapi.types.toChatId + +@GenerateVariations +public suspend fun TelegramBot.readBusinessMessage( + businessConnectionId: BusinessConnectionId, + @GenerationVariant(Chat::class, "chat.id.toChatId()", "chat") + chatId: ChatId, + messageId: MessageId +): Boolean = execute( + ReadBusinessMessage(businessConnectionId, chatId, messageId) +) + +public suspend fun TelegramBot.readBusinessMessage( + businessConnectionId: BusinessConnectionId, + message: AccessibleMessage +): Boolean = readBusinessMessage(businessConnectionId, message.chat.id.toChatId(), message.messageId) \ No newline at end of file diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/ReadBusinessMessageGeneratedVariation.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/ReadBusinessMessageGeneratedVariation.kt new file mode 100644 index 0000000000..bb09bbb6eb --- /dev/null +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/ReadBusinessMessageGeneratedVariation.kt @@ -0,0 +1,20 @@ +// THIS CODE HAVE BEEN GENERATED AUTOMATICALLY +// TO REGENERATE IT JUST DELETE FILE +// ORIGINAL FILE: ReadBusinessMessage.kt +package dev.inmo.tgbotapi.extensions.api.business + +import dev.inmo.tgbotapi.bot.TelegramBot +import dev.inmo.tgbotapi.types.MessageId +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId +import dev.inmo.tgbotapi.types.chat.Chat +import dev.inmo.tgbotapi.types.toChatId +import kotlin.Boolean + +public suspend fun TelegramBot.readBusinessMessage( + businessConnectionId: BusinessConnectionId, + chat: Chat, + messageId: MessageId, +): Boolean = readBusinessMessage( + businessConnectionId = businessConnectionId, chatId = with(chat) {chat.id.toChatId()}, messageId + = messageId +) diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/RemoveBusinessAccountProfilePhoto.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/RemoveBusinessAccountProfilePhoto.kt new file mode 100644 index 0000000000..3f52210269 --- /dev/null +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/RemoveBusinessAccountProfilePhoto.kt @@ -0,0 +1,11 @@ +package dev.inmo.tgbotapi.extensions.api.business + +import dev.inmo.tgbotapi.bot.TelegramBot +import dev.inmo.tgbotapi.requests.business_connection.RemoveBusinessAccountProfilePhoto +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId + +public suspend fun TelegramBot.removeBusinessAccountProfilePhoto( + businessConnectionId: BusinessConnectionId +): Boolean = execute( + RemoveBusinessAccountProfilePhoto(businessConnectionId) +) \ No newline at end of file diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/SetBusinessAccountBio.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/SetBusinessAccountBio.kt new file mode 100644 index 0000000000..bc6805a8c4 --- /dev/null +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/SetBusinessAccountBio.kt @@ -0,0 +1,12 @@ +package dev.inmo.tgbotapi.extensions.api.business + +import dev.inmo.tgbotapi.bot.TelegramBot +import dev.inmo.tgbotapi.requests.business_connection.SetBusinessAccountBio +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId + +public suspend fun TelegramBot.setBusinessAccountBio( + businessConnectionId: BusinessConnectionId, + bio: String +): Boolean = execute( + SetBusinessAccountBio(businessConnectionId, bio) +) \ No newline at end of file diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/SetBusinessAccountName.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/SetBusinessAccountName.kt new file mode 100644 index 0000000000..f309411509 --- /dev/null +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/SetBusinessAccountName.kt @@ -0,0 +1,13 @@ +package dev.inmo.tgbotapi.extensions.api.business + +import dev.inmo.tgbotapi.bot.TelegramBot +import dev.inmo.tgbotapi.requests.business_connection.SetBusinessAccountName +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId + +public suspend fun TelegramBot.setBusinessAccountName( + businessConnectionId: BusinessConnectionId, + firstName: String, + lastName: String? = null +): Boolean = execute( + SetBusinessAccountName(businessConnectionId, firstName, lastName) +) \ No newline at end of file diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/SetBusinessAccountProfilePhoto.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/SetBusinessAccountProfilePhoto.kt new file mode 100644 index 0000000000..0861700062 --- /dev/null +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/SetBusinessAccountProfilePhoto.kt @@ -0,0 +1,14 @@ +package dev.inmo.tgbotapi.extensions.api.business + +import dev.inmo.tgbotapi.bot.TelegramBot +import dev.inmo.tgbotapi.requests.business_connection.InputProfilePhoto +import dev.inmo.tgbotapi.requests.business_connection.SetBusinessAccountProfilePhoto +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId + +public suspend fun TelegramBot.setBusinessAccountProfilePhoto( + businessConnectionId: BusinessConnectionId, + photo: InputProfilePhoto, + isPublic: Boolean = false +): Boolean = execute( + SetBusinessAccountProfilePhoto(businessConnectionId, photo, isPublic) +) \ No newline at end of file diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/SetBusinessAccountUsername.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/SetBusinessAccountUsername.kt new file mode 100644 index 0000000000..3d6d7fb499 --- /dev/null +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/SetBusinessAccountUsername.kt @@ -0,0 +1,17 @@ +package dev.inmo.tgbotapi.extensions.api.business + +import dev.inmo.micro_utils.ksp.variations.GenerateVariations +import dev.inmo.micro_utils.ksp.variations.GenerationVariant +import dev.inmo.tgbotapi.bot.TelegramBot +import dev.inmo.tgbotapi.requests.business_connection.SetBusinessAccountUsername +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId +import dev.inmo.tgbotapi.types.Username + +@GenerateVariations +public suspend fun TelegramBot.setBusinessAccountUsername( + businessConnectionId: BusinessConnectionId, + @GenerationVariant(String::class, "Username(username)", "username") + username: Username +): Boolean = execute( + SetBusinessAccountUsername(businessConnectionId, username) +) \ No newline at end of file diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/SetBusinessAccountUsernameGeneratedVariation.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/SetBusinessAccountUsernameGeneratedVariation.kt new file mode 100644 index 0000000000..9b7672edb6 --- /dev/null +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/SetBusinessAccountUsernameGeneratedVariation.kt @@ -0,0 +1,16 @@ +// THIS CODE HAVE BEEN GENERATED AUTOMATICALLY +// TO REGENERATE IT JUST DELETE FILE +// ORIGINAL FILE: SetBusinessAccountUsername.kt +package dev.inmo.tgbotapi.extensions.api.business + +import dev.inmo.tgbotapi.bot.TelegramBot +import dev.inmo.tgbotapi.types.Username +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId +import kotlin.Boolean +import kotlin.String + +public suspend + fun TelegramBot.setBusinessAccountUsername(businessConnectionId: BusinessConnectionId, + username: String): Boolean = setBusinessAccountUsername( + businessConnectionId = businessConnectionId, username = with(username) { Username(username) } +) diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/TransferBusinessAccountStarBalance.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/TransferBusinessAccountStarBalance.kt new file mode 100644 index 0000000000..2f6a3f29a2 --- /dev/null +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/business/TransferBusinessAccountStarBalance.kt @@ -0,0 +1,13 @@ +package dev.inmo.tgbotapi.extensions.api.business + +import dev.inmo.tgbotapi.bot.TelegramBot +import dev.inmo.tgbotapi.requests.business_connection.TransferBusinessAccountStarBalance +import dev.inmo.tgbotapi.types.business_connection.BusinessConnectionId +import dev.inmo.tgbotapi.types.payments.stars.StarAmount + +public suspend fun TelegramBot.transferBusinessAccountStarBalance( + businessConnectionId: BusinessConnectionId, + amount: Int +): Boolean = execute( + TransferBusinessAccountStarBalance(businessConnectionId, amount) +) \ No newline at end of file diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountName.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountName.kt index 26a97883fa..9fdcf02843 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountName.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountName.kt @@ -25,7 +25,7 @@ data class SetBusinessAccountName( @SerialName(firstNameField) val firstName: String, @SerialName(lastNameField) - val lastName: String + val lastName: String? = null ) : BusinessRequest.Simple { override fun method(): String = "setBusinessAccountName" From 713130fd139cb63fb5481165158d8db743284c54 Mon Sep 17 00:00:00 2001 From: bpavuk <75901693+bpavuk@users.noreply.github.com> Date: Wed, 16 Apr 2025 16:34:33 +0300 Subject: [PATCH 25/36] fix: brought back the `canReceiveGifts` field, marked as deprecated --- .../inmo/tgbotapi/types/chat/ExtendedAbstracts.kt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/ExtendedAbstracts.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/ExtendedAbstracts.kt index 3a362d8857..fc6bd47080 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/ExtendedAbstracts.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/chat/ExtendedAbstracts.kt @@ -21,6 +21,17 @@ sealed interface ExtendedChat : Chat { val maxReactionsCount: Int val acceptedGiftTypes: AcceptedGiftTypes + + @Deprecated( + message = "Telegram Bot API v9.0 introduced the new field, `acceptedGiftTypes`, to allow granular" + + " control over which types of gifts user, bot, or chat can accept.", + replaceWith = ReplaceWith("acceptedGiftTypes.uniqueGifts || acceptedGiftTypes.unlimitedGifts || acceptedGiftTypes.limitedGifts || acceptedGiftTypes.premiumSubscription") + ) + val canReceiveGifts: Boolean + get() = acceptedGiftTypes.uniqueGifts || + acceptedGiftTypes.unlimitedGifts || + acceptedGiftTypes.limitedGifts || + acceptedGiftTypes.premiumSubscription } @Serializable(ExtendedChatSerializer.Companion::class) @@ -60,6 +71,7 @@ sealed interface ExtendedPrivateChat : PrivateChat, ExtendedChatWithUsername, Ex sealed interface ExtendedPublicChat : ExtendedChat, PublicChat, ExtendedNonBotChat { val description: String val inviteLink: String? + @Serializable(TelegramBotAPIMessageDeserializeOnlySerializer::class) val pinnedMessage: Message? val membersHidden: Boolean From 7e80f4edacab13d2e801d1878b426d947319bb20 Mon Sep 17 00:00:00 2001 From: bpavuk <75901693+bpavuk@users.noreply.github.com> Date: Wed, 16 Apr 2025 17:57:27 +0300 Subject: [PATCH 26/36] fix: removed leftovers of merge conflict resolving on GitHub --- .../src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt index 692ad76685..9f2420a55c 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt @@ -96,7 +96,7 @@ val openPeriodPollSecondsLimit = 5 .. 600 val membersLimit = 1 .. 99999 val suggestedTipAmountsLimit = 1 .. 4 -git + val inputFieldPlaceholderLimit = 1 .. 64 val emojisInStickerLimit = 1 .. 20 From c266ab012057e7c975d50e2427d409b0bca0efb3 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Thu, 17 Apr 2025 18:56:32 +0600 Subject: [PATCH 27/36] add support of DeviceStorage and SecureStorage --- .../dev/inmo/tgbotapi/webapps/WebApp.kt | 9 + .../tgbotapi/webapps/storage/DeviceStorage.kt | 167 +++++++++++++ .../tgbotapi/webapps/storage/SecureStorage.kt | 231 ++++++++++++++++++ 3 files changed, 407 insertions(+) create mode 100644 tgbotapi.webapps/src/jsMain/kotlin/dev/inmo/tgbotapi/webapps/storage/DeviceStorage.kt create mode 100644 tgbotapi.webapps/src/jsMain/kotlin/dev/inmo/tgbotapi/webapps/storage/SecureStorage.kt diff --git a/tgbotapi.webapps/src/jsMain/kotlin/dev/inmo/tgbotapi/webapps/WebApp.kt b/tgbotapi.webapps/src/jsMain/kotlin/dev/inmo/tgbotapi/webapps/WebApp.kt index 41eb003b75..4fe54301a0 100644 --- a/tgbotapi.webapps/src/jsMain/kotlin/dev/inmo/tgbotapi/webapps/WebApp.kt +++ b/tgbotapi.webapps/src/jsMain/kotlin/dev/inmo/tgbotapi/webapps/WebApp.kt @@ -12,6 +12,8 @@ import dev.inmo.tgbotapi.webapps.invoice.InvoiceClosedInfo import dev.inmo.tgbotapi.webapps.location.LocationManager import dev.inmo.tgbotapi.webapps.orientation.DeviceOrientation import dev.inmo.tgbotapi.webapps.popup.* +import dev.inmo.tgbotapi.webapps.storage.DeviceStorage +import dev.inmo.tgbotapi.webapps.storage.SecureStorage import dev.inmo.tgbotapi.webapps.stories.StoryShareParams external class WebApp { @@ -104,6 +106,13 @@ external class WebApp { @JsName("SettingsButton") val settingsButton: SettingsButton + @JsName("DeviceStorage") + val deviceStorage: DeviceStorage + + @JsName("SecureStorage") + val secureStorage: SecureStorage + + internal fun onEvent(type: String, callback: () -> Unit) fun offEvent(type: String, callback: () -> Unit) diff --git a/tgbotapi.webapps/src/jsMain/kotlin/dev/inmo/tgbotapi/webapps/storage/DeviceStorage.kt b/tgbotapi.webapps/src/jsMain/kotlin/dev/inmo/tgbotapi/webapps/storage/DeviceStorage.kt new file mode 100644 index 0000000000..4e38a1fb2d --- /dev/null +++ b/tgbotapi.webapps/src/jsMain/kotlin/dev/inmo/tgbotapi/webapps/storage/DeviceStorage.kt @@ -0,0 +1,167 @@ +package dev.inmo.tgbotapi.webapps.storage + +import kotlinx.coroutines.CompletableDeferred +import kotlinx.coroutines.Deferred + +/** + * This object is used to access the device's local storage. + * + * See [https://core.telegram.org/bots/webapps#devicestorage](https://core.telegram.org/bots/webapps#devicestorage) for more information. + */ +external interface DeviceStorage { + /** + * Stores a key-value pair. + * + * @param key The key to store the value under. + * @param value The value to store. + * @param callback A callback function that is called when the operation is complete. The first argument is an error object, if any, and the second argument is a boolean indicating whether the operation was successful. + */ + fun setItem(key: String, value: String, callback: (Throwable?, Boolean?) -> Unit) + + /** + * Retrieves the value associated with a key. + * + * @param key The key to retrieve the value for. + * @param callback A callback function that is called when the operation is complete. The first argument is an error object, if any, and the second argument is the value associated with the key, or null if the key is not found. + */ + fun getItem(key: String, callback: (Throwable?, String?) -> Unit) + + /** + * Removes the key-value pair associated with a key. + * + * @param key The key to remove. + * @param callback A callback function that is called when the operation is complete. The first argument is an error object, if any, and the second argument is a boolean indicating whether the operation was successful. + */ + fun removeItem(key: String, callback: (Throwable?, Boolean?) -> Unit) + + /** + * Clears all key-value pairs from the storage. + * + * @param callback A callback function that is called when the operation is complete. The first argument is an error object, if any, and the second argument is a boolean indicating whether the operation was successful. + */ + fun clear(callback: (Throwable?, Boolean?) -> Unit) +} + +/** + * Stores a key-value pair. This function uses a [CompletableDeferred] to handle the asynchronous callback and returns a [Result] object. + * + * @param key The key to store the value under. + * @param value The value to store. + * @return A [Result] object containing the result of the operation. + */ +suspend fun DeviceStorage.setWithResult(key: String, value: String): Result { + val deferred = CompletableDeferred>() + + setItem(key, value) { error, result -> + if (error == null) { + deferred.complete(Result.success(result ?: false)) + } else { + deferred.complete(Result.failure(error)) + } + } + + return deferred.await() +} + +/** + * Retrieves the value associated with a key. This function uses a [CompletableDeferred] to handle the asynchronous callback and returns a [Result] object. + * + * @param key The key to retrieve the value for. + * @return A [Result] object containing the result of the operation. + */ +suspend fun DeviceStorage.getWithResult(key: String): Result { + val deferred = CompletableDeferred>() + + getItem(key) { error, result -> + if (error == null) { + deferred.complete(Result.success(result)) + } else { + deferred.complete(Result.failure(error)) + } + } + + return deferred.await() +} + +/** + * Removes the key-value pair associated with a key. This function uses a [CompletableDeferred] to handle the asynchronous callback and returns a [Result] object. + * + * @param key The key to remove. + * @return A [Result] object containing the result of the operation. + */ +suspend fun DeviceStorage.removeWithResult(key: String): Result { + val deferred = CompletableDeferred>() + + removeItem(key) { error, result -> + if (error == null) { + deferred.complete(Result.success(result ?: false)) + } else { + deferred.complete(Result.failure(error)) + } + } + + return deferred.await() +} + +/** + * Clears all key-value pairs from the storage. This function uses a [CompletableDeferred] to handle the asynchronous callback and returns a [Result] object. + * + * @return A [Result] object containing the result of the operation. + */ +suspend fun DeviceStorage.clearWithResult(): Result { + val deferred = CompletableDeferred>() + + clear { error, result -> + if (error == null) { + deferred.complete(Result.success(result ?: false)) + } else { + deferred.complete(Result.failure(error)) + } + } + + return deferred.await() +} + +/** + * Stores a key-value pair. This function suspends until the result is available and returns the result directly or throws an exception if an error occurred. + * + * @param key The key to store the value under. + * @param value The value to store. + * @return Boolean indicating whether the operation was successful. + * @throws Throwable If an error occurs during the operation. + */ +suspend fun DeviceStorage.setItem(key: String, value: String): Boolean { + return setWithResult(key, value).getOrThrow() +} + +/** + * Retrieves the value associated with a key. This function suspends until the result is available and returns the result directly or throws an exception if an error occurred. + * + * @param key The key to retrieve the value for. + * @return The value associated with the key, or null if the key is not found. + * @throws Throwable If an error occurs during the operation. + */ +suspend fun DeviceStorage.getItem(key: String): String? { + return getWithResult(key).getOrThrow() +} + +/** + * Removes the key-value pair associated with a key. This function suspends until the result is available and returns the result directly or throws an exception if an error occurred. + * + * @param key The key to remove. + * @return Boolean indicating whether the operation was successful. + * @throws Throwable If an error occurs during the operation. + */ +suspend fun DeviceStorage.removeItem(key: String): Boolean { + return removeWithResult(key).getOrThrow() +} + +/** + * Clears all key-value pairs from the storage. This function suspends until the result is available and returns the result directly or throws an exception if an error occurred. + * + * @return Boolean indicating whether the operation was successful. + * @throws Throwable If an error occurs during the operation. + */ +suspend fun DeviceStorage.clear(): Boolean { + return clearWithResult().getOrThrow() +} \ No newline at end of file diff --git a/tgbotapi.webapps/src/jsMain/kotlin/dev/inmo/tgbotapi/webapps/storage/SecureStorage.kt b/tgbotapi.webapps/src/jsMain/kotlin/dev/inmo/tgbotapi/webapps/storage/SecureStorage.kt new file mode 100644 index 0000000000..fb9d4e9aa6 --- /dev/null +++ b/tgbotapi.webapps/src/jsMain/kotlin/dev/inmo/tgbotapi/webapps/storage/SecureStorage.kt @@ -0,0 +1,231 @@ +package dev.inmo.tgbotapi.webapps.storage + +import dev.inmo.micro_utils.common.Either +import dev.inmo.micro_utils.common.either +import kotlinx.coroutines.CompletableDeferred + +/** + * This class provides access to the secure local storage, which is persistent and + * tied to the user's Telegram account. Data stored in secure storage is accessible + * only to the Web App that saved it. + * + * Use this storage to save sensitive data like access tokens or user preferences + * that should persist across sessions. Keep in mind that storage size is limited + * to 2 kilobytes. + * + * For non-sensitive data, consider using [DeviceStorage]. + * + * @see [https://core.telegram.org/bots/webapps#securestorage](https://core.telegram.org/bots/webapps#securestorage) + */ +external class SecureStorage { + /** + * Stores a key-value pair in secure storage. + * + * @param key The key to store the value under. + * @param value The value to store. + * @param callback A callback function that is called when the operation is complete. + * The first argument is an error object, if any, and the second argument is a boolean + * indicating whether the operation was successful. + */ + fun setItem(key: String, value: String, callback: (error: Throwable?, isSuccessful: Boolean) -> Unit) + + /** + * Retrieves the value associated with a key from secure storage. + * + * @param key The key to retrieve the value for. + * @param callback A callback function that is called when the operation is complete. + * The first argument is an error object, if any, the second argument is the value + * associated with the key, or null if the key is not found, and the third argument + * indicates whether the value can be restored. + */ + fun getItem(key: String, callback: (error: Throwable?, value: String?, canBeRestored: Boolean?) -> Unit) + + /** + * Restores the value associated with a key in secure storage. This is useful if the + * value was previously removed using [removeItem] and needs to be retrieved again. + * Note that restoring a value is only possible if it hasn't been overwritten + * by a new value for the same key. + * + * @param key The key to restore the value for. + * @param callback A callback function that is called when the operation is complete. + * The first argument is an error object, if any, and the second argument is the restored + * value, or null if the key is not found or cannot be restored. + */ + fun restoreItem(key: String, callback: (error: Throwable?, value: String?) -> Unit) + + /** + * Removes the key-value pair associated with a key from secure storage. + * + * @param key The key to remove. + * @param callback A callback function that is called when the operation is complete. + * The first argument is an error object, if any, and the second argument is a boolean + * indicating whether the operation was successful. + */ + fun removeItem(key: String, callback: (error: Throwable?, isSuccessful: Boolean) -> Unit) + + /** + * Clears all key-value pairs from the secure storage. + * + * @param callback A callback function that is called when the operation is complete. + * The first argument is an error object, if any, and the second argument is a boolean + * indicating whether the operation was successful. + */ + fun clear(callback: (error: Throwable?, isSuccessful: Boolean) -> Unit) +} + +/** + * Stores a key-value pair in secure storage using a [CompletableDeferred] and returns a [Result]. + * + * @param key The key to store the value under. + * @param value The value to store. + * @return A [Result] object containing the result of the operation. + */ +suspend fun SecureStorage.setWithResult(key: String, value: String): Result { + val deferred = CompletableDeferred>() + setItem(key, value) { error, isSuccessful -> + if (error == null) { + deferred.complete(Result.success(isSuccessful)) + } else { + deferred.complete(Result.failure(error)) + } + } + return deferred.await() +} + +/** + * Retrieves the value associated with a key from secure storage using a [CompletableDeferred] and returns a [Result]. + * This suspending function encapsulates the asynchronous operation of retrieving a value + * and provides a structured way to handle both successful retrieval and potential errors. + * It uses a [CompletableDeferred] to manage the asynchronous result. + * + * @param key The key to retrieve the value for. + * @return A [Result] object containing the retrieved value (which can be null if the key is not found) + * or a [Throwable] representing the error that occurred. + */ +suspend fun SecureStorage.getWithResult(key: String): Result> { + val deferred = CompletableDeferred>>() + getItem(key) { error, value, canBeRestored -> + when { + error != null -> deferred.complete(Result.failure(error)) + value != null -> deferred.complete(Result.success(value.either())) + else -> deferred.complete(Result.success((canBeRestored == true).either())) + } + } + return deferred.await() +} + +/** + * Restores the value associated with a key in secure storage using a [CompletableDeferred] and returns a [Result]. + * + * @param key The key to restore the value for. + * @return A [Result] object containing the result of the operation. + */ +suspend fun SecureStorage.restoreWithResult(key: String): Result { + val deferred = CompletableDeferred>() + restoreItem(key) { error, value -> + if (error == null) { + deferred.complete(Result.success(value)) + } else { + deferred.complete(Result.failure(error)) + } + } + return deferred.await() +} + +/** + * Removes the key-value pair associated with a key from secure storage using a [CompletableDeferred] and returns a [Result]. + * + * @param key The key to remove. + * @return A [Result] object containing the result of the operation. + */ +suspend fun SecureStorage.removeWithResult(key: String): Result { + val deferred = CompletableDeferred>() + removeItem(key) { error, isSuccessful -> + if (error == null) { + deferred.complete(Result.success(isSuccessful)) + } else { + deferred.complete(Result.failure(error)) + } + } + return deferred.await() +} + +/** + * Clears all key-value pairs from the secure storage using a [CompletableDeferred] and returns a [Result]. + * + * @return A [Result] object containing the result of the operation. + */ +suspend fun SecureStorage.clearWithResult(): Result { + val deferred = CompletableDeferred>() + clear { error, isSuccessful -> + if (error == null) { + deferred.complete(Result.success(isSuccessful)) + } else { + deferred.complete(Result.failure(error)) + } + } + return deferred.await() +} + +/** + * Stores a key-value pair in secure storage. This suspending function handles the result directly + * and throws an exception if an error occurs. + * + * @param key The key to store the value under. + * @param value The value to store. + * @return True if the operation was successful. + * @throws Throwable If an error occurs during the operation. + */ +suspend fun SecureStorage.setItem(key: String, value: String): Boolean { + return setWithResult(key, value).getOrThrow() +} +/** + * Retrieves the value associated with a key from secure storage. This function uses a callback-based approach + * for handling the asynchronous result of the operation. + * + * @param key The key to retrieve the value for. + * @param callback A callback function that is called when the operation is complete. + * The first argument is an error object (a [Throwable] if an error occurred, or null otherwise), + * the second argument is the retrieved value (a [String] or null if the key is not found), + * and the third argument is a boolean indicating whether the value can be restored + * (useful if the value was previously removed and might be restorable). + */ + +suspend fun SecureStorage.getItem(key: String): Either { + return getWithResult(key).getOrThrow() +} + +/** + * Restores the value associated with a key in secure storage. This suspending function handles + * the result directly and throws an exception if an error occurs. + * + * @param key The key to restore the value for. + * @return The restored value, or null if the key is not found or cannot be restored. + * @throws Throwable If an error occurs during the operation. + */ +suspend fun SecureStorage.restoreItem(key: String): String? { + return restoreWithResult(key).getOrThrow() +} + +/** + * Removes the key-value pair associated with a key from secure storage. + * This suspending function handles the result directly and throws an exception if an error occurs. + * + * @param key The key to remove. + * @return True if the operation was successful. + * @throws Throwable If an error occurs during the operation. + */ +suspend fun SecureStorage.removeItem(key: String): Boolean { + return removeWithResult(key).getOrThrow() +} + +/** + * Clears all key-value pairs from secure storage. This suspending function handles the result + * directly and throws an exception if an error occurs. + * + * @return True if the operation was successful. + * @throws Throwable If an error occurs during the operation. + */ +suspend fun SecureStorage.clear(): Boolean { + return clearWithResult().getOrThrow() +} \ No newline at end of file From 29c6bb5dac0ff2db8a81ce37c1feb8a859875b8a Mon Sep 17 00:00:00 2001 From: bpavuk <75901693+bpavuk@users.noreply.github.com> Date: Thu, 17 Apr 2025 17:27:34 +0300 Subject: [PATCH 28/36] fix: made entities field optional for GiftInfo --- .../commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/GiftInfo.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/GiftInfo.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/GiftInfo.kt index b0c77d8d38..9f413c1bc8 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/GiftInfo.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/GiftInfo.kt @@ -24,7 +24,7 @@ data class GiftInfo private constructor( @SerialName(textField) val text: String? = null, @SerialName(entitiesField) - val entities: RawMessageEntities, + val entities: RawMessageEntities = emptyList(), @SerialName(isPrivateField) val isPrivate: Boolean = false ) { From 09dee188d2b0bbbe625aff16654cbe0e009f091e Mon Sep 17 00:00:00 2001 From: bpavuk <75901693+bpavuk@users.noreply.github.com> Date: Thu, 17 Apr 2025 17:38:16 +0300 Subject: [PATCH 29/36] refactor: merged GiftInfo and UniqueGiftInfo into one sealed interface --- .../dev/inmo/tgbotapi/types/gifts/GiftInfo.kt | 97 +++++++++++-------- .../tgbotapi/types/gifts/UniqueGiftInfo.kt | 17 ---- 2 files changed, 57 insertions(+), 57 deletions(-) delete mode 100644 tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftInfo.kt diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/GiftInfo.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/GiftInfo.kt index 9f413c1bc8..64a3966406 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/GiftInfo.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/GiftInfo.kt @@ -10,45 +10,62 @@ import kotlin.jvm.JvmName @Serializable -data class GiftInfo private constructor( - @SerialName(giftField) - val gift: Gift, - @SerialName(ownedGiftIdField) - val ownedGiftId: GiftId? = null, - @SerialName(convertStarCountField) - val convertStarCount: Int? = null, - @SerialName(prepaidUpgradeStarCountField) - val prepaidUpgradeStarCount: Int? = null, - @SerialName(canBeUpgradedField) - val canBeUpgraded: Boolean = false, - @SerialName(textField) - val text: String? = null, - @SerialName(entitiesField) - val entities: RawMessageEntities = emptyList(), - @SerialName(isPrivateField) - val isPrivate: Boolean = false -) { - companion object { - @JvmName("PublicConstructor") - operator fun invoke( - gift: Gift, - ownedGiftId: GiftId? = null, - convertStarCount: Int? = null, - prepaidUpgradeStarCount: Int? = null, - canBeUpgraded: Boolean = false, - text: String? = null, - textSources: TextSourcesList = emptyList(), - position: Int, - isPrivate: Boolean = false - ) = GiftInfo( - gift, - ownedGiftId, - convertStarCount, - prepaidUpgradeStarCount, - canBeUpgraded, - text, - textSources.toRawMessageEntities(position), - isPrivate - ) +sealed interface GiftInfo { + val ownedGiftId: GiftId? + + @Serializable + data class Regular( + @SerialName(giftField) + val gift: Gift, + @SerialName(ownedGiftIdField) + override val ownedGiftId: GiftId? = null, + @SerialName(convertStarCountField) + val convertStarCount: Int? = null, + @SerialName(prepaidUpgradeStarCountField) + val prepaidUpgradeStarCount: Int? = null, + @SerialName(canBeUpgradedField) + val canBeUpgraded: Boolean = false, + @SerialName(textField) + val text: String? = null, + @SerialName(entitiesField) + val entities: RawMessageEntities = emptyList(), + @SerialName(isPrivateField) + val isPrivate: Boolean = false + ) : GiftInfo { + companion object { + @JvmName("PublicConstructor") + operator fun invoke( + gift: Gift, + ownedGiftId: GiftId? = null, + convertStarCount: Int? = null, + prepaidUpgradeStarCount: Int? = null, + canBeUpgraded: Boolean = false, + text: String? = null, + textSources: TextSourcesList = emptyList(), + position: Int, + isPrivate: Boolean = false + ) = Regular( + gift, + ownedGiftId, + convertStarCount, + prepaidUpgradeStarCount, + canBeUpgraded, + text, + textSources.toRawMessageEntities(position), + isPrivate + ) + } } + + @Serializable + data class Unique( + @SerialName(giftField) + val gift: UniqueGift, + @SerialName(originField) + val origin: String? = null, + @SerialName(ownedGiftIdField) + override val ownedGiftId: GiftId? = null, + @SerialName(transferStarCountField) + val transferStarCount: Int? = null + ): GiftInfo } diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftInfo.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftInfo.kt deleted file mode 100644 index ae68159dd5..0000000000 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftInfo.kt +++ /dev/null @@ -1,17 +0,0 @@ -package dev.inmo.tgbotapi.types.gifts - -import dev.inmo.tgbotapi.types.* -import kotlinx.serialization.SerialName -import kotlinx.serialization.Serializable - -@Serializable -data class UniqueGiftInfo( - @SerialName(giftField) - val gift: UniqueGift, - @SerialName(originField) - val origin: String? = null, - @SerialName(ownedGiftIdField) - val ownedGiftId: GiftId? = null, - @SerialName(transferStarCountField) - val transferStarCount: Int? = null -) From 93e937aa6a94849aa7fc81e8eb89f3c08a307231 Mon Sep 17 00:00:00 2001 From: bpavuk <75901693+bpavuk@users.noreply.github.com> Date: Thu, 17 Apr 2025 18:16:52 +0300 Subject: [PATCH 30/36] refactor: merged UniqueGift and regular Gift types into one interface --- .../dev/inmo/tgbotapi/types/gifts/Gift.kt | 200 ++++++++++++------ .../dev/inmo/tgbotapi/types/gifts/GiftInfo.kt | 7 +- .../inmo/tgbotapi/types/gifts/UniqueGift.kt | 22 -- 3 files changed, 145 insertions(+), 84 deletions(-) delete mode 100644 tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGift.kt diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/Gift.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/Gift.kt index cdf71fd8e5..685bfb3303 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/Gift.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/Gift.kt @@ -11,55 +11,133 @@ import kotlinx.serialization.encoding.Encoder @Serializable(Gift.Companion::class) sealed interface Gift { - val id: GiftId - val sticker: Sticker - val starCount: Int - val totalCount: Int? - val upgradeStarCount: Int? - val remainingCount: Int? + @Serializable(Regular.Companion::class) + sealed interface Regular : Gift { + val id: GiftId + val sticker: Sticker + val starCount: Int + val totalCount: Int? + val upgradeStarCount: Int? + val remainingCount: Int? - @Serializable - data class Unlimited( - @SerialName(idField) - override val id: GiftId, - @SerialName(stickerField) - override val sticker: Sticker, - @SerialName(starCountField) - override val starCount: Int, - @SerialName(upgradeStarCountField) - override val upgradeStarCount: Int? = null - ) : Gift { - override val totalCount: Int? - get() = null - override val remainingCount: Int? - get() = null + @Serializable + data class Unlimited( + @SerialName(idField) + override val id: GiftId, + @SerialName(stickerField) + override val sticker: Sticker, + @SerialName(starCountField) + override val starCount: Int, + @SerialName(upgradeStarCountField) + override val upgradeStarCount: Int? = null + ) : Regular { + override val totalCount: Int? + get() = null + override val remainingCount: Int? + get() = null + } + + @Serializable + data class Limited( + @SerialName(idField) + override val id: GiftId, + @SerialName(stickerField) + override val sticker: Sticker, + @SerialName(starCountField) + override val starCount: Int, + @SerialName(totalCountField) + override val totalCount: Int, + @SerialName(remainingCountField) + override val remainingCount: Int, + @SerialName(upgradeStarCountField) + override val upgradeStarCount: Int? = null, + ) : Regular + + companion object : KSerializer { + @Serializable + @Suppress("propertyName") + private data class RegularGiftSurrogate( + val id: GiftId, + val sticker: Sticker, + val star_count: Int, + val total_count: Int? = null, + val remaining_count: Int? = null, + val upgrade_star_count: Int? = null, + ) + + override val descriptor: SerialDescriptor + get() = RegularGiftSurrogate.serializer().descriptor + + override fun deserialize(decoder: Decoder): Regular { + val surrogate = RegularGiftSurrogate.serializer().deserialize(decoder) + + return if (surrogate.total_count != null && surrogate.remaining_count != null) { + Limited( + id = surrogate.id, + sticker = surrogate.sticker, + starCount = surrogate.star_count, + totalCount = surrogate.total_count, + remainingCount = surrogate.remaining_count, + upgradeStarCount = surrogate.upgrade_star_count, + ) + } else { + Unlimited( + id = surrogate.id, + sticker = surrogate.sticker, + starCount = surrogate.star_count, + upgradeStarCount = surrogate.upgrade_star_count, + ) + } + } + + override fun serialize(encoder: Encoder, value: Regular) { + val surrogate = RegularGiftSurrogate( + id = value.id, + sticker = value.sticker, + star_count = value.starCount, + total_count = value.totalCount, + remaining_count = value.remainingCount, + upgrade_star_count = value.upgradeStarCount + ) + RegularGiftSurrogate.serializer().serialize(encoder, surrogate) + } + } } @Serializable - data class Limited( - @SerialName(idField) - override val id: GiftId, - @SerialName(stickerField) - override val sticker: Sticker, - @SerialName(starCountField) - override val starCount: Int, - @SerialName(totalCountField) - override val totalCount: Int, - @SerialName(remainingCountField) - override val remainingCount: Int, - @SerialName(upgradeStarCountField) - override val upgradeStarCount: Int? = null, + data class Unique( + @SerialName(baseNameField) + val baseName: String, + @SerialName(nameField) + val name: String, + @SerialName(numberField) + val number: Int, + @SerialName(modelField) + val model: UniqueGiftModel, + @SerialName(symbolField) + val symbol: UniqueGiftSymbol, + @SerialName(backdropField) + val backdrop: UniqueGiftBackdrop ) : Gift companion object : KSerializer { @Serializable - private data class GiftSurrogate( - val id: GiftId, - val sticker: Sticker, - val star_count: Int, + @Suppress("unused", "propertyName") + private class GiftSurrogate( + // regular gift fields + val id: GiftId?, + val sticker: Sticker?, + val star_count: Int?, val total_count: Int? = null, val remaining_count: Int? = null, val upgrade_star_count: Int? = null, + // unique gift fields + val base_name: String? = null, + val name: String? = null, + val number: Int? = null, + val model: UniqueGiftModel? = null, + val symbol: UniqueGiftSymbol? = null, + val backdrop: UniqueGiftBackdrop? = null, ) override val descriptor: SerialDescriptor @@ -68,33 +146,37 @@ sealed interface Gift { override fun deserialize(decoder: Decoder): Gift { val surrogate = GiftSurrogate.serializer().deserialize(decoder) - return if (surrogate.total_count != null && surrogate.remaining_count != null) { - Limited( - id = surrogate.id, - sticker = surrogate.sticker, - starCount = surrogate.star_count, - totalCount = surrogate.total_count, - remainingCount = surrogate.remaining_count, - upgradeStarCount = surrogate.upgrade_star_count, + return if (surrogate.base_name != null && surrogate.name != null && surrogate.number != null && surrogate.model != null && surrogate.symbol != null && surrogate.backdrop != null) { + Unique( + baseName = surrogate.base_name, + name = surrogate.name, + number = surrogate.number, + model = surrogate.model, + symbol = surrogate.symbol, + backdrop = surrogate.backdrop, ) } else { - Unlimited( - id = surrogate.id, - sticker = surrogate.sticker, - starCount = surrogate.star_count, - upgradeStarCount = surrogate.upgrade_star_count, - ) + decoder.decodeSerializableValue(Regular.serializer()) } } - override fun serialize(encoder: Encoder, value: Gift) { + override fun serialize( + encoder: Encoder, + value: Gift + ) { val surrogate = GiftSurrogate( - id = value.id, - sticker = value.sticker, - star_count = value.starCount, - total_count = value.totalCount, - remaining_count = value.remainingCount, - upgrade_star_count = value.upgradeStarCount + id = (value as? Regular)?.id, + sticker = (value as? Regular)?.sticker, + star_count = (value as? Regular)?.starCount, + total_count = (value as? Regular.Limited)?.totalCount, + remaining_count = (value as? Regular.Limited)?.remainingCount, + upgrade_star_count = (value as? Regular)?.upgradeStarCount, + base_name = (value as? Unique)?.baseName, + name = (value as? Unique)?.name, + number = (value as? Unique)?.number, + model = (value as? Unique)?.model, + symbol = (value as? Unique)?.symbol, + backdrop = (value as? Unique)?.backdrop, ) GiftSurrogate.serializer().serialize(encoder, surrogate) } diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/GiftInfo.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/GiftInfo.kt index 64a3966406..676a179281 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/GiftInfo.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/GiftInfo.kt @@ -12,11 +12,12 @@ import kotlin.jvm.JvmName @Serializable sealed interface GiftInfo { val ownedGiftId: GiftId? + val gift: Gift @Serializable data class Regular( @SerialName(giftField) - val gift: Gift, + override val gift: Gift.Regular, @SerialName(ownedGiftIdField) override val ownedGiftId: GiftId? = null, @SerialName(convertStarCountField) @@ -35,7 +36,7 @@ sealed interface GiftInfo { companion object { @JvmName("PublicConstructor") operator fun invoke( - gift: Gift, + gift: Gift.Regular, ownedGiftId: GiftId? = null, convertStarCount: Int? = null, prepaidUpgradeStarCount: Int? = null, @@ -60,7 +61,7 @@ sealed interface GiftInfo { @Serializable data class Unique( @SerialName(giftField) - val gift: UniqueGift, + override val gift: Gift.Unique, @SerialName(originField) val origin: String? = null, @SerialName(ownedGiftIdField) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGift.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGift.kt deleted file mode 100644 index 30f30c7e6e..0000000000 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGift.kt +++ /dev/null @@ -1,22 +0,0 @@ -package dev.inmo.tgbotapi.types.gifts - -import dev.inmo.tgbotapi.types.* -import kotlinx.serialization.SerialName -import kotlinx.serialization.Serializable - - -@Serializable -data class UniqueGift( - @SerialName(baseNameField) - val baseName: String, - @SerialName(nameField) - val name: String, - @SerialName(numberField) - val number: Int, - @SerialName(modelField) - val model: UniqueGiftModel, - @SerialName(symbolField) - val symbol: UniqueGiftSymbol, - @SerialName(backdropField) - val backdrop: UniqueGiftBackdrop -) From 67fb552d0174ea5eb34c4e302e89dd82c75f9797 Mon Sep 17 00:00:00 2001 From: bpavuk <75901693+bpavuk@users.noreply.github.com> Date: Thu, 17 Apr 2025 18:18:17 +0300 Subject: [PATCH 31/36] refactor: moved unique gift properties into separate package --- .../commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/Gift.kt | 3 +++ .../tgbotapi/types/gifts/{ => unique}/UniqueGiftBackdrop.kt | 2 +- .../types/gifts/{ => unique}/UniqueGiftBackdropColors.kt | 2 +- .../inmo/tgbotapi/types/gifts/{ => unique}/UniqueGiftModel.kt | 2 +- .../inmo/tgbotapi/types/gifts/{ => unique}/UniqueGiftSymbol.kt | 2 +- 5 files changed, 7 insertions(+), 4 deletions(-) rename tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/{ => unique}/UniqueGiftBackdrop.kt (90%) rename tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/{ => unique}/UniqueGiftBackdropColors.kt (93%) rename tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/{ => unique}/UniqueGiftModel.kt (91%) rename tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/{ => unique}/UniqueGiftSymbol.kt (91%) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/Gift.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/Gift.kt index 685bfb3303..3ff24910ed 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/Gift.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/Gift.kt @@ -2,6 +2,9 @@ package dev.inmo.tgbotapi.types.gifts import dev.inmo.tgbotapi.types.* import dev.inmo.tgbotapi.types.files.Sticker +import dev.inmo.tgbotapi.types.gifts.unique.UniqueGiftBackdrop +import dev.inmo.tgbotapi.types.gifts.unique.UniqueGiftModel +import dev.inmo.tgbotapi.types.gifts.unique.UniqueGiftSymbol import kotlinx.serialization.KSerializer import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftBackdrop.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/unique/UniqueGiftBackdrop.kt similarity index 90% rename from tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftBackdrop.kt rename to tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/unique/UniqueGiftBackdrop.kt index 22bd75b826..2cf5b14930 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftBackdrop.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/unique/UniqueGiftBackdrop.kt @@ -1,4 +1,4 @@ -package dev.inmo.tgbotapi.types.gifts +package dev.inmo.tgbotapi.types.gifts.unique import dev.inmo.tgbotapi.types.colorsField import dev.inmo.tgbotapi.types.nameField diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftBackdropColors.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/unique/UniqueGiftBackdropColors.kt similarity index 93% rename from tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftBackdropColors.kt rename to tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/unique/UniqueGiftBackdropColors.kt index fac98b28ed..d2acfdb353 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftBackdropColors.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/unique/UniqueGiftBackdropColors.kt @@ -1,4 +1,4 @@ -package dev.inmo.tgbotapi.types.gifts +package dev.inmo.tgbotapi.types.gifts.unique import dev.inmo.tgbotapi.types.centerColorField import dev.inmo.tgbotapi.types.edgeColorField diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftModel.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/unique/UniqueGiftModel.kt similarity index 91% rename from tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftModel.kt rename to tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/unique/UniqueGiftModel.kt index 2f95e03a30..28e3820c57 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftModel.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/unique/UniqueGiftModel.kt @@ -1,4 +1,4 @@ -package dev.inmo.tgbotapi.types.gifts +package dev.inmo.tgbotapi.types.gifts.unique import dev.inmo.tgbotapi.types.files.Sticker import dev.inmo.tgbotapi.types.nameField diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftSymbol.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/unique/UniqueGiftSymbol.kt similarity index 91% rename from tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftSymbol.kt rename to tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/unique/UniqueGiftSymbol.kt index 3ce903732c..0c322ee19b 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/UniqueGiftSymbol.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/unique/UniqueGiftSymbol.kt @@ -1,4 +1,4 @@ -package dev.inmo.tgbotapi.types.gifts +package dev.inmo.tgbotapi.types.gifts.unique import dev.inmo.tgbotapi.types.files.Sticker import dev.inmo.tgbotapi.types.nameField From 8d6d70a06a2a5f79aef7741a4d74bc01d95df368 Mon Sep 17 00:00:00 2001 From: bpavuk <75901693+bpavuk@users.noreply.github.com> Date: Thu, 17 Apr 2025 18:31:56 +0300 Subject: [PATCH 32/36] refactor: replaced `Gift` with `Gift.Regular` across APIs and data models --- .../dev/inmo/tgbotapi/extensions/api/gifts/SendGift.kt | 8 ++++---- .../extensions/api/gifts/SendGiftGeneratedVariation.kt | 8 ++++---- .../api/gifts/SendGiftToChatGeneratedVariation.kt | 8 ++++---- .../kotlin/dev/inmo/tgbotapi/types/gifts/Gifts.kt | 2 +- .../tgbotapi/types/payments/stars/TransactionPartner.kt | 6 +++--- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/gifts/SendGift.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/gifts/SendGift.kt index bdce832604..74670ce2bc 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/gifts/SendGift.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/gifts/SendGift.kt @@ -22,7 +22,7 @@ public suspend fun TelegramBot.sendGift( ) userId: UserId, @GenerationVariant( - Gift::class, + Gift.Regular::class, "id", "gift" ) @@ -49,7 +49,7 @@ public suspend fun TelegramBot.sendGiftToChat( ) chatId: ChatIdentifier, @GenerationVariant( - Gift::class, + Gift.Regular::class, "id", "gift" ) @@ -76,7 +76,7 @@ public suspend fun TelegramBot.sendGift( ) userId: UserId, @GenerationVariant( - Gift::class, + Gift.Regular::class, "id", "gift" ) @@ -101,7 +101,7 @@ public suspend fun TelegramBot.sendGiftToChat( ) chatId: ChatIdentifier, @GenerationVariant( - Gift::class, + Gift.Regular::class, "id", "gift" ) diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/gifts/SendGiftGeneratedVariation.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/gifts/SendGiftGeneratedVariation.kt index 9340e8ef2d..c9aedeaa49 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/gifts/SendGiftGeneratedVariation.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/gifts/SendGiftGeneratedVariation.kt @@ -34,7 +34,7 @@ public suspend fun TelegramBot.sendGift( public suspend fun TelegramBot.sendGift( userId: UserId, - gift: Gift, + gift: Gift.Regular, text: String, parseMode: ParseMode?, ): Boolean = sendGift( @@ -43,7 +43,7 @@ public suspend fun TelegramBot.sendGift( public suspend fun TelegramBot.sendGift( userId: UserId, - gift: Gift, + gift: Gift.Regular, text: String, parseMode: ParseMode?, upgradableToUnique: Boolean, @@ -54,7 +54,7 @@ public suspend fun TelegramBot.sendGift( public suspend fun TelegramBot.sendGift( user: User, - gift: Gift, + gift: Gift.Regular, text: String, parseMode: ParseMode?, ): Boolean = sendGift( @@ -63,7 +63,7 @@ public suspend fun TelegramBot.sendGift( public suspend fun TelegramBot.sendGift( user: User, - gift: Gift, + gift: Gift.Regular, text: String, parseMode: ParseMode?, upgradableToUnique: Boolean, diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/gifts/SendGiftToChatGeneratedVariation.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/gifts/SendGiftToChatGeneratedVariation.kt index 9761fdd0fd..17028861d1 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/gifts/SendGiftToChatGeneratedVariation.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/gifts/SendGiftToChatGeneratedVariation.kt @@ -34,7 +34,7 @@ public suspend fun TelegramBot.sendGiftToChat( public suspend fun TelegramBot.sendGiftToChat( chatId: ChatIdentifier, - gift: Gift, + gift: Gift.Regular, text: String, parseMode: ParseMode?, ): Boolean = sendGiftToChat( @@ -43,7 +43,7 @@ public suspend fun TelegramBot.sendGiftToChat( public suspend fun TelegramBot.sendGiftToChat( chatId: ChatIdentifier, - gift: Gift, + gift: Gift.Regular, text: String, parseMode: ParseMode?, upgradableToUnique: Boolean, @@ -54,7 +54,7 @@ public suspend fun TelegramBot.sendGiftToChat( public suspend fun TelegramBot.sendGiftToChat( chat: PublicChat, - gift: Gift, + gift: Gift.Regular, text: String, parseMode: ParseMode?, ): Boolean = sendGiftToChat( @@ -63,7 +63,7 @@ public suspend fun TelegramBot.sendGiftToChat( public suspend fun TelegramBot.sendGiftToChat( chat: PublicChat, - gift: Gift, + gift: Gift.Regular, text: String, parseMode: ParseMode?, upgradableToUnique: Boolean, diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/Gifts.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/Gifts.kt index 07ae5c6fd1..e403a48d25 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/Gifts.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/Gifts.kt @@ -7,5 +7,5 @@ import kotlinx.serialization.Serializable @Serializable data class Gifts( @SerialName(giftsField) - val gifts: List + val gifts: List ) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/payments/stars/TransactionPartner.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/payments/stars/TransactionPartner.kt index d9dfe04f4c..ea7263dae4 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/payments/stars/TransactionPartner.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/payments/stars/TransactionPartner.kt @@ -60,7 +60,7 @@ sealed interface TransactionPartner { @SerialName(paidMediaPayloadField) val paidMediaPayload: PaidMediaPayload? = null, @SerialName(giftField) - val gift: Gift? = null + val gift: Gift.Regular? = null ) : TransactionPartner, SubscriptionPeriodInfo { @EncodeDefault override val type: String = Companion.type @@ -75,7 +75,7 @@ sealed interface TransactionPartner { @SerialName(chatField) val chat: PreviewChat, @SerialName(giftField) - val gift: Gift? = null + val gift: Gift.Regular? = null ) : TransactionPartner { @EncodeDefault override val type: String = Companion.type @@ -150,7 +150,7 @@ sealed interface TransactionPartner { val subscription_period: TimeSpan? = null, val paid_media: List? = null, val paid_media_payload: PaidMediaPayload? = null, - val gift: Gift? = null, + val gift: Gift.Regular? = null, val request_count: Int? = null, val sponsor_user: PreviewBot? = null, val commission_per_mille: Int? = null, From 341a527d275272ee84c7a4ca976fd588c5d8b706 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sat, 19 Apr 2025 12:56:10 +0600 Subject: [PATCH 33/36] add support of paid messages --- .../expectations/WaitEventAction.kt | 6 + .../expectations/WaitEventActionMessages.kt | 6 + .../triggers_handling/EventTriggers.kt | 23 +++ .../kotlin/dev/inmo/tgbotapi/types/Common.kt | 3 + .../tgbotapi/types/PaidMessagePriceChanged.kt | 11 ++ .../message/BusinessContentMessageImpl.kt | 3 + .../message/ChannelContentMessageImpl.kt | 3 + .../tgbotapi/types/message/GroupMessages.kt | 135 +++++++++++++++++- .../message/PrivateContentMessageImpl.kt | 5 +- .../inmo/tgbotapi/types/message/RawMessage.kt | 59 +++++--- .../types/message/abstracts/CommonMessage.kt | 1 + .../message/abstracts/PossiblyPaidMessage.kt | 5 + .../MediaGroupContentMessageCreator.kt | 30 ++-- 13 files changed, 252 insertions(+), 38 deletions(-) create mode 100644 tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/PaidMessagePriceChanged.kt create mode 100644 tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/abstracts/PossiblyPaidMessage.kt diff --git a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitEventAction.kt b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitEventAction.kt index 5c8f9135f5..73a4e0095e 100644 --- a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitEventAction.kt +++ b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitEventAction.kt @@ -5,6 +5,7 @@ package dev.inmo.tgbotapi.extensions.behaviour_builder.expectations import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext import dev.inmo.tgbotapi.extensions.utils.* import dev.inmo.tgbotapi.requests.abstracts.Request +import dev.inmo.tgbotapi.types.PaidMessagePriceChanged import dev.inmo.tgbotapi.types.chat.ChatBackground import dev.inmo.tgbotapi.types.giveaway.GiveawayCreated import dev.inmo.tgbotapi.types.giveaway.GiveawayPrivateResults @@ -248,3 +249,8 @@ suspend fun BehaviourContext.waitGiveawayCompletedWithPrivateWinners( initRequest: Request<*>? = null, errorFactory: NullableRequestBuilder<*> = { null } ) = waitGiveawayCompleted(initRequest, errorFactory) + +suspend fun BehaviourContext.waitPaidMessagePriceChanged( + initRequest: Request<*>? = null, + errorFactory: NullableRequestBuilder<*> = { null } +) = waitEvents(initRequest, errorFactory) diff --git a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitEventActionMessages.kt b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitEventActionMessages.kt index 9756b2017f..0d23f53a78 100644 --- a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitEventActionMessages.kt +++ b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitEventActionMessages.kt @@ -5,6 +5,7 @@ package dev.inmo.tgbotapi.extensions.behaviour_builder.expectations import dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContext import dev.inmo.tgbotapi.extensions.utils.* import dev.inmo.tgbotapi.requests.abstracts.Request +import dev.inmo.tgbotapi.types.PaidMessagePriceChanged import dev.inmo.tgbotapi.types.chat.ChatBackground import dev.inmo.tgbotapi.types.message.ChatEvents.* import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.* @@ -224,3 +225,8 @@ suspend fun BehaviourContext.waitChatBackgroundSetEventsMessages( initRequest: Request<*>? = null, errorFactory: NullableRequestBuilder<*> = { null } ) = waitEventsMessages(initRequest, errorFactory) + +suspend fun BehaviourContext.waitPaidMessagePriceChangedMessages( + initRequest: Request<*>? = null, + errorFactory: NullableRequestBuilder<*> = { null } +) = waitEventsMessages(initRequest, errorFactory) diff --git a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/EventTriggers.kt b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/EventTriggers.kt index c7bda994d7..c5ae3cf425 100644 --- a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/EventTriggers.kt +++ b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/EventTriggers.kt @@ -10,6 +10,7 @@ import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.marker_factories.Mar import dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times import dev.inmo.tgbotapi.extensions.utils.baseSentMessageUpdateOrNull import dev.inmo.tgbotapi.extensions.utils.chatEventMessageOrNull +import dev.inmo.tgbotapi.types.PaidMessagePriceChanged import dev.inmo.tgbotapi.types.chat.ChatBackground import dev.inmo.tgbotapi.types.giveaway.GiveawayCreated import dev.inmo.tgbotapi.types.giveaway.GiveawayPrivateResults @@ -1045,3 +1046,25 @@ suspend fun BC.onGiveawayCompletedWithPrivateWinners( additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver>? = null, scenarioReceiver: CustomBehaviourContextAndTypeReceiver> ) = onGiveawayCompleted(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) + + +/** + * @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call + * @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example, + * this filter will be used if you will call [dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitContentMessage]. + * Use [dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver] function to create your own. + * Use [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.plus] or [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times] + * to combinate several filters + * @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream". + * [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for + * "stream" + * @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that + * data + */ +suspend fun BC.onPaidMessagePriceChanged( + initialFilter: SimpleFilter>? = null, + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update>? = MessageFilterByChat, + markerFactory: MarkerFactory, Any>? = ByChatMessageMarkerFactory, + additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver>? = null, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver> +) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt index 5ed47f6f00..bd92cfd9fb 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/Common.kt @@ -604,6 +604,9 @@ const val mediaField = "media" const val mainFrameTimestampField = "main_frame_timestamp" +const val paidMessageStarCountField = "paid_message_star_count" +const val paidStarCountField = "paid_star_count" + const val disableEditMessageField = "disable_edit_message" const val scoreField = "score" const val forceField = "force" diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/PaidMessagePriceChanged.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/PaidMessagePriceChanged.kt new file mode 100644 index 0000000000..937698541f --- /dev/null +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/PaidMessagePriceChanged.kt @@ -0,0 +1,11 @@ +package dev.inmo.tgbotapi.types + +import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.CommonEvent +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable + +@Serializable +data class PaidMessagePriceChanged( + @SerialName(paidMessageStarCountField) + val cost: Int +) : CommonEvent diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/BusinessContentMessageImpl.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/BusinessContentMessageImpl.kt index aca2ca5651..ffb9b2e31f 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/BusinessContentMessageImpl.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/BusinessContentMessageImpl.kt @@ -11,6 +11,7 @@ import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage import dev.inmo.tgbotapi.types.message.abstracts.BusinessContentMessage import dev.inmo.tgbotapi.types.message.abstracts.PrivateContentMessage import dev.inmo.tgbotapi.types.message.content.MessageContent +import kotlinx.serialization.SerialName data class BusinessContentMessageImpl( override val messageId: MessageId, @@ -28,6 +29,8 @@ data class BusinessContentMessageImpl( override val mediaGroupId: MediaGroupId?, override val senderBusinessBot: PreviewBot?, override val fromOffline: Boolean, + @SerialName(paidMessageStarCountField) + override val cost: Int? = null, ) : BusinessContentMessage { constructor( messageId: MessageId, diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ChannelContentMessageImpl.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ChannelContentMessageImpl.kt index 9e845ebf7d..08df25df6a 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ChannelContentMessageImpl.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ChannelContentMessageImpl.kt @@ -9,6 +9,7 @@ import dev.inmo.tgbotapi.types.chat.PreviewChat import dev.inmo.tgbotapi.types.chat.User import dev.inmo.tgbotapi.types.message.abstracts.* import dev.inmo.tgbotapi.types.message.content.MessageContent +import kotlinx.serialization.SerialName data class ChannelContentMessageImpl( override val messageId: MessageId, @@ -25,6 +26,8 @@ data class ChannelContentMessageImpl( override val authorSignature: AuthorSignature?, override val mediaGroupId: MediaGroupId?, override val fromOffline: Boolean, + @SerialName(paidMessageStarCountField) + override val cost: Int? = null, ) : ChannelContentMessage { constructor( messageId: MessageId, diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/GroupMessages.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/GroupMessages.kt index 614e6c2e8f..4da9065c32 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/GroupMessages.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/GroupMessages.kt @@ -8,6 +8,7 @@ import dev.inmo.tgbotapi.types.chat.CommonBot import dev.inmo.tgbotapi.types.chat.User import dev.inmo.tgbotapi.types.message.abstracts.* import dev.inmo.tgbotapi.types.message.content.MessageContent +import kotlinx.serialization.SerialName data class ConnectedFromChannelGroupContentMessageImpl( override val chat: PreviewGroupChat, @@ -24,6 +25,8 @@ data class ConnectedFromChannelGroupContentMessageImpl( override val authorSignature: AuthorSignature?, override val mediaGroupId: MediaGroupId?, override val fromOffline: Boolean, + @SerialName(paidMessageStarCountField) + override val cost: Int? = null, ) : ConnectedFromChannelGroupContentMessage { constructor( @@ -41,8 +44,23 @@ data class ConnectedFromChannelGroupContentMessageImpl( authorSignature: AuthorSignature?, mediaGroupId: MediaGroupId?, fromOffline: Boolean, + cost: Int? = null, ) : this( - chat, channel, messageId, date, forwardInfo.messageOrigin(), editDate, hasProtectedContent, replyTo ?.let { ReplyInfo.Internal(it) }, replyMarkup, content, senderBot, authorSignature, mediaGroupId, fromOffline + chat = chat, + channel = channel, + messageId = messageId, + date = date, + forwardOrigin = forwardInfo.messageOrigin(), + editDate = editDate, + hasProtectedContent = hasProtectedContent, + replyInfo = replyTo ?.let { ReplyInfo.Internal(it) }, + replyMarkup = replyMarkup, + content = content, + senderBot = senderBot, + authorSignature = authorSignature, + mediaGroupId = mediaGroupId, + fromOffline = fromOffline, + cost = cost, ) } @@ -61,6 +79,8 @@ data class UnconnectedFromChannelGroupContentMessageImpl( override val authorSignature: AuthorSignature?, override val mediaGroupId: MediaGroupId?, override val fromOffline: Boolean, + @SerialName(paidMessageStarCountField) + override val cost: Int? = null, ) : UnconnectedFromChannelGroupContentMessage { constructor( chat: PreviewGroupChat, @@ -77,8 +97,23 @@ data class UnconnectedFromChannelGroupContentMessageImpl( authorSignature: AuthorSignature?, mediaGroupId: MediaGroupId?, fromOffline: Boolean, + cost: Int? = null, ) : this( - chat, channel, messageId, date, forwardInfo.messageOrigin(), editDate, hasProtectedContent, replyTo ?.let { ReplyInfo.Internal(it) }, replyMarkup, content, senderBot, authorSignature, mediaGroupId, fromOffline + chat = chat, + channel = channel, + messageId = messageId, + date = date, + forwardOrigin = forwardInfo.messageOrigin(), + editDate = editDate, + hasProtectedContent = hasProtectedContent, + replyInfo = replyTo ?.let { ReplyInfo.Internal(it) }, + replyMarkup = replyMarkup, + content = content, + senderBot = senderBot, + authorSignature = authorSignature, + mediaGroupId = mediaGroupId, + fromOffline = fromOffline, + cost = cost, ) } @@ -96,6 +131,8 @@ data class AnonymousGroupContentMessageImpl( override val authorSignature: AuthorSignature?, override val mediaGroupId: MediaGroupId?, override val fromOffline: Boolean, + @SerialName(paidMessageStarCountField) + override val cost: Int? = null, ) : AnonymousGroupContentMessage { constructor( chat: PreviewGroupChat, @@ -111,8 +148,22 @@ data class AnonymousGroupContentMessageImpl( authorSignature: AuthorSignature?, mediaGroupId: MediaGroupId?, fromOffline: Boolean, + cost: Int? = null, ) : this( - chat, messageId, date, forwardInfo.messageOrigin(), editDate, hasProtectedContent, replyTo ?.let { ReplyInfo.Internal(it) }, replyMarkup, content, senderBot, authorSignature, mediaGroupId, fromOffline + chat = chat, + messageId = messageId, + date = date, + forwardOrigin = forwardInfo.messageOrigin(), + editDate = editDate, + hasProtectedContent = hasProtectedContent, + replyInfo = replyTo ?.let { ReplyInfo.Internal(it) }, + replyMarkup = replyMarkup, + content = content, + senderBot = senderBot, + authorSignature = authorSignature, + mediaGroupId = mediaGroupId, + fromOffline = fromOffline, + cost = cost, ) } @@ -131,6 +182,8 @@ data class CommonGroupContentMessageImpl( override val mediaGroupId: MediaGroupId?, override val senderBoostsCount: Int?, override val fromOffline: Boolean, + @SerialName(paidMessageStarCountField) + override val cost: Int? = null, ) : CommonGroupContentMessage { constructor( chat: PreviewGroupChat, @@ -147,8 +200,23 @@ data class CommonGroupContentMessageImpl( mediaGroupId: MediaGroupId?, senderBoostsCount: Int?, fromOffline: Boolean, + cost: Int? = null, ) : this( - chat, messageId, from, date, forwardInfo.messageOrigin(), editDate, hasProtectedContent, replyTo ?.let { ReplyInfo.Internal(it) }, replyMarkup, content, senderBot, mediaGroupId, senderBoostsCount, fromOffline + chat = chat, + messageId = messageId, + from = from, + date = date, + forwardOrigin = forwardInfo.messageOrigin(), + editDate = editDate, + hasProtectedContent = hasProtectedContent, + replyInfo = replyTo ?.let { ReplyInfo.Internal(it) }, + replyMarkup = replyMarkup, + content = content, + senderBot = senderBot, + mediaGroupId = mediaGroupId, + senderBoostsCount = senderBoostsCount, + fromOffline = fromOffline, + cost = cost, ) } @@ -168,6 +236,8 @@ data class FromChannelForumContentMessageImpl( override val authorSignature: AuthorSignature?, override val mediaGroupId: MediaGroupId?, override val fromOffline: Boolean, + @SerialName(paidMessageStarCountField) + override val cost: Int? = null, ) : FromChannelForumContentMessage { constructor( chat: PreviewForumChat, @@ -185,8 +255,24 @@ data class FromChannelForumContentMessageImpl( authorSignature: AuthorSignature?, mediaGroupId: MediaGroupId?, fromOffline: Boolean, + cost: Int? = null, ) : this( - chat, channel, messageId, threadId, date, forwardInfo.messageOrigin(), editDate, hasProtectedContent, replyTo ?.let { ReplyInfo.Internal(it) }, replyMarkup, content, senderBot, authorSignature, mediaGroupId, fromOffline + chat = chat, + channel = channel, + messageId = messageId, + threadId = threadId, + date = date, + forwardOrigin = forwardInfo.messageOrigin(), + editDate = editDate, + hasProtectedContent = hasProtectedContent, + replyInfo = replyTo ?.let { ReplyInfo.Internal(it) }, + replyMarkup = replyMarkup, + content = content, + senderBot = senderBot, + authorSignature = authorSignature, + mediaGroupId = mediaGroupId, + fromOffline = fromOffline, + cost = cost, ) } @@ -205,6 +291,8 @@ data class AnonymousForumContentMessageImpl( override val authorSignature: AuthorSignature?, override val mediaGroupId: MediaGroupId?, override val fromOffline: Boolean, + @SerialName(paidMessageStarCountField) + override val cost: Int? = null, ) : AnonymousForumContentMessage { constructor( chat: PreviewForumChat, @@ -221,8 +309,23 @@ data class AnonymousForumContentMessageImpl( authorSignature: AuthorSignature?, mediaGroupId: MediaGroupId?, fromOffline: Boolean, + cost: Int? = null, ) : this( - chat, messageId, threadId, date, forwardInfo.messageOrigin(), editDate, hasProtectedContent, replyTo ?.let { ReplyInfo.Internal(it) }, replyMarkup, content, senderBot, authorSignature, mediaGroupId, fromOffline + chat = chat, + messageId = messageId, + threadId = threadId, + date = date, + forwardOrigin = forwardInfo.messageOrigin(), + editDate = editDate, + hasProtectedContent = hasProtectedContent, + replyInfo = replyTo ?.let { ReplyInfo.Internal(it) }, + replyMarkup = replyMarkup, + content = content, + senderBot = senderBot, + authorSignature = authorSignature, + mediaGroupId = mediaGroupId, + fromOffline = fromOffline, + cost = cost, ) } @@ -242,6 +345,8 @@ data class CommonForumContentMessageImpl( override val mediaGroupId: MediaGroupId?, override val senderBoostsCount: Int?, override val fromOffline: Boolean, + @SerialName(paidMessageStarCountField) + override val cost: Int? = null, ) : CommonForumContentMessage { constructor( chat: PreviewForumChat, @@ -259,7 +364,23 @@ data class CommonForumContentMessageImpl( mediaGroupId: MediaGroupId?, senderBoostsCount: Int?, fromOffline: Boolean, + cost: Int? = null, ) : this( - chat, messageId, threadId, from, date, forwardInfo.messageOrigin(), editDate, hasProtectedContent, replyTo ?.let { ReplyInfo.Internal(it) }, replyMarkup, content, senderBot, mediaGroupId, senderBoostsCount, fromOffline + chat = chat, + messageId = messageId, + threadId = threadId, + from = from, + date = date, + forwardOrigin = forwardInfo.messageOrigin(), + editDate = editDate, + hasProtectedContent = hasProtectedContent, + replyInfo = replyTo ?.let { ReplyInfo.Internal(it) }, + replyMarkup = replyMarkup, + content = content, + senderBot = senderBot, + mediaGroupId = mediaGroupId, + senderBoostsCount = senderBoostsCount, + fromOffline = fromOffline, + cost = cost, ) } diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/PrivateContentMessageImpl.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/PrivateContentMessageImpl.kt index c9f0d1be13..3fc2eadcd7 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/PrivateContentMessageImpl.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/PrivateContentMessageImpl.kt @@ -9,6 +9,7 @@ import dev.inmo.tgbotapi.types.chat.User import dev.inmo.tgbotapi.types.message.abstracts.AccessibleMessage import dev.inmo.tgbotapi.types.message.abstracts.PrivateContentMessage import dev.inmo.tgbotapi.types.message.content.MessageContent +import kotlinx.serialization.SerialName data class PrivateContentMessageImpl( override val messageId: MessageId, @@ -24,7 +25,9 @@ data class PrivateContentMessageImpl( override val senderBot: CommonBot?, override val mediaGroupId: MediaGroupId?, override val fromOffline: Boolean, - override val effectId: EffectId? + override val effectId: EffectId?, + @SerialName(paidStarCountField) + override val cost: Int? = null ) : PrivateContentMessage { constructor( messageId: MessageId, diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/RawMessage.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/RawMessage.kt index 2fa2995bc8..735ab56944 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/RawMessage.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/RawMessage.kt @@ -109,6 +109,8 @@ internal data class RawMessage( private val is_from_offline: Boolean = false, + private val paid_star_count: Int? = null, + // Voice Chat Service Messages private val video_chat_scheduled: VideoChatScheduled? = null, private val video_chat_started: VideoChatStarted? = null, @@ -160,6 +162,8 @@ internal data class RawMessage( private val giveaway: Giveaway? = null, private val giveaway_winners: GiveawayPublicResults? = null, private val giveaway_completed: GiveawayPrivateResults? = null, + + private val paid_message_price_changed: PaidMessagePriceChanged? = null ) { private val checkedFrom = from ?.takeIf { !it.isFakeTelegramUser() } private val content: MessageContent? by lazy { @@ -282,6 +286,7 @@ internal data class RawMessage( giveaway_completed != null -> giveaway_completed boost_added != null -> boost_added chat_background_set != null -> chat_background_set + paid_message_price_changed != null -> paid_message_price_changed else -> null } } @@ -295,7 +300,7 @@ internal data class RawMessage( } try { - chatEvent?.let { chatEvent -> + chatEvent ?.let { chatEvent -> when (chat) { is PreviewSupergroupChat -> CommonSupergroupEventMessage( messageId, @@ -350,7 +355,8 @@ internal data class RawMessage( senderBot = via_bot, authorSignature = author_signature, mediaGroupId = media_group_id, - fromOffline = is_from_offline + fromOffline = is_from_offline, + cost = paid_star_count, ) is PreviewForumChat -> if (messageThreadId != null) { val chatId = ChatIdWithThreadId( @@ -376,7 +382,8 @@ internal data class RawMessage( senderBot = via_bot, authorSignature = author_signature, mediaGroupId = media_group_id, - fromOffline = is_from_offline + fromOffline = is_from_offline, + cost = paid_star_count, ) is PreviewGroupChat -> AnonymousForumContentMessageImpl( chat = actualForumChat, @@ -392,7 +399,8 @@ internal data class RawMessage( senderBot = via_bot, authorSignature = author_signature, mediaGroupId = media_group_id, - fromOffline = is_from_offline + fromOffline = is_from_offline, + cost = paid_star_count, ) null -> CommonForumContentMessageImpl( chat = actualForumChat, @@ -409,7 +417,8 @@ internal data class RawMessage( senderBot = via_bot, mediaGroupId = media_group_id, senderBoostsCount = sender_boost_count, - fromOffline = is_from_offline + fromOffline = is_from_offline, + cost = paid_star_count, ) } } else { @@ -429,7 +438,8 @@ internal data class RawMessage( senderBot = via_bot, authorSignature = author_signature, mediaGroupId = media_group_id, - fromOffline = is_from_offline + fromOffline = is_from_offline, + cost = paid_star_count, ) } else { UnconnectedFromChannelGroupContentMessageImpl( @@ -446,7 +456,8 @@ internal data class RawMessage( senderBot = via_bot, authorSignature = author_signature, mediaGroupId = media_group_id, - fromOffline = is_from_offline + fromOffline = is_from_offline, + cost = paid_star_count, ) } is GroupChat -> AnonymousGroupContentMessageImpl( @@ -462,7 +473,8 @@ internal data class RawMessage( senderBot = via_bot, authorSignature = author_signature, mediaGroupId = media_group_id, - fromOffline = is_from_offline + fromOffline = is_from_offline, + cost = paid_star_count, ) null -> CommonGroupContentMessageImpl( chat = chat, @@ -478,7 +490,8 @@ internal data class RawMessage( senderBot = via_bot, mediaGroupId = media_group_id, senderBoostsCount = sender_boost_count, - fromOffline = is_from_offline + fromOffline = is_from_offline, + cost = paid_star_count, ) } } @@ -498,7 +511,8 @@ internal data class RawMessage( senderBot = via_bot, authorSignature = author_signature, mediaGroupId = media_group_id, - fromOffline = is_from_offline + fromOffline = is_from_offline, + cost = paid_star_count, ) } else { UnconnectedFromChannelGroupContentMessageImpl( @@ -515,7 +529,8 @@ internal data class RawMessage( senderBot = via_bot, authorSignature = author_signature, mediaGroupId = media_group_id, - fromOffline = is_from_offline + fromOffline = is_from_offline, + cost = paid_star_count, ) } is PreviewGroupChat -> AnonymousGroupContentMessageImpl( @@ -531,7 +546,8 @@ internal data class RawMessage( senderBot = via_bot, authorSignature = author_signature, mediaGroupId = media_group_id, - fromOffline = is_from_offline + fromOffline = is_from_offline, + cost = paid_star_count, ) null -> CommonGroupContentMessageImpl( chat = chat, @@ -547,7 +563,8 @@ internal data class RawMessage( senderBot = via_bot, mediaGroupId = media_group_id, senderBoostsCount = sender_boost_count, - fromOffline = is_from_offline + fromOffline = is_from_offline, + cost = paid_star_count, ) } } @@ -566,7 +583,8 @@ internal data class RawMessage( senderBot = via_bot, mediaGroupId = media_group_id, fromOffline = is_from_offline, - effectId = effect_id + effectId = effect_id, + cost = paid_star_count, ) } else { BusinessContentMessageImpl( @@ -587,18 +605,19 @@ internal data class RawMessage( senderBot = via_bot, mediaGroupId = media_group_id, senderBusinessBot = sender_business_bot, - fromOffline = is_from_offline + fromOffline = is_from_offline, + cost = paid_star_count, ) } else -> error("Unknown type of chat: $chat") } } ?: passport_data ?.let{ PassportMessage( - messageId, - chat, - checkedFrom ?: from ?: error("For passport must be provided user, but got null"), - date.asDate, - passport_data + messageId = messageId, + chat = chat, + from = checkedFrom ?: from ?: error("For passport must be provided user, but got null"), + date = date.asDate, + passportData = passport_data, ) } ?: error("Was not found supported type of data") } catch (e: Exception) { diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/abstracts/CommonMessage.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/abstracts/CommonMessage.kt index 5189ac818f..144a704ed7 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/abstracts/CommonMessage.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/abstracts/CommonMessage.kt @@ -10,4 +10,5 @@ sealed interface CommonMessage : AccessibleMessage, PossiblyBusinessMessage, PossiblyOfflineMessage, PossiblyMediaGroupMessage, + PossiblyPaidMessage, ContentMessage diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/abstracts/PossiblyPaidMessage.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/abstracts/PossiblyPaidMessage.kt new file mode 100644 index 0000000000..00572227f9 --- /dev/null +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/abstracts/PossiblyPaidMessage.kt @@ -0,0 +1,5 @@ +package dev.inmo.tgbotapi.types.message.abstracts + +interface PossiblyPaidMessage : Message { + val cost: Int? +} \ No newline at end of file diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/utils/extensions/MediaGroupContentMessageCreator.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/utils/extensions/MediaGroupContentMessageCreator.kt index f5afda775b..090ecf64ad 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/utils/extensions/MediaGroupContentMessageCreator.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/utils/extensions/MediaGroupContentMessageCreator.kt @@ -29,7 +29,8 @@ fun List>.asMedia senderBot = sourceMessage.senderBot, authorSignature = sourceMessage.authorSignature, mediaGroupId = sourceMessage.mediaGroupId, - fromOffline = sourceMessage.fromOffline + fromOffline = sourceMessage.fromOffline, + cost = sourceMessage.cost, ) is BusinessContentMessage -> BusinessContentMessageImpl( messageId = sourceMessage.messageId, @@ -46,7 +47,8 @@ fun List>.asMedia senderBot = sourceMessage.senderBot, mediaGroupId = sourceMessage.mediaGroupId, senderBusinessBot = sourceMessage.senderBusinessBot, - fromOffline = sourceMessage.fromOffline + fromOffline = sourceMessage.fromOffline, + cost = sourceMessage.cost, ) is PrivateContentMessage -> PrivateContentMessageImpl( messageId = sourceMessage.messageId, @@ -62,7 +64,8 @@ fun List>.asMedia senderBot = sourceMessage.senderBot, mediaGroupId = sourceMessage.mediaGroupId, fromOffline = sourceMessage.fromOffline, - effectId = sourceMessage.effectId + effectId = sourceMessage.effectId, + cost = sourceMessage.cost, ) is AnonymousGroupContentMessage -> AnonymousGroupContentMessageImpl( chat = sourceMessage.chat, @@ -77,7 +80,8 @@ fun List>.asMedia senderBot = sourceMessage.senderBot, authorSignature = sourceMessage.authorSignature, mediaGroupId = sourceMessage.mediaGroupId, - fromOffline = sourceMessage.fromOffline + fromOffline = sourceMessage.fromOffline, + cost = sourceMessage.cost, ) is CommonGroupContentMessage -> CommonGroupContentMessageImpl( chat = sourceMessage.chat, @@ -93,7 +97,8 @@ fun List>.asMedia senderBot = sourceMessage.senderBot, mediaGroupId = sourceMessage.mediaGroupId, senderBoostsCount = sourceMessage.senderBoostsCount, - fromOffline = sourceMessage.fromOffline + fromOffline = sourceMessage.fromOffline, + cost = sourceMessage.cost, ) is ConnectedFromChannelGroupContentMessage -> ConnectedFromChannelGroupContentMessageImpl( chat = sourceMessage.chat, @@ -109,7 +114,8 @@ fun List>.asMedia senderBot = sourceMessage.senderBot, authorSignature = sourceMessage.authorSignature, mediaGroupId = sourceMessage.mediaGroupId, - fromOffline = sourceMessage.fromOffline + fromOffline = sourceMessage.fromOffline, + cost = sourceMessage.cost, ) is UnconnectedFromChannelGroupContentMessage -> UnconnectedFromChannelGroupContentMessageImpl( chat = sourceMessage.chat, @@ -125,7 +131,8 @@ fun List>.asMedia senderBot = sourceMessage.senderBot, authorSignature = sourceMessage.authorSignature, mediaGroupId = sourceMessage.mediaGroupId, - fromOffline = sourceMessage.fromOffline + fromOffline = sourceMessage.fromOffline, + cost = sourceMessage.cost, ) is AnonymousForumContentMessage -> AnonymousForumContentMessageImpl( chat = sourceMessage.chat, @@ -141,7 +148,8 @@ fun List>.asMedia senderBot = sourceMessage.senderBot, authorSignature = sourceMessage.authorSignature, mediaGroupId = sourceMessage.mediaGroupId, - fromOffline = sourceMessage.fromOffline + fromOffline = sourceMessage.fromOffline, + cost = sourceMessage.cost, ) is CommonForumContentMessage -> CommonForumContentMessageImpl( chat = sourceMessage.chat, @@ -158,7 +166,8 @@ fun List>.asMedia senderBot = sourceMessage.senderBot, mediaGroupId = sourceMessage.mediaGroupId, senderBoostsCount = sourceMessage.senderBoostsCount, - fromOffline = sourceMessage.fromOffline + fromOffline = sourceMessage.fromOffline, + cost = sourceMessage.cost, ) is FromChannelForumContentMessage -> FromChannelForumContentMessageImpl( chat = sourceMessage.chat, @@ -175,7 +184,8 @@ fun List>.asMedia senderBot = sourceMessage.senderBot, authorSignature = sourceMessage.authorSignature, mediaGroupId = sourceMessage.mediaGroupId, - fromOffline = sourceMessage.fromOffline + fromOffline = sourceMessage.fromOffline, + cost = sourceMessage.cost, ) } } From c0e3c1d02f4197050607358c7967143143b47cd6 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sat, 19 Apr 2025 12:58:18 +0600 Subject: [PATCH 34/36] update classcasts and api dumps --- tgbotapi.api/api/tgbotapi.api.api | 51 ++ .../api/tgbotapi.behaviour_builder.api | 6 + tgbotapi.core/api/tgbotapi.core.api | 661 ++++++++++++++++-- tgbotapi.utils/api/tgbotapi.utils.api | 6 + .../extensions/utils/ClassCastsNew.kt | 20 + 5 files changed, 698 insertions(+), 46 deletions(-) diff --git a/tgbotapi.api/api/tgbotapi.api.api b/tgbotapi.api/api/tgbotapi.api.api index c4079a19b5..df2014c549 100644 --- a/tgbotapi.api/api/tgbotapi.api.api +++ b/tgbotapi.api/api/tgbotapi.api.api @@ -330,6 +330,57 @@ public final class dev/inmo/tgbotapi/extensions/api/bot/SetMyShortDescriptionKt public static synthetic fun setMyShortDescription$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ldev/inmo/micro_utils/language_codes/IetfLang;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; } +public final class dev/inmo/tgbotapi/extensions/api/business/DeleteBusinessMessagesGeneratedVariationKt { + public static final fun deleteBusinessMessages-wC12z2M (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; +} + +public final class dev/inmo/tgbotapi/extensions/api/business/DeleteBusinessMessagesKt { + public static final fun deleteBusinessMessages-wC12z2M (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; +} + +public final class dev/inmo/tgbotapi/extensions/api/business/GetBusinessAccountStarBalanceKt { + public static final fun getBusinessAccountStarBalance-spp27rg (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; +} + +public final class dev/inmo/tgbotapi/extensions/api/business/ReadBusinessMessageGeneratedVariationKt { + public static final fun readBusinessMessage-1MWLODE (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/Chat;JLkotlin/coroutines/Continuation;)Ljava/lang/Object; +} + +public final class dev/inmo/tgbotapi/extensions/api/business/ReadBusinessMessageKt { + public static final fun readBusinessMessage-kYJnN-U (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;JJLkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun readBusinessMessage-wC12z2M (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; +} + +public final class dev/inmo/tgbotapi/extensions/api/business/RemoveBusinessAccountProfilePhotoKt { + public static final fun removeBusinessAccountProfilePhoto-spp27rg (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; +} + +public final class dev/inmo/tgbotapi/extensions/api/business/SetBusinessAccountBioKt { + public static final fun setBusinessAccountBio-wC12z2M (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; +} + +public final class dev/inmo/tgbotapi/extensions/api/business/SetBusinessAccountNameKt { + public static final fun setBusinessAccountName-XzFA9qU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun setBusinessAccountName-XzFA9qU$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; +} + +public final class dev/inmo/tgbotapi/extensions/api/business/SetBusinessAccountProfilePhotoKt { + public static final fun setBusinessAccountProfilePhoto-XzFA9qU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ldev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun setBusinessAccountProfilePhoto-XzFA9qU$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ldev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto;ZLkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; +} + +public final class dev/inmo/tgbotapi/extensions/api/business/SetBusinessAccountUsernameGeneratedVariationKt { + public static final fun setBusinessAccountUsername-wC12z2M (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; +} + +public final class dev/inmo/tgbotapi/extensions/api/business/SetBusinessAccountUsernameKt { + public static final fun setBusinessAccountUsername-_dB6Ko0 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; +} + +public final class dev/inmo/tgbotapi/extensions/api/business/TransferBusinessAccountStarBalanceKt { + public static final fun transferBusinessAccountStarBalance-wC12z2M (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ljava/lang/String;ILkotlin/coroutines/Continuation;)Ljava/lang/Object; +} + public final class dev/inmo/tgbotapi/extensions/api/chat/ExportChatInviteLinkKt { public static final fun exportChatInviteLink (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun exportChatInviteLink (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/PublicChat;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; diff --git a/tgbotapi.behaviour_builder/api/tgbotapi.behaviour_builder.api b/tgbotapi.behaviour_builder/api/tgbotapi.behaviour_builder.api index 13fbccb148..cac19168aa 100644 --- a/tgbotapi.behaviour_builder/api/tgbotapi.behaviour_builder.api +++ b/tgbotapi.behaviour_builder/api/tgbotapi.behaviour_builder.api @@ -654,6 +654,8 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/W public static synthetic fun waitNewChatPhotoEvents$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun waitNewChatTitleEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun waitNewChatTitleEvents$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun waitPaidMessagePriceChanged (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun waitPaidMessagePriceChanged$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun waitPinnedMessageEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun waitPinnedMessageEvents$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun waitPrivateEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; @@ -743,6 +745,8 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/W public static synthetic fun waitNewChatPhotoEventsMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun waitNewChatTitleEventsMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun waitNewChatTitleEventsMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun waitPaidMessagePriceChangedMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun waitPaidMessagePriceChangedMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun waitPinnedMessageEventsMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun waitPinnedMessageEventsMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun waitPrivateEventsMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; @@ -1348,6 +1352,8 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handl public static synthetic fun onNewChatPhoto$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun onNewChatTitle (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun onNewChatTitle$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun onPaidMessagePriceChanged (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun onPaidMessagePriceChanged$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun onPinnedMessage (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun onPinnedMessage$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun onPrivateEvent (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; diff --git a/tgbotapi.core/api/tgbotapi.core.api b/tgbotapi.core/api/tgbotapi.core.api index 6f2cc5147d..6312581ed1 100644 --- a/tgbotapi.core/api/tgbotapi.core.api +++ b/tgbotapi.core/api/tgbotapi.core.api @@ -986,6 +986,21 @@ public final class dev/inmo/tgbotapi/requests/StopPoll$Companion { public final fun serializer ()Lkotlinx/serialization/KSerializer; } +public abstract interface class dev/inmo/tgbotapi/requests/abstracts/BusinessRequest : dev/inmo/tgbotapi/abstracts/types/WithBusinessConnectionId, dev/inmo/tgbotapi/requests/abstracts/Request { +} + +public abstract interface class dev/inmo/tgbotapi/requests/abstracts/BusinessRequest$Multipart : dev/inmo/tgbotapi/requests/abstracts/BusinessRequest, dev/inmo/tgbotapi/requests/abstracts/MultipartRequest$Common, dev/inmo/tgbotapi/requests/abstracts/SimpleRequest { + public abstract fun getData ()Ldev/inmo/tgbotapi/requests/abstracts/SimpleRequest; +} + +public final class dev/inmo/tgbotapi/requests/abstracts/BusinessRequest$Multipart$DefaultImpls { + public static fun getData (Ldev/inmo/tgbotapi/requests/abstracts/BusinessRequest$Multipart;)Ldev/inmo/tgbotapi/requests/abstracts/SimpleRequest; + public static fun getParamsJson (Ldev/inmo/tgbotapi/requests/abstracts/BusinessRequest$Multipart;)Lkotlinx/serialization/json/JsonObject; +} + +public abstract interface class dev/inmo/tgbotapi/requests/abstracts/BusinessRequest$Simple : dev/inmo/tgbotapi/requests/abstracts/BusinessRequest, dev/inmo/tgbotapi/requests/abstracts/SimpleRequest { +} + public final class dev/inmo/tgbotapi/requests/abstracts/FileId : dev/inmo/tgbotapi/requests/abstracts/InputFile { public static final field Companion Ldev/inmo/tgbotapi/requests/abstracts/FileId$Companion; public fun (Ljava/lang/String;)V @@ -1844,6 +1859,378 @@ public final class dev/inmo/tgbotapi/requests/bot/SetMyShortDescription$Companio public final fun serializer ()Lkotlinx/serialization/KSerializer; } +public final class dev/inmo/tgbotapi/requests/business_connection/DeleteBusinessMessages : dev/inmo/tgbotapi/requests/abstracts/BusinessRequest$Simple { + public static final field Companion Ldev/inmo/tgbotapi/requests/business_connection/DeleteBusinessMessages$Companion; + public synthetic fun (Ljava/lang/String;Ljava/util/List;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1-T-_HSQI ()Ljava/lang/String; + public final fun component2 ()Ljava/util/List; + public final fun copy-8asU4bo (Ljava/lang/String;Ljava/util/List;)Ldev/inmo/tgbotapi/requests/business_connection/DeleteBusinessMessages; + public static synthetic fun copy-8asU4bo$default (Ldev/inmo/tgbotapi/requests/business_connection/DeleteBusinessMessages;Ljava/lang/String;Ljava/util/List;ILjava/lang/Object;)Ldev/inmo/tgbotapi/requests/business_connection/DeleteBusinessMessages; + public fun equals (Ljava/lang/Object;)Z + public fun getBusinessConnectionId-T-_HSQI ()Ljava/lang/String; + public synthetic fun getBusinessConnectionId-nXr5wdE ()Ljava/lang/String; + public final fun getMessagesIds ()Ljava/util/List; + public fun getRequestSerializer ()Lkotlinx/serialization/SerializationStrategy; + public fun getResultDeserializer ()Lkotlinx/serialization/DeserializationStrategy; + public fun hashCode ()I + public fun method ()Ljava/lang/String; + public fun toString ()Ljava/lang/String; +} + +public synthetic class dev/inmo/tgbotapi/requests/business_connection/DeleteBusinessMessages$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Ldev/inmo/tgbotapi/requests/business_connection/DeleteBusinessMessages$$serializer; + public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/requests/business_connection/DeleteBusinessMessages; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/requests/business_connection/DeleteBusinessMessages;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public final class dev/inmo/tgbotapi/requests/business_connection/DeleteBusinessMessages$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class dev/inmo/tgbotapi/requests/business_connection/GetBusinessAccountStarBalance : dev/inmo/tgbotapi/requests/abstracts/BusinessRequest$Simple { + public static final field Companion Ldev/inmo/tgbotapi/requests/business_connection/GetBusinessAccountStarBalance$Companion; + public synthetic fun (Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1-T-_HSQI ()Ljava/lang/String; + public final fun copy-SYn5crI (Ljava/lang/String;)Ldev/inmo/tgbotapi/requests/business_connection/GetBusinessAccountStarBalance; + public static synthetic fun copy-SYn5crI$default (Ldev/inmo/tgbotapi/requests/business_connection/GetBusinessAccountStarBalance;Ljava/lang/String;ILjava/lang/Object;)Ldev/inmo/tgbotapi/requests/business_connection/GetBusinessAccountStarBalance; + public fun equals (Ljava/lang/Object;)Z + public fun getBusinessConnectionId-T-_HSQI ()Ljava/lang/String; + public synthetic fun getBusinessConnectionId-nXr5wdE ()Ljava/lang/String; + public fun getRequestSerializer ()Lkotlinx/serialization/SerializationStrategy; + public fun getResultDeserializer ()Lkotlinx/serialization/DeserializationStrategy; + public fun hashCode ()I + public fun method ()Ljava/lang/String; + public fun toString ()Ljava/lang/String; +} + +public synthetic class dev/inmo/tgbotapi/requests/business_connection/GetBusinessAccountStarBalance$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Ldev/inmo/tgbotapi/requests/business_connection/GetBusinessAccountStarBalance$$serializer; + public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/requests/business_connection/GetBusinessAccountStarBalance; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/requests/business_connection/GetBusinessAccountStarBalance;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public final class dev/inmo/tgbotapi/requests/business_connection/GetBusinessAccountStarBalance$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public abstract interface class dev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto { + public static final field Companion Ldev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto$Companion; + public abstract fun getMediaPair ()Lkotlin/Pair; + public abstract fun getType ()Ljava/lang/String; +} + +public final class dev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto$Animated : dev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto { + public static final field Companion Ldev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto$Animated$Companion; + public fun (Ldev/inmo/tgbotapi/requests/abstracts/MultipartFile;Ljava/lang/Double;)V + public synthetic fun (Ldev/inmo/tgbotapi/requests/abstracts/MultipartFile;Ljava/lang/Double;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Ldev/inmo/tgbotapi/requests/abstracts/MultipartFile; + public final fun component2 ()Ljava/lang/Double; + public final fun copy (Ldev/inmo/tgbotapi/requests/abstracts/MultipartFile;Ljava/lang/Double;)Ldev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto$Animated; + public static synthetic fun copy$default (Ldev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto$Animated;Ldev/inmo/tgbotapi/requests/abstracts/MultipartFile;Ljava/lang/Double;ILjava/lang/Object;)Ldev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto$Animated; + public fun equals (Ljava/lang/Object;)Z + public final fun getAnimation ()Ldev/inmo/tgbotapi/requests/abstracts/MultipartFile; + public final fun getMainFrameTimestamp ()Ljava/lang/Double; + public fun getMediaPair ()Lkotlin/Pair; + public fun getType ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public synthetic class dev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto$Animated$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Ldev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto$Animated$$serializer; + public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto$Animated; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto$Animated;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public final class dev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto$Animated$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class dev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto$Companion : kotlinx/serialization/KSerializer { + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class dev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto$Static : dev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto { + public static final field Companion Ldev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto$Static$Companion; + public fun (Ldev/inmo/tgbotapi/requests/abstracts/MultipartFile;)V + public final fun component1 ()Ldev/inmo/tgbotapi/requests/abstracts/MultipartFile; + public final fun copy (Ldev/inmo/tgbotapi/requests/abstracts/MultipartFile;)Ldev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto$Static; + public static synthetic fun copy$default (Ldev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto$Static;Ldev/inmo/tgbotapi/requests/abstracts/MultipartFile;ILjava/lang/Object;)Ldev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto$Static; + public fun equals (Ljava/lang/Object;)Z + public fun getMediaPair ()Lkotlin/Pair; + public final fun getPhoto ()Ldev/inmo/tgbotapi/requests/abstracts/MultipartFile; + public fun getType ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public synthetic class dev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto$Static$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Ldev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto$Static$$serializer; + public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto$Static; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto$Static;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public final class dev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto$Static$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class dev/inmo/tgbotapi/requests/business_connection/ReadBusinessMessage : dev/inmo/tgbotapi/requests/abstracts/BusinessRequest$Simple { + public static final field Companion Ldev/inmo/tgbotapi/requests/business_connection/ReadBusinessMessage$Companion; + public synthetic fun (Ljava/lang/String;JJLkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1-T-_HSQI ()Ljava/lang/String; + public final fun component2-tHkBKVM ()J + public final fun component3-APLFQys ()J + public final fun copy-UUyqPQI (Ljava/lang/String;JJ)Ldev/inmo/tgbotapi/requests/business_connection/ReadBusinessMessage; + public static synthetic fun copy-UUyqPQI$default (Ldev/inmo/tgbotapi/requests/business_connection/ReadBusinessMessage;Ljava/lang/String;JJILjava/lang/Object;)Ldev/inmo/tgbotapi/requests/business_connection/ReadBusinessMessage; + public fun equals (Ljava/lang/Object;)Z + public fun getBusinessConnectionId-T-_HSQI ()Ljava/lang/String; + public synthetic fun getBusinessConnectionId-nXr5wdE ()Ljava/lang/String; + public final fun getChatId-tHkBKVM ()J + public final fun getMessageId-APLFQys ()J + public fun getRequestSerializer ()Lkotlinx/serialization/SerializationStrategy; + public fun getResultDeserializer ()Lkotlinx/serialization/DeserializationStrategy; + public fun hashCode ()I + public fun method ()Ljava/lang/String; + public fun toString ()Ljava/lang/String; +} + +public synthetic class dev/inmo/tgbotapi/requests/business_connection/ReadBusinessMessage$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Ldev/inmo/tgbotapi/requests/business_connection/ReadBusinessMessage$$serializer; + public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/requests/business_connection/ReadBusinessMessage; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/requests/business_connection/ReadBusinessMessage;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public final class dev/inmo/tgbotapi/requests/business_connection/ReadBusinessMessage$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class dev/inmo/tgbotapi/requests/business_connection/RemoveBusinessAccountProfilePhoto : dev/inmo/tgbotapi/requests/abstracts/BusinessRequest$Simple { + public static final field Companion Ldev/inmo/tgbotapi/requests/business_connection/RemoveBusinessAccountProfilePhoto$Companion; + public synthetic fun (Ljava/lang/String;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ljava/lang/String;ZLkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1-T-_HSQI ()Ljava/lang/String; + public final fun component2 ()Z + public final fun copy-8asU4bo (Ljava/lang/String;Z)Ldev/inmo/tgbotapi/requests/business_connection/RemoveBusinessAccountProfilePhoto; + public static synthetic fun copy-8asU4bo$default (Ldev/inmo/tgbotapi/requests/business_connection/RemoveBusinessAccountProfilePhoto;Ljava/lang/String;ZILjava/lang/Object;)Ldev/inmo/tgbotapi/requests/business_connection/RemoveBusinessAccountProfilePhoto; + public fun equals (Ljava/lang/Object;)Z + public fun getBusinessConnectionId-T-_HSQI ()Ljava/lang/String; + public synthetic fun getBusinessConnectionId-nXr5wdE ()Ljava/lang/String; + public fun getRequestSerializer ()Lkotlinx/serialization/SerializationStrategy; + public fun getResultDeserializer ()Lkotlinx/serialization/DeserializationStrategy; + public fun hashCode ()I + public final fun isPublic ()Z + public fun method ()Ljava/lang/String; + public fun toString ()Ljava/lang/String; +} + +public synthetic class dev/inmo/tgbotapi/requests/business_connection/RemoveBusinessAccountProfilePhoto$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Ldev/inmo/tgbotapi/requests/business_connection/RemoveBusinessAccountProfilePhoto$$serializer; + public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/requests/business_connection/RemoveBusinessAccountProfilePhoto; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/requests/business_connection/RemoveBusinessAccountProfilePhoto;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public final class dev/inmo/tgbotapi/requests/business_connection/RemoveBusinessAccountProfilePhoto$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class dev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountBio : dev/inmo/tgbotapi/requests/abstracts/BusinessRequest$Simple { + public static final field Companion Ldev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountBio$Companion; + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1-T-_HSQI ()Ljava/lang/String; + public final fun component2 ()Ljava/lang/String; + public final fun copy-8asU4bo (Ljava/lang/String;Ljava/lang/String;)Ldev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountBio; + public static synthetic fun copy-8asU4bo$default (Ldev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountBio;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Ldev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountBio; + public fun equals (Ljava/lang/Object;)Z + public final fun getBio ()Ljava/lang/String; + public fun getBusinessConnectionId-T-_HSQI ()Ljava/lang/String; + public synthetic fun getBusinessConnectionId-nXr5wdE ()Ljava/lang/String; + public fun getRequestSerializer ()Lkotlinx/serialization/SerializationStrategy; + public fun getResultDeserializer ()Lkotlinx/serialization/DeserializationStrategy; + public fun hashCode ()I + public fun method ()Ljava/lang/String; + public fun toString ()Ljava/lang/String; +} + +public synthetic class dev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountBio$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Ldev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountBio$$serializer; + public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountBio; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountBio;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public final class dev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountBio$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class dev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountName : dev/inmo/tgbotapi/requests/abstracts/BusinessRequest$Simple { + public static final field Companion Ldev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountName$Companion; + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1-T-_HSQI ()Ljava/lang/String; + public final fun component2 ()Ljava/lang/String; + public final fun component3 ()Ljava/lang/String; + public final fun copy-LpiUw8E (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ldev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountName; + public static synthetic fun copy-LpiUw8E$default (Ldev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountName;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Ldev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountName; + public fun equals (Ljava/lang/Object;)Z + public fun getBusinessConnectionId-T-_HSQI ()Ljava/lang/String; + public synthetic fun getBusinessConnectionId-nXr5wdE ()Ljava/lang/String; + public final fun getFirstName ()Ljava/lang/String; + public final fun getLastName ()Ljava/lang/String; + public fun getRequestSerializer ()Lkotlinx/serialization/SerializationStrategy; + public fun getResultDeserializer ()Lkotlinx/serialization/DeserializationStrategy; + public fun hashCode ()I + public fun method ()Ljava/lang/String; + public fun toString ()Ljava/lang/String; +} + +public synthetic class dev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountName$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Ldev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountName$$serializer; + public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountName; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountName;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public final class dev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountName$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class dev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountProfilePhoto : dev/inmo/tgbotapi/requests/abstracts/BusinessRequest$Multipart { + public static final field Companion Ldev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountProfilePhoto$Companion; + public synthetic fun (Ljava/lang/String;Ldev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ljava/lang/String;Ldev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto;ZLkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1-T-_HSQI ()Ljava/lang/String; + public final fun component2 ()Ldev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto; + public final fun component3 ()Z + public final fun copy-LpiUw8E (Ljava/lang/String;Ldev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto;Z)Ldev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountProfilePhoto; + public static synthetic fun copy-LpiUw8E$default (Ldev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountProfilePhoto;Ljava/lang/String;Ldev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto;ZILjava/lang/Object;)Ldev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountProfilePhoto; + public fun equals (Ljava/lang/Object;)Z + public fun getBusinessConnectionId-T-_HSQI ()Ljava/lang/String; + public synthetic fun getBusinessConnectionId-nXr5wdE ()Ljava/lang/String; + public fun getData ()Ldev/inmo/tgbotapi/requests/abstracts/SimpleRequest; + public fun getMediaMap ()Ljava/util/Map; + public fun getParamsJson ()Lkotlinx/serialization/json/JsonObject; + public final fun getPhoto ()Ldev/inmo/tgbotapi/requests/business_connection/InputProfilePhoto; + public fun getRequestSerializer ()Lkotlinx/serialization/SerializationStrategy; + public fun getResultDeserializer ()Lkotlinx/serialization/DeserializationStrategy; + public fun hashCode ()I + public final fun isPublic ()Z + public fun method ()Ljava/lang/String; + public fun toString ()Ljava/lang/String; +} + +public synthetic class dev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountProfilePhoto$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Ldev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountProfilePhoto$$serializer; + public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountProfilePhoto; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountProfilePhoto;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public final class dev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountProfilePhoto$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class dev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountUsername : dev/inmo/tgbotapi/requests/abstracts/BusinessRequest$Simple { + public static final field Companion Ldev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountUsername$Companion; + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1-T-_HSQI ()Ljava/lang/String; + public final fun component2-xonw-vc ()Ljava/lang/String; + public final fun copy-PzCSSl4 (Ljava/lang/String;Ljava/lang/String;)Ldev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountUsername; + public static synthetic fun copy-PzCSSl4$default (Ldev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountUsername;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Ldev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountUsername; + public fun equals (Ljava/lang/Object;)Z + public fun getBusinessConnectionId-T-_HSQI ()Ljava/lang/String; + public synthetic fun getBusinessConnectionId-nXr5wdE ()Ljava/lang/String; + public fun getRequestSerializer ()Lkotlinx/serialization/SerializationStrategy; + public fun getResultDeserializer ()Lkotlinx/serialization/DeserializationStrategy; + public final fun getUsername-xonw-vc ()Ljava/lang/String; + public fun hashCode ()I + public fun method ()Ljava/lang/String; + public fun toString ()Ljava/lang/String; +} + +public synthetic class dev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountUsername$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Ldev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountUsername$$serializer; + public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountUsername; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountUsername;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public final class dev/inmo/tgbotapi/requests/business_connection/SetBusinessAccountUsername$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class dev/inmo/tgbotapi/requests/business_connection/TransferBusinessAccountStarBalance : dev/inmo/tgbotapi/requests/abstracts/BusinessRequest$Simple { + public static final field Companion Ldev/inmo/tgbotapi/requests/business_connection/TransferBusinessAccountStarBalance$Companion; + public synthetic fun (Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1-T-_HSQI ()Ljava/lang/String; + public final fun component2 ()I + public final fun copy-8asU4bo (Ljava/lang/String;I)Ldev/inmo/tgbotapi/requests/business_connection/TransferBusinessAccountStarBalance; + public static synthetic fun copy-8asU4bo$default (Ldev/inmo/tgbotapi/requests/business_connection/TransferBusinessAccountStarBalance;Ljava/lang/String;IILjava/lang/Object;)Ldev/inmo/tgbotapi/requests/business_connection/TransferBusinessAccountStarBalance; + public fun equals (Ljava/lang/Object;)Z + public fun getBusinessConnectionId-T-_HSQI ()Ljava/lang/String; + public synthetic fun getBusinessConnectionId-nXr5wdE ()Ljava/lang/String; + public fun getRequestSerializer ()Lkotlinx/serialization/SerializationStrategy; + public fun getResultDeserializer ()Lkotlinx/serialization/DeserializationStrategy; + public final fun getStarCount ()I + public fun hashCode ()I + public fun method ()Ljava/lang/String; + public fun toString ()Ljava/lang/String; +} + +public synthetic class dev/inmo/tgbotapi/requests/business_connection/TransferBusinessAccountStarBalance$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Ldev/inmo/tgbotapi/requests/business_connection/TransferBusinessAccountStarBalance$$serializer; + public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/requests/business_connection/TransferBusinessAccountStarBalance; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/requests/business_connection/TransferBusinessAccountStarBalance;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public final class dev/inmo/tgbotapi/requests/business_connection/TransferBusinessAccountStarBalance$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + public final class dev/inmo/tgbotapi/requests/chat/ExportChatInviteLink : dev/inmo/tgbotapi/abstracts/types/ChatRequest, dev/inmo/tgbotapi/requests/abstracts/SimpleRequest { public static final field Companion Ldev/inmo/tgbotapi/requests/chat/ExportChatInviteLink$Companion; public fun (Ldev/inmo/tgbotapi/types/ChatIdentifier;)V @@ -8864,15 +9251,24 @@ public final class dev/inmo/tgbotapi/types/CommonKt { public static final field callbackQueryIdField Ljava/lang/String; public static final field canAddWebPagePreviewsField Ljava/lang/String; public static final field canBeEditedField Ljava/lang/String; + public static final field canChangeGiftSettingsField Ljava/lang/String; public static final field canChangeInfoField Ljava/lang/String; public static final field canConnectToBusinessField Ljava/lang/String; + public static final field canConvertGiftsToStarsField Ljava/lang/String; + public static final field canDeleteAllMessagesField Ljava/lang/String; public static final field canDeleteMessagesField Ljava/lang/String; + public static final field canDeleteOutgoingMessagesField Ljava/lang/String; public static final field canDeleteStoriesField Ljava/lang/String; + public static final field canEditBioField Ljava/lang/String; public static final field canEditMessagesField Ljava/lang/String; + public static final field canEditNameField Ljava/lang/String; + public static final field canEditProfilePhotoField Ljava/lang/String; public static final field canEditStoriesField Ljava/lang/String; + public static final field canEditUsernameField Ljava/lang/String; public static final field canInviteUsersField Ljava/lang/String; public static final field canJoinGroupsField Ljava/lang/String; public static final field canManageChatField Ljava/lang/String; + public static final field canManageStoriesField Ljava/lang/String; public static final field canManageTopicsField Ljava/lang/String; public static final field canManageVideoChatsField Ljava/lang/String; public static final field canManageVoiceChatsField Ljava/lang/String; @@ -8881,6 +9277,7 @@ public final class dev/inmo/tgbotapi/types/CommonKt { public static final field canPostStoriesField Ljava/lang/String; public static final field canPromoteMembersField Ljava/lang/String; public static final field canReadAllGroupMessagesField Ljava/lang/String; + public static final field canReadMessagesField Ljava/lang/String; public static final field canReplyField Ljava/lang/String; public static final field canRestrictMembersField Ljava/lang/String; public static final field canSendAudiosField Ljava/lang/String; @@ -8895,6 +9292,9 @@ public final class dev/inmo/tgbotapi/types/CommonKt { public static final field canSendVideosField Ljava/lang/String; public static final field canSendVoiceNotesField Ljava/lang/String; public static final field canSetStickerSetField Ljava/lang/String; + public static final field canTransferAndUpgradeGiftsField Ljava/lang/String; + public static final field canTransferStarsField Ljava/lang/String; + public static final field canViewGiftsAndStarsField Ljava/lang/String; public static final field captionEntitiesField Ljava/lang/String; public static final field captionField Ljava/lang/String; public static final field certificateField Ljava/lang/String; @@ -9042,6 +9442,7 @@ public final class dev/inmo/tgbotapi/types/CommonKt { public static final field isPersonalField Ljava/lang/String; public static final field isPremiumField Ljava/lang/String; public static final field isPrimaryField Ljava/lang/String; + public static final field isPublicField Ljava/lang/String; public static final field isRecurringField Ljava/lang/String; public static final field isRevokedField Ljava/lang/String; public static final field isStarGiveawayField Ljava/lang/String; @@ -9065,6 +9466,7 @@ public final class dev/inmo/tgbotapi/types/CommonKt { public static final field locationField Ljava/lang/String; public static final field loginUrlField Ljava/lang/String; public static final field longitudeField Ljava/lang/String; + public static final field mainFrameTimestampField Ljava/lang/String; public static final field maskPositionField Ljava/lang/String; public static final field maxAllowedConnectionsField Ljava/lang/String; public static final field maxQuantityField Ljava/lang/String; @@ -9112,6 +9514,8 @@ public final class dev/inmo/tgbotapi/types/CommonKt { public static final field originField Ljava/lang/String; public static final field paidMediaField Ljava/lang/String; public static final field paidMediaPayloadField Ljava/lang/String; + public static final field paidMessageStarCountField Ljava/lang/String; + public static final field paidStarCountField Ljava/lang/String; public static final field passportField Ljava/lang/String; public static final field passportRegistrationField Ljava/lang/String; public static final field payField Ljava/lang/String; @@ -11593,6 +11997,32 @@ public final class dev/inmo/tgbotapi/types/PaidMediaPayload$Companion { public final fun serializer ()Lkotlinx/serialization/KSerializer; } +public final class dev/inmo/tgbotapi/types/PaidMessagePriceChanged : dev/inmo/tgbotapi/types/message/ChatEvents/abstracts/CommonEvent { + public static final field Companion Ldev/inmo/tgbotapi/types/PaidMessagePriceChanged$Companion; + public fun (I)V + public final fun component1 ()I + public final fun copy (I)Ldev/inmo/tgbotapi/types/PaidMessagePriceChanged; + public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/PaidMessagePriceChanged;IILjava/lang/Object;)Ldev/inmo/tgbotapi/types/PaidMessagePriceChanged; + public fun equals (Ljava/lang/Object;)Z + public final fun getCost ()I + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public synthetic class dev/inmo/tgbotapi/types/PaidMessagePriceChanged$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Ldev/inmo/tgbotapi/types/PaidMessagePriceChanged$$serializer; + public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/types/PaidMessagePriceChanged; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/types/PaidMessagePriceChanged;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public final class dev/inmo/tgbotapi/types/PaidMessagePriceChanged$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + public final class dev/inmo/tgbotapi/types/PollId { public static final field Companion Ldev/inmo/tgbotapi/types/PollId$Companion; public static final synthetic fun box-impl (Ljava/lang/String;)Ldev/inmo/tgbotapi/types/PollId; @@ -13064,12 +13494,67 @@ public final class dev/inmo/tgbotapi/types/boosts/UserChatBoosts$Companion { public final fun serializer ()Lkotlinx/serialization/KSerializer; } +public final class dev/inmo/tgbotapi/types/business_connection/BusinessBotRights { + public static final field Companion Ldev/inmo/tgbotapi/types/business_connection/BusinessBotRights$Companion; + public fun ()V + public fun (ZZZZZZZZZZZZZZ)V + public synthetic fun (ZZZZZZZZZZZZZZILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Z + public final fun component10 ()Z + public final fun component11 ()Z + public final fun component12 ()Z + public final fun component13 ()Z + public final fun component14 ()Z + public final fun component2 ()Z + public final fun component3 ()Z + public final fun component4 ()Z + public final fun component5 ()Z + public final fun component6 ()Z + public final fun component7 ()Z + public final fun component8 ()Z + public final fun component9 ()Z + public final fun copy (ZZZZZZZZZZZZZZ)Ldev/inmo/tgbotapi/types/business_connection/BusinessBotRights; + public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/business_connection/BusinessBotRights;ZZZZZZZZZZZZZZILjava/lang/Object;)Ldev/inmo/tgbotapi/types/business_connection/BusinessBotRights; + public fun equals (Ljava/lang/Object;)Z + public final fun getCanChangeGiftSettings ()Z + public final fun getCanConvertGiftsToStars ()Z + public final fun getCanDeleteAllMessages ()Z + public final fun getCanDeleteOutgoingMessages ()Z + public final fun getCanEditBio ()Z + public final fun getCanEditName ()Z + public final fun getCanEditProfilePhoto ()Z + public final fun getCanEditUsername ()Z + public final fun getCanManageStories ()Z + public final fun getCanMarkMessagesAsRead ()Z + public final fun getCanReply ()Z + public final fun getCanTransferAndUpgradeGifts ()Z + public final fun getCanTransferStars ()Z + public final fun getCanViewGiftsAndStars ()Z + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public synthetic class dev/inmo/tgbotapi/types/business_connection/BusinessBotRights$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Ldev/inmo/tgbotapi/types/business_connection/BusinessBotRights$$serializer; + public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/types/business_connection/BusinessBotRights; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/types/business_connection/BusinessBotRights;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public final class dev/inmo/tgbotapi/types/business_connection/BusinessBotRights$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + public abstract interface class dev/inmo/tgbotapi/types/business_connection/BusinessConnection : dev/inmo/tgbotapi/abstracts/types/WithBusinessConnectionId { public static final field Companion Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection$Companion; public abstract fun getBusinessConnectionId-T-_HSQI ()Ljava/lang/String; public abstract fun getCanReply ()Z public abstract fun getDate ()Ldev/inmo/tgbotapi/types/TelegramDate; public abstract fun getId-T-_HSQI ()Ljava/lang/String; + public abstract fun getRights ()Ldev/inmo/tgbotapi/types/business_connection/BusinessBotRights; public abstract fun getUser ()Ldev/inmo/tgbotapi/types/chat/PreviewUser; public abstract fun getUserChatId-tHkBKVM ()J public abstract fun isEnabled ()Z @@ -13086,24 +13571,27 @@ public final class dev/inmo/tgbotapi/types/business_connection/BusinessConnectio public final class dev/inmo/tgbotapi/types/business_connection/BusinessConnection$DefaultImpls { public static fun getBusinessConnectionId-T-_HSQI (Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection;)Ljava/lang/String; + public static fun getCanReply (Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection;)Z } public final class dev/inmo/tgbotapi/types/business_connection/BusinessConnection$Disabled : dev/inmo/tgbotapi/types/business_connection/BusinessConnection { public static final field Companion Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection$Disabled$Companion; - public synthetic fun (Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/PreviewUser;JLdev/inmo/tgbotapi/types/TelegramDate;ZLkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/PreviewUser;JLdev/inmo/tgbotapi/types/TelegramDate;Ldev/inmo/tgbotapi/types/business_connection/BusinessBotRights;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/PreviewUser;JLdev/inmo/tgbotapi/types/TelegramDate;Ldev/inmo/tgbotapi/types/business_connection/BusinessBotRights;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1-T-_HSQI ()Ljava/lang/String; public final fun component2 ()Ldev/inmo/tgbotapi/types/chat/PreviewUser; public final fun component3-tHkBKVM ()J public final fun component4 ()Ldev/inmo/tgbotapi/types/TelegramDate; - public final fun component5 ()Z - public final fun copy-mMBKOjE (Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/PreviewUser;JLdev/inmo/tgbotapi/types/TelegramDate;Z)Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection$Disabled; - public static synthetic fun copy-mMBKOjE$default (Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection$Disabled;Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/PreviewUser;JLdev/inmo/tgbotapi/types/TelegramDate;ZILjava/lang/Object;)Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection$Disabled; + public final fun component5 ()Ldev/inmo/tgbotapi/types/business_connection/BusinessBotRights; + public final fun copy-mMBKOjE (Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/PreviewUser;JLdev/inmo/tgbotapi/types/TelegramDate;Ldev/inmo/tgbotapi/types/business_connection/BusinessBotRights;)Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection$Disabled; + public static synthetic fun copy-mMBKOjE$default (Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection$Disabled;Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/PreviewUser;JLdev/inmo/tgbotapi/types/TelegramDate;Ldev/inmo/tgbotapi/types/business_connection/BusinessBotRights;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection$Disabled; public fun equals (Ljava/lang/Object;)Z public fun getBusinessConnectionId-T-_HSQI ()Ljava/lang/String; public synthetic fun getBusinessConnectionId-nXr5wdE ()Ljava/lang/String; public fun getCanReply ()Z public fun getDate ()Ldev/inmo/tgbotapi/types/TelegramDate; public fun getId-T-_HSQI ()Ljava/lang/String; + public fun getRights ()Ldev/inmo/tgbotapi/types/business_connection/BusinessBotRights; public fun getUser ()Ldev/inmo/tgbotapi/types/chat/PreviewUser; public fun getUserChatId-tHkBKVM ()J public fun hashCode ()I @@ -13127,20 +13615,22 @@ public final class dev/inmo/tgbotapi/types/business_connection/BusinessConnectio public final class dev/inmo/tgbotapi/types/business_connection/BusinessConnection$Enabled : dev/inmo/tgbotapi/types/business_connection/BusinessConnection { public static final field Companion Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection$Enabled$Companion; - public synthetic fun (Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/PreviewUser;JLdev/inmo/tgbotapi/types/TelegramDate;ZLkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/PreviewUser;JLdev/inmo/tgbotapi/types/TelegramDate;Ldev/inmo/tgbotapi/types/business_connection/BusinessBotRights;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/PreviewUser;JLdev/inmo/tgbotapi/types/TelegramDate;Ldev/inmo/tgbotapi/types/business_connection/BusinessBotRights;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1-T-_HSQI ()Ljava/lang/String; public final fun component2 ()Ldev/inmo/tgbotapi/types/chat/PreviewUser; public final fun component3-tHkBKVM ()J public final fun component4 ()Ldev/inmo/tgbotapi/types/TelegramDate; - public final fun component5 ()Z - public final fun copy-mMBKOjE (Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/PreviewUser;JLdev/inmo/tgbotapi/types/TelegramDate;Z)Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection$Enabled; - public static synthetic fun copy-mMBKOjE$default (Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection$Enabled;Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/PreviewUser;JLdev/inmo/tgbotapi/types/TelegramDate;ZILjava/lang/Object;)Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection$Enabled; + public final fun component5 ()Ldev/inmo/tgbotapi/types/business_connection/BusinessBotRights; + public final fun copy-mMBKOjE (Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/PreviewUser;JLdev/inmo/tgbotapi/types/TelegramDate;Ldev/inmo/tgbotapi/types/business_connection/BusinessBotRights;)Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection$Enabled; + public static synthetic fun copy-mMBKOjE$default (Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection$Enabled;Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/PreviewUser;JLdev/inmo/tgbotapi/types/TelegramDate;Ldev/inmo/tgbotapi/types/business_connection/BusinessBotRights;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/business_connection/BusinessConnection$Enabled; public fun equals (Ljava/lang/Object;)Z public fun getBusinessConnectionId-T-_HSQI ()Ljava/lang/String; public synthetic fun getBusinessConnectionId-nXr5wdE ()Ljava/lang/String; public fun getCanReply ()Z public fun getDate ()Ldev/inmo/tgbotapi/types/TelegramDate; public fun getId-T-_HSQI ()Ljava/lang/String; + public fun getRights ()Ldev/inmo/tgbotapi/types/business_connection/BusinessBotRights; public fun getUser ()Ldev/inmo/tgbotapi/types/chat/PreviewUser; public fun getUserChatId-tHkBKVM ()J public fun hashCode ()I @@ -19127,14 +19617,17 @@ public abstract interface class dev/inmo/tgbotapi/types/media/WithCustomizableCa } public final class dev/inmo/tgbotapi/types/message/AnonymousForumContentMessageImpl : dev/inmo/tgbotapi/types/message/abstracts/AnonymousForumContentMessage { - public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewForumChat;JJDLdev/inmo/tgbotapi/types/message/ForwardInfo;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewForumChat;JJDLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewForumChat;JJDLdev/inmo/tgbotapi/types/message/ForwardInfo;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewForumChat;JJDLdev/inmo/tgbotapi/types/message/ForwardInfo;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewForumChat;JJDLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewForumChat;JJDLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ldev/inmo/tgbotapi/types/chat/PreviewForumChat; public final fun component10 ()Ldev/inmo/tgbotapi/types/message/content/MessageContent; public final fun component11 ()Ldev/inmo/tgbotapi/types/chat/CommonBot; public final fun component12 ()Ljava/lang/String; public final fun component13-CsYhHCU ()Ljava/lang/String; public final fun component14 ()Z + public final fun component15 ()Ljava/lang/Integer; public final fun component2-APLFQys ()J public final fun component3-hDmiKeI ()J public final fun component4-Wg0KzQs ()D @@ -19143,8 +19636,8 @@ public final class dev/inmo/tgbotapi/types/message/AnonymousForumContentMessageI public final fun component7 ()Z public final fun component8 ()Ldev/inmo/tgbotapi/types/ReplyInfo; public final fun component9 ()Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup; - public final fun copy-mE8Gsnc (Ldev/inmo/tgbotapi/types/chat/PreviewForumChat;JJDLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;Z)Ldev/inmo/tgbotapi/types/message/AnonymousForumContentMessageImpl; - public static synthetic fun copy-mE8Gsnc$default (Ldev/inmo/tgbotapi/types/message/AnonymousForumContentMessageImpl;Ldev/inmo/tgbotapi/types/chat/PreviewForumChat;JJDLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZILjava/lang/Object;)Ldev/inmo/tgbotapi/types/message/AnonymousForumContentMessageImpl; + public final fun copy-KKz6q18 (Ldev/inmo/tgbotapi/types/chat/PreviewForumChat;JJDLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;)Ldev/inmo/tgbotapi/types/message/AnonymousForumContentMessageImpl; + public static synthetic fun copy-KKz6q18$default (Ldev/inmo/tgbotapi/types/message/AnonymousForumContentMessageImpl;Ldev/inmo/tgbotapi/types/chat/PreviewForumChat;JJDLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/message/AnonymousForumContentMessageImpl; public fun equals (Ljava/lang/Object;)Z public fun getAuthorSignature ()Ljava/lang/String; public fun getBusinessConnectionId-nXr5wdE ()Ljava/lang/String; @@ -19153,6 +19646,7 @@ public final class dev/inmo/tgbotapi/types/message/AnonymousForumContentMessageI public synthetic fun getChat ()Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat; public synthetic fun getChat ()Ldev/inmo/tgbotapi/types/chat/PreviewPublicChat; public fun getContent ()Ldev/inmo/tgbotapi/types/message/content/MessageContent; + public fun getCost ()Ljava/lang/Integer; public fun getDate-Wg0KzQs ()D public fun getEditDate-Ivn3T5g ()Lkorlibs/time/DateTime; public fun getForwardInfo ()Ldev/inmo/tgbotapi/types/message/ForwardInfo; @@ -19177,13 +19671,16 @@ public final class dev/inmo/tgbotapi/types/message/AnonymousForumContentMessageI } public final class dev/inmo/tgbotapi/types/message/AnonymousGroupContentMessageImpl : dev/inmo/tgbotapi/types/message/abstracts/AnonymousGroupContentMessage { - public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;JDLdev/inmo/tgbotapi/types/message/ForwardInfo;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;JDLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;JDLdev/inmo/tgbotapi/types/message/ForwardInfo;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;JDLdev/inmo/tgbotapi/types/message/ForwardInfo;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;JDLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;JDLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat; public final fun component10 ()Ldev/inmo/tgbotapi/types/chat/CommonBot; public final fun component11 ()Ljava/lang/String; public final fun component12-CsYhHCU ()Ljava/lang/String; public final fun component13 ()Z + public final fun component14 ()Ljava/lang/Integer; public final fun component2-APLFQys ()J public final fun component3-Wg0KzQs ()D public final fun component4 ()Ldev/inmo/tgbotapi/types/message/MessageOrigin; @@ -19192,8 +19689,8 @@ public final class dev/inmo/tgbotapi/types/message/AnonymousGroupContentMessageI public final fun component7 ()Ldev/inmo/tgbotapi/types/ReplyInfo; public final fun component8 ()Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup; public final fun component9 ()Ldev/inmo/tgbotapi/types/message/content/MessageContent; - public final fun copy-sHfLQ0w (Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;JDLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;Z)Ldev/inmo/tgbotapi/types/message/AnonymousGroupContentMessageImpl; - public static synthetic fun copy-sHfLQ0w$default (Ldev/inmo/tgbotapi/types/message/AnonymousGroupContentMessageImpl;Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;JDLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZILjava/lang/Object;)Ldev/inmo/tgbotapi/types/message/AnonymousGroupContentMessageImpl; + public final fun copy--qyKm_c (Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;JDLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;)Ldev/inmo/tgbotapi/types/message/AnonymousGroupContentMessageImpl; + public static synthetic fun copy--qyKm_c$default (Ldev/inmo/tgbotapi/types/message/AnonymousGroupContentMessageImpl;Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;JDLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/message/AnonymousGroupContentMessageImpl; public fun equals (Ljava/lang/Object;)Z public fun getAuthorSignature ()Ljava/lang/String; public fun getBusinessConnectionId-nXr5wdE ()Ljava/lang/String; @@ -19201,6 +19698,7 @@ public final class dev/inmo/tgbotapi/types/message/AnonymousGroupContentMessageI public fun getChat ()Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat; public synthetic fun getChat ()Ldev/inmo/tgbotapi/types/chat/PreviewPublicChat; public fun getContent ()Ldev/inmo/tgbotapi/types/message/content/MessageContent; + public fun getCost ()Ljava/lang/Integer; public fun getDate-Wg0KzQs ()D public fun getEditDate-Ivn3T5g ()Lkorlibs/time/DateTime; public fun getForwardInfo ()Ldev/inmo/tgbotapi/types/message/ForwardInfo; @@ -19223,7 +19721,8 @@ public final class dev/inmo/tgbotapi/types/message/AnonymousGroupContentMessageI public final class dev/inmo/tgbotapi/types/message/BusinessContentMessageImpl : dev/inmo/tgbotapi/types/message/abstracts/BusinessContentMessage { public synthetic fun (JLdev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/chat/PreviewBusinessChat;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/content/MessageContent;DLkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/ForwardInfo;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/PreviewBot;ZLkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (JLdev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/chat/PreviewBusinessChat;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/content/MessageContent;DLkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/MessageOrigin;Ldev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/PreviewBot;ZLkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (JLdev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/chat/PreviewBusinessChat;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/content/MessageContent;DLkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/MessageOrigin;Ldev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/PreviewBot;ZLjava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (JLdev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/chat/PreviewBusinessChat;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/content/MessageContent;DLkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/MessageOrigin;Ldev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/PreviewBot;ZLjava/lang/Integer;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1-APLFQys ()J public final fun component10 ()Ldev/inmo/tgbotapi/types/ReplyInfo; public final fun component11 ()Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup; @@ -19231,6 +19730,7 @@ public final class dev/inmo/tgbotapi/types/message/BusinessContentMessageImpl : public final fun component13-CsYhHCU ()Ljava/lang/String; public final fun component14 ()Ldev/inmo/tgbotapi/types/chat/PreviewBot; public final fun component15 ()Z + public final fun component16 ()Ljava/lang/Integer; public final fun component2 ()Ldev/inmo/tgbotapi/types/chat/User; public final fun component3 ()Ldev/inmo/tgbotapi/types/chat/PreviewBusinessChat; public final fun component4-T-_HSQI ()Ljava/lang/String; @@ -19239,14 +19739,15 @@ public final class dev/inmo/tgbotapi/types/message/BusinessContentMessageImpl : public final fun component7-Ivn3T5g ()Lkorlibs/time/DateTime; public final fun component8 ()Z public final fun component9 ()Ldev/inmo/tgbotapi/types/message/MessageOrigin; - public final fun copy-bL9LGzA (JLdev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/chat/PreviewBusinessChat;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/content/MessageContent;DLkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/MessageOrigin;Ldev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/PreviewBot;Z)Ldev/inmo/tgbotapi/types/message/BusinessContentMessageImpl; - public static synthetic fun copy-bL9LGzA$default (Ldev/inmo/tgbotapi/types/message/BusinessContentMessageImpl;JLdev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/chat/PreviewBusinessChat;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/content/MessageContent;DLkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/MessageOrigin;Ldev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/PreviewBot;ZILjava/lang/Object;)Ldev/inmo/tgbotapi/types/message/BusinessContentMessageImpl; + public final fun copy-PSWaC3g (JLdev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/chat/PreviewBusinessChat;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/content/MessageContent;DLkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/MessageOrigin;Ldev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/PreviewBot;ZLjava/lang/Integer;)Ldev/inmo/tgbotapi/types/message/BusinessContentMessageImpl; + public static synthetic fun copy-PSWaC3g$default (Ldev/inmo/tgbotapi/types/message/BusinessContentMessageImpl;JLdev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/chat/PreviewBusinessChat;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/content/MessageContent;DLkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/MessageOrigin;Ldev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ldev/inmo/tgbotapi/types/chat/PreviewBot;ZLjava/lang/Integer;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/message/BusinessContentMessageImpl; public fun equals (Ljava/lang/Object;)Z public fun getBusinessConnectionId-T-_HSQI ()Ljava/lang/String; public synthetic fun getBusinessConnectionId-nXr5wdE ()Ljava/lang/String; public fun getChat ()Ldev/inmo/tgbotapi/types/chat/PreviewBusinessChat; public synthetic fun getChat ()Ldev/inmo/tgbotapi/types/chat/PreviewChat; public fun getContent ()Ldev/inmo/tgbotapi/types/message/content/MessageContent; + public fun getCost ()Ljava/lang/Integer; public fun getDate-Wg0KzQs ()D public fun getEditDate-Ivn3T5g ()Lkorlibs/time/DateTime; public fun getForwardInfo ()Ldev/inmo/tgbotapi/types/message/ForwardInfo; @@ -19271,13 +19772,15 @@ public final class dev/inmo/tgbotapi/types/message/BusinessContentMessageImpl : public final class dev/inmo/tgbotapi/types/message/ChannelContentMessageImpl : dev/inmo/tgbotapi/types/message/abstracts/ChannelContentMessage { public synthetic fun (JLdev/inmo/tgbotapi/types/chat/PreviewChannelChat;Ldev/inmo/tgbotapi/types/chat/PreviewChat;Ldev/inmo/tgbotapi/types/message/content/MessageContent;DLkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/ForwardInfo;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (JLdev/inmo/tgbotapi/types/chat/PreviewChannelChat;Ldev/inmo/tgbotapi/types/chat/PreviewChat;Ldev/inmo/tgbotapi/types/message/content/MessageContent;DLkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/MessageOrigin;Ldev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (JLdev/inmo/tgbotapi/types/chat/PreviewChannelChat;Ldev/inmo/tgbotapi/types/chat/PreviewChat;Ldev/inmo/tgbotapi/types/message/content/MessageContent;DLkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/MessageOrigin;Ldev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (JLdev/inmo/tgbotapi/types/chat/PreviewChannelChat;Ldev/inmo/tgbotapi/types/chat/PreviewChat;Ldev/inmo/tgbotapi/types/message/content/MessageContent;DLkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/MessageOrigin;Ldev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1-APLFQys ()J public final fun component10 ()Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup; public final fun component11 ()Ldev/inmo/tgbotapi/types/chat/CommonBot; public final fun component12 ()Ljava/lang/String; public final fun component13-CsYhHCU ()Ljava/lang/String; public final fun component14 ()Z + public final fun component15 ()Ljava/lang/Integer; public final fun component2 ()Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat; public final fun component3 ()Ldev/inmo/tgbotapi/types/chat/PreviewChat; public final fun component4 ()Ldev/inmo/tgbotapi/types/message/content/MessageContent; @@ -19286,14 +19789,15 @@ public final class dev/inmo/tgbotapi/types/message/ChannelContentMessageImpl : d public final fun component7 ()Z public final fun component8 ()Ldev/inmo/tgbotapi/types/message/MessageOrigin; public final fun component9 ()Ldev/inmo/tgbotapi/types/ReplyInfo; - public final fun copy-sAAtVUk (JLdev/inmo/tgbotapi/types/chat/PreviewChannelChat;Ldev/inmo/tgbotapi/types/chat/PreviewChat;Ldev/inmo/tgbotapi/types/message/content/MessageContent;DLkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/MessageOrigin;Ldev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;Z)Ldev/inmo/tgbotapi/types/message/ChannelContentMessageImpl; - public static synthetic fun copy-sAAtVUk$default (Ldev/inmo/tgbotapi/types/message/ChannelContentMessageImpl;JLdev/inmo/tgbotapi/types/chat/PreviewChannelChat;Ldev/inmo/tgbotapi/types/chat/PreviewChat;Ldev/inmo/tgbotapi/types/message/content/MessageContent;DLkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/MessageOrigin;Ldev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZILjava/lang/Object;)Ldev/inmo/tgbotapi/types/message/ChannelContentMessageImpl; + public final fun copy-7GInyb0 (JLdev/inmo/tgbotapi/types/chat/PreviewChannelChat;Ldev/inmo/tgbotapi/types/chat/PreviewChat;Ldev/inmo/tgbotapi/types/message/content/MessageContent;DLkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/MessageOrigin;Ldev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;)Ldev/inmo/tgbotapi/types/message/ChannelContentMessageImpl; + public static synthetic fun copy-7GInyb0$default (Ldev/inmo/tgbotapi/types/message/ChannelContentMessageImpl;JLdev/inmo/tgbotapi/types/chat/PreviewChannelChat;Ldev/inmo/tgbotapi/types/chat/PreviewChat;Ldev/inmo/tgbotapi/types/message/content/MessageContent;DLkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/MessageOrigin;Ldev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/message/ChannelContentMessageImpl; public fun equals (Ljava/lang/Object;)Z public fun getAuthorSignature ()Ljava/lang/String; public fun getBusinessConnectionId-nXr5wdE ()Ljava/lang/String; public fun getChat ()Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat; public synthetic fun getChat ()Ldev/inmo/tgbotapi/types/chat/PreviewChat; public fun getContent ()Ldev/inmo/tgbotapi/types/message/content/MessageContent; + public fun getCost ()Ljava/lang/Integer; public fun getDate-Wg0KzQs ()D public fun getEditDate-Ivn3T5g ()Lkorlibs/time/DateTime; public fun getForwardInfo ()Ldev/inmo/tgbotapi/types/message/ForwardInfo; @@ -19816,8 +20320,10 @@ public final class dev/inmo/tgbotapi/types/message/ChatEvents/voice/VideoChatSta } public final class dev/inmo/tgbotapi/types/message/CommonForumContentMessageImpl : dev/inmo/tgbotapi/types/message/abstracts/CommonForumContentMessage { - public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewForumChat;JJLdev/inmo/tgbotapi/types/chat/User;DLdev/inmo/tgbotapi/types/message/ForwardInfo;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/Integer;ZLkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewForumChat;JJLdev/inmo/tgbotapi/types/chat/User;DLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/Integer;ZLkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewForumChat;JJLdev/inmo/tgbotapi/types/chat/User;DLdev/inmo/tgbotapi/types/message/ForwardInfo;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/Integer;ZLjava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewForumChat;JJLdev/inmo/tgbotapi/types/chat/User;DLdev/inmo/tgbotapi/types/message/ForwardInfo;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/Integer;ZLjava/lang/Integer;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewForumChat;JJLdev/inmo/tgbotapi/types/chat/User;DLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/Integer;ZLjava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewForumChat;JJLdev/inmo/tgbotapi/types/chat/User;DLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/Integer;ZLjava/lang/Integer;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ldev/inmo/tgbotapi/types/chat/PreviewForumChat; public final fun component10 ()Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup; public final fun component11 ()Ldev/inmo/tgbotapi/types/message/content/MessageContent; @@ -19825,6 +20331,7 @@ public final class dev/inmo/tgbotapi/types/message/CommonForumContentMessageImpl public final fun component13-CsYhHCU ()Ljava/lang/String; public final fun component14 ()Ljava/lang/Integer; public final fun component15 ()Z + public final fun component16 ()Ljava/lang/Integer; public final fun component2-APLFQys ()J public final fun component3-hDmiKeI ()J public final fun component4 ()Ldev/inmo/tgbotapi/types/chat/User; @@ -19833,8 +20340,8 @@ public final class dev/inmo/tgbotapi/types/message/CommonForumContentMessageImpl public final fun component7-Ivn3T5g ()Lkorlibs/time/DateTime; public final fun component8 ()Z public final fun component9 ()Ldev/inmo/tgbotapi/types/ReplyInfo; - public final fun copy-Dm2O2gk (Ldev/inmo/tgbotapi/types/chat/PreviewForumChat;JJLdev/inmo/tgbotapi/types/chat/User;DLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/Integer;Z)Ldev/inmo/tgbotapi/types/message/CommonForumContentMessageImpl; - public static synthetic fun copy-Dm2O2gk$default (Ldev/inmo/tgbotapi/types/message/CommonForumContentMessageImpl;Ldev/inmo/tgbotapi/types/chat/PreviewForumChat;JJLdev/inmo/tgbotapi/types/chat/User;DLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/Integer;ZILjava/lang/Object;)Ldev/inmo/tgbotapi/types/message/CommonForumContentMessageImpl; + public final fun copy-_c83v58 (Ldev/inmo/tgbotapi/types/chat/PreviewForumChat;JJLdev/inmo/tgbotapi/types/chat/User;DLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/Integer;ZLjava/lang/Integer;)Ldev/inmo/tgbotapi/types/message/CommonForumContentMessageImpl; + public static synthetic fun copy-_c83v58$default (Ldev/inmo/tgbotapi/types/message/CommonForumContentMessageImpl;Ldev/inmo/tgbotapi/types/chat/PreviewForumChat;JJLdev/inmo/tgbotapi/types/chat/User;DLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/Integer;ZLjava/lang/Integer;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/message/CommonForumContentMessageImpl; public fun equals (Ljava/lang/Object;)Z public fun getBusinessConnectionId-nXr5wdE ()Ljava/lang/String; public synthetic fun getChat ()Ldev/inmo/tgbotapi/types/chat/PreviewChat; @@ -19842,6 +20349,7 @@ public final class dev/inmo/tgbotapi/types/message/CommonForumContentMessageImpl public synthetic fun getChat ()Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat; public synthetic fun getChat ()Ldev/inmo/tgbotapi/types/chat/PreviewPublicChat; public fun getContent ()Ldev/inmo/tgbotapi/types/message/content/MessageContent; + public fun getCost ()Ljava/lang/Integer; public fun getDate-Wg0KzQs ()D public fun getEditDate-Ivn3T5g ()Lkorlibs/time/DateTime; public fun getForwardInfo ()Ldev/inmo/tgbotapi/types/message/ForwardInfo; @@ -19867,14 +20375,17 @@ public final class dev/inmo/tgbotapi/types/message/CommonForumContentMessageImpl } public final class dev/inmo/tgbotapi/types/message/CommonGroupContentMessageImpl : dev/inmo/tgbotapi/types/message/abstracts/CommonGroupContentMessage { - public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;JLdev/inmo/tgbotapi/types/chat/User;DLdev/inmo/tgbotapi/types/message/ForwardInfo;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/Integer;ZLkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;JLdev/inmo/tgbotapi/types/chat/User;DLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/Integer;ZLkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;JLdev/inmo/tgbotapi/types/chat/User;DLdev/inmo/tgbotapi/types/message/ForwardInfo;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/Integer;ZLjava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;JLdev/inmo/tgbotapi/types/chat/User;DLdev/inmo/tgbotapi/types/message/ForwardInfo;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/Integer;ZLjava/lang/Integer;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;JLdev/inmo/tgbotapi/types/chat/User;DLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/Integer;ZLjava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;JLdev/inmo/tgbotapi/types/chat/User;DLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/Integer;ZLjava/lang/Integer;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat; public final fun component10 ()Ldev/inmo/tgbotapi/types/message/content/MessageContent; public final fun component11 ()Ldev/inmo/tgbotapi/types/chat/CommonBot; public final fun component12-CsYhHCU ()Ljava/lang/String; public final fun component13 ()Ljava/lang/Integer; public final fun component14 ()Z + public final fun component15 ()Ljava/lang/Integer; public final fun component2-APLFQys ()J public final fun component3 ()Ldev/inmo/tgbotapi/types/chat/User; public final fun component4-Wg0KzQs ()D @@ -19883,14 +20394,15 @@ public final class dev/inmo/tgbotapi/types/message/CommonGroupContentMessageImpl public final fun component7 ()Z public final fun component8 ()Ldev/inmo/tgbotapi/types/ReplyInfo; public final fun component9 ()Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup; - public final fun copy-YdV3BB4 (Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;JLdev/inmo/tgbotapi/types/chat/User;DLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/Integer;Z)Ldev/inmo/tgbotapi/types/message/CommonGroupContentMessageImpl; - public static synthetic fun copy-YdV3BB4$default (Ldev/inmo/tgbotapi/types/message/CommonGroupContentMessageImpl;Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;JLdev/inmo/tgbotapi/types/chat/User;DLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/Integer;ZILjava/lang/Object;)Ldev/inmo/tgbotapi/types/message/CommonGroupContentMessageImpl; + public final fun copy-vFzrh-s (Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;JLdev/inmo/tgbotapi/types/chat/User;DLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/Integer;ZLjava/lang/Integer;)Ldev/inmo/tgbotapi/types/message/CommonGroupContentMessageImpl; + public static synthetic fun copy-vFzrh-s$default (Ldev/inmo/tgbotapi/types/message/CommonGroupContentMessageImpl;Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;JLdev/inmo/tgbotapi/types/chat/User;DLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/Integer;ZLjava/lang/Integer;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/message/CommonGroupContentMessageImpl; public fun equals (Ljava/lang/Object;)Z public fun getBusinessConnectionId-nXr5wdE ()Ljava/lang/String; public synthetic fun getChat ()Ldev/inmo/tgbotapi/types/chat/PreviewChat; public fun getChat ()Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat; public synthetic fun getChat ()Ldev/inmo/tgbotapi/types/chat/PreviewPublicChat; public fun getContent ()Ldev/inmo/tgbotapi/types/message/content/MessageContent; + public fun getCost ()Ljava/lang/Integer; public fun getDate-Wg0KzQs ()D public fun getEditDate-Ivn3T5g ()Lkorlibs/time/DateTime; public fun getForwardInfo ()Ldev/inmo/tgbotapi/types/message/ForwardInfo; @@ -19962,14 +20474,17 @@ public final class dev/inmo/tgbotapi/types/message/CommonSupergroupEventMessage } public final class dev/inmo/tgbotapi/types/message/ConnectedFromChannelGroupContentMessageImpl : dev/inmo/tgbotapi/types/message/abstracts/ConnectedFromChannelGroupContentMessage { - public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;JDLdev/inmo/tgbotapi/types/message/ForwardInfo;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;JDLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;JDLdev/inmo/tgbotapi/types/message/ForwardInfo;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;JDLdev/inmo/tgbotapi/types/message/ForwardInfo;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;JDLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;JDLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat; public final fun component10 ()Ldev/inmo/tgbotapi/types/message/content/MessageContent; public final fun component11 ()Ldev/inmo/tgbotapi/types/chat/CommonBot; public final fun component12 ()Ljava/lang/String; public final fun component13-CsYhHCU ()Ljava/lang/String; public final fun component14 ()Z + public final fun component15 ()Ljava/lang/Integer; public final fun component2 ()Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat; public final fun component3-APLFQys ()J public final fun component4-Wg0KzQs ()D @@ -19978,8 +20493,8 @@ public final class dev/inmo/tgbotapi/types/message/ConnectedFromChannelGroupCont public final fun component7 ()Z public final fun component8 ()Ldev/inmo/tgbotapi/types/ReplyInfo; public final fun component9 ()Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup; - public final fun copy-3UVOdk8 (Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;JDLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;Z)Ldev/inmo/tgbotapi/types/message/ConnectedFromChannelGroupContentMessageImpl; - public static synthetic fun copy-3UVOdk8$default (Ldev/inmo/tgbotapi/types/message/ConnectedFromChannelGroupContentMessageImpl;Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;JDLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZILjava/lang/Object;)Ldev/inmo/tgbotapi/types/message/ConnectedFromChannelGroupContentMessageImpl; + public final fun copy-DncI55Y (Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;JDLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;)Ldev/inmo/tgbotapi/types/message/ConnectedFromChannelGroupContentMessageImpl; + public static synthetic fun copy-DncI55Y$default (Ldev/inmo/tgbotapi/types/message/ConnectedFromChannelGroupContentMessageImpl;Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;JDLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/message/ConnectedFromChannelGroupContentMessageImpl; public fun equals (Ljava/lang/Object;)Z public fun getAuthorSignature ()Ljava/lang/String; public fun getBusinessConnectionId-nXr5wdE ()Ljava/lang/String; @@ -19988,6 +20503,7 @@ public final class dev/inmo/tgbotapi/types/message/ConnectedFromChannelGroupCont public fun getChat ()Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat; public synthetic fun getChat ()Ldev/inmo/tgbotapi/types/chat/PreviewPublicChat; public fun getContent ()Ldev/inmo/tgbotapi/types/message/content/MessageContent; + public fun getCost ()Ljava/lang/Integer; public fun getDate-Wg0KzQs ()D public fun getEditDate-Ivn3T5g ()Lkorlibs/time/DateTime; public fun getForwardInfo ()Ldev/inmo/tgbotapi/types/message/ForwardInfo; @@ -20099,8 +20615,10 @@ public final class dev/inmo/tgbotapi/types/message/ForwardInfoKt { } public final class dev/inmo/tgbotapi/types/message/FromChannelForumContentMessageImpl : dev/inmo/tgbotapi/types/message/abstracts/FromChannelForumContentMessage { - public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewForumChat;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;JJDLdev/inmo/tgbotapi/types/message/ForwardInfo;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewForumChat;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;JJDLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewForumChat;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;JJDLdev/inmo/tgbotapi/types/message/ForwardInfo;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewForumChat;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;JJDLdev/inmo/tgbotapi/types/message/ForwardInfo;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewForumChat;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;JJDLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewForumChat;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;JJDLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ldev/inmo/tgbotapi/types/chat/PreviewForumChat; public final fun component10 ()Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup; public final fun component11 ()Ldev/inmo/tgbotapi/types/message/content/MessageContent; @@ -20108,6 +20626,7 @@ public final class dev/inmo/tgbotapi/types/message/FromChannelForumContentMessag public final fun component13 ()Ljava/lang/String; public final fun component14-CsYhHCU ()Ljava/lang/String; public final fun component15 ()Z + public final fun component16 ()Ljava/lang/Integer; public final fun component2 ()Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat; public final fun component3-APLFQys ()J public final fun component4-hDmiKeI ()J @@ -20116,8 +20635,8 @@ public final class dev/inmo/tgbotapi/types/message/FromChannelForumContentMessag public final fun component7-Ivn3T5g ()Lkorlibs/time/DateTime; public final fun component8 ()Z public final fun component9 ()Ldev/inmo/tgbotapi/types/ReplyInfo; - public final fun copy-tv7IIxI (Ldev/inmo/tgbotapi/types/chat/PreviewForumChat;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;JJDLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;Z)Ldev/inmo/tgbotapi/types/message/FromChannelForumContentMessageImpl; - public static synthetic fun copy-tv7IIxI$default (Ldev/inmo/tgbotapi/types/message/FromChannelForumContentMessageImpl;Ldev/inmo/tgbotapi/types/chat/PreviewForumChat;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;JJDLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZILjava/lang/Object;)Ldev/inmo/tgbotapi/types/message/FromChannelForumContentMessageImpl; + public final fun copy-T1kMFck (Ldev/inmo/tgbotapi/types/chat/PreviewForumChat;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;JJDLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;)Ldev/inmo/tgbotapi/types/message/FromChannelForumContentMessageImpl; + public static synthetic fun copy-T1kMFck$default (Ldev/inmo/tgbotapi/types/message/FromChannelForumContentMessageImpl;Ldev/inmo/tgbotapi/types/chat/PreviewForumChat;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;JJDLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/message/FromChannelForumContentMessageImpl; public fun equals (Ljava/lang/Object;)Z public fun getAuthorSignature ()Ljava/lang/String; public fun getBusinessConnectionId-nXr5wdE ()Ljava/lang/String; @@ -20127,6 +20646,7 @@ public final class dev/inmo/tgbotapi/types/message/FromChannelForumContentMessag public synthetic fun getChat ()Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat; public synthetic fun getChat ()Ldev/inmo/tgbotapi/types/chat/PreviewPublicChat; public fun getContent ()Ldev/inmo/tgbotapi/types/message/content/MessageContent; + public fun getCost ()Ljava/lang/Integer; public fun getDate-Wg0KzQs ()D public fun getEditDate-Ivn3T5g ()Lkorlibs/time/DateTime; public fun getForwardInfo ()Ldev/inmo/tgbotapi/types/message/ForwardInfo; @@ -20399,13 +20919,15 @@ public final class dev/inmo/tgbotapi/types/message/PassportMessage : dev/inmo/tg public final class dev/inmo/tgbotapi/types/message/PrivateContentMessageImpl : dev/inmo/tgbotapi/types/message/abstracts/PrivateContentMessage { public synthetic fun (JLdev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/chat/PreviewPrivateChat;Ldev/inmo/tgbotapi/types/message/content/MessageContent;DLkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/ForwardInfo;Ldev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;ZLjava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (JLdev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/chat/PreviewPrivateChat;Ldev/inmo/tgbotapi/types/message/content/MessageContent;DLkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/MessageOrigin;Ldev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;ZLjava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (JLdev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/chat/PreviewPrivateChat;Ldev/inmo/tgbotapi/types/message/content/MessageContent;DLkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/MessageOrigin;Ldev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;ZLjava/lang/String;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (JLdev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/chat/PreviewPrivateChat;Ldev/inmo/tgbotapi/types/message/content/MessageContent;DLkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/MessageOrigin;Ldev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;ZLjava/lang/String;Ljava/lang/Integer;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1-APLFQys ()J public final fun component10 ()Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup; public final fun component11 ()Ldev/inmo/tgbotapi/types/chat/CommonBot; public final fun component12-CsYhHCU ()Ljava/lang/String; public final fun component13 ()Z public final fun component14-Ts0V7ak ()Ljava/lang/String; + public final fun component15 ()Ljava/lang/Integer; public final fun component2 ()Ldev/inmo/tgbotapi/types/chat/User; public final fun component3 ()Ldev/inmo/tgbotapi/types/chat/PreviewPrivateChat; public final fun component4 ()Ldev/inmo/tgbotapi/types/message/content/MessageContent; @@ -20414,13 +20936,14 @@ public final class dev/inmo/tgbotapi/types/message/PrivateContentMessageImpl : d public final fun component7 ()Z public final fun component8 ()Ldev/inmo/tgbotapi/types/message/MessageOrigin; public final fun component9 ()Ldev/inmo/tgbotapi/types/ReplyInfo; - public final fun copy-miUDFpY (JLdev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/chat/PreviewPrivateChat;Ldev/inmo/tgbotapi/types/message/content/MessageContent;DLkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/MessageOrigin;Ldev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;ZLjava/lang/String;)Ldev/inmo/tgbotapi/types/message/PrivateContentMessageImpl; - public static synthetic fun copy-miUDFpY$default (Ldev/inmo/tgbotapi/types/message/PrivateContentMessageImpl;JLdev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/chat/PreviewPrivateChat;Ldev/inmo/tgbotapi/types/message/content/MessageContent;DLkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/MessageOrigin;Ldev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;ZLjava/lang/String;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/message/PrivateContentMessageImpl; + public final fun copy-qeOfpsw (JLdev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/chat/PreviewPrivateChat;Ldev/inmo/tgbotapi/types/message/content/MessageContent;DLkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/MessageOrigin;Ldev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;ZLjava/lang/String;Ljava/lang/Integer;)Ldev/inmo/tgbotapi/types/message/PrivateContentMessageImpl; + public static synthetic fun copy-qeOfpsw$default (Ldev/inmo/tgbotapi/types/message/PrivateContentMessageImpl;JLdev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/chat/PreviewPrivateChat;Ldev/inmo/tgbotapi/types/message/content/MessageContent;DLkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/MessageOrigin;Ldev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;ZLjava/lang/String;Ljava/lang/Integer;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/message/PrivateContentMessageImpl; public fun equals (Ljava/lang/Object;)Z public fun getBusinessConnectionId-nXr5wdE ()Ljava/lang/String; public synthetic fun getChat ()Ldev/inmo/tgbotapi/types/chat/PreviewChat; public fun getChat ()Ldev/inmo/tgbotapi/types/chat/PreviewPrivateChat; public fun getContent ()Ldev/inmo/tgbotapi/types/message/content/MessageContent; + public fun getCost ()Ljava/lang/Integer; public fun getDate-Wg0KzQs ()D public fun getEditDate-Ivn3T5g ()Lkorlibs/time/DateTime; public fun getEffectId-Ts0V7ak ()Ljava/lang/String; @@ -20514,14 +21037,17 @@ public final class dev/inmo/tgbotapi/types/message/RawMessageEntityKt { } public final class dev/inmo/tgbotapi/types/message/UnconnectedFromChannelGroupContentMessageImpl : dev/inmo/tgbotapi/types/message/abstracts/UnconnectedFromChannelGroupContentMessage { - public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;JDLdev/inmo/tgbotapi/types/message/ForwardInfo;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;JDLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;JDLdev/inmo/tgbotapi/types/message/ForwardInfo;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;JDLdev/inmo/tgbotapi/types/message/ForwardInfo;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;JDLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;JDLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat; public final fun component10 ()Ldev/inmo/tgbotapi/types/message/content/MessageContent; public final fun component11 ()Ldev/inmo/tgbotapi/types/chat/CommonBot; public final fun component12 ()Ljava/lang/String; public final fun component13-CsYhHCU ()Ljava/lang/String; public final fun component14 ()Z + public final fun component15 ()Ljava/lang/Integer; public final fun component2 ()Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat; public final fun component3-APLFQys ()J public final fun component4-Wg0KzQs ()D @@ -20530,8 +21056,8 @@ public final class dev/inmo/tgbotapi/types/message/UnconnectedFromChannelGroupCo public final fun component7 ()Z public final fun component8 ()Ldev/inmo/tgbotapi/types/ReplyInfo; public final fun component9 ()Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup; - public final fun copy-3UVOdk8 (Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;JDLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;Z)Ldev/inmo/tgbotapi/types/message/UnconnectedFromChannelGroupContentMessageImpl; - public static synthetic fun copy-3UVOdk8$default (Ldev/inmo/tgbotapi/types/message/UnconnectedFromChannelGroupContentMessageImpl;Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;JDLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZILjava/lang/Object;)Ldev/inmo/tgbotapi/types/message/UnconnectedFromChannelGroupContentMessageImpl; + public final fun copy-DncI55Y (Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;JDLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;)Ldev/inmo/tgbotapi/types/message/UnconnectedFromChannelGroupContentMessageImpl; + public static synthetic fun copy-DncI55Y$default (Ldev/inmo/tgbotapi/types/message/UnconnectedFromChannelGroupContentMessageImpl;Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;JDLdev/inmo/tgbotapi/types/message/MessageOrigin;Lkorlibs/time/DateTime;ZLdev/inmo/tgbotapi/types/ReplyInfo;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Ldev/inmo/tgbotapi/types/message/content/MessageContent;Ldev/inmo/tgbotapi/types/chat/CommonBot;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/message/UnconnectedFromChannelGroupContentMessageImpl; public fun equals (Ljava/lang/Object;)Z public fun getAuthorSignature ()Ljava/lang/String; public fun getBusinessConnectionId-nXr5wdE ()Ljava/lang/String; @@ -20540,6 +21066,7 @@ public final class dev/inmo/tgbotapi/types/message/UnconnectedFromChannelGroupCo public fun getChat ()Ldev/inmo/tgbotapi/types/chat/PreviewGroupChat; public synthetic fun getChat ()Ldev/inmo/tgbotapi/types/chat/PreviewPublicChat; public fun getContent ()Ldev/inmo/tgbotapi/types/message/content/MessageContent; + public fun getCost ()Ljava/lang/Integer; public fun getDate-Wg0KzQs ()D public fun getEditDate-Ivn3T5g ()Lkorlibs/time/DateTime; public fun getForwardInfo ()Ldev/inmo/tgbotapi/types/message/ForwardInfo; @@ -20660,7 +21187,7 @@ public final class dev/inmo/tgbotapi/types/message/abstracts/CommonGroupContentM public static fun getUser (Ldev/inmo/tgbotapi/types/message/abstracts/CommonGroupContentMessage;)Ldev/inmo/tgbotapi/types/chat/User; } -public abstract interface class dev/inmo/tgbotapi/types/message/abstracts/CommonMessage : dev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage, dev/inmo/tgbotapi/types/message/abstracts/ContentMessage, dev/inmo/tgbotapi/types/message/abstracts/PossiblyBusinessMessage, dev/inmo/tgbotapi/types/message/abstracts/PossiblyEditedMessage, dev/inmo/tgbotapi/types/message/abstracts/PossiblyForwardedMessage, dev/inmo/tgbotapi/types/message/abstracts/PossiblyMarkedUp, dev/inmo/tgbotapi/types/message/abstracts/PossiblyMediaGroupMessage, dev/inmo/tgbotapi/types/message/abstracts/PossiblyOfflineMessage, dev/inmo/tgbotapi/types/message/abstracts/PossiblyReplyMessage { +public abstract interface class dev/inmo/tgbotapi/types/message/abstracts/CommonMessage : dev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage, dev/inmo/tgbotapi/types/message/abstracts/ContentMessage, dev/inmo/tgbotapi/types/message/abstracts/PossiblyBusinessMessage, dev/inmo/tgbotapi/types/message/abstracts/PossiblyEditedMessage, dev/inmo/tgbotapi/types/message/abstracts/PossiblyForwardedMessage, dev/inmo/tgbotapi/types/message/abstracts/PossiblyMarkedUp, dev/inmo/tgbotapi/types/message/abstracts/PossiblyMediaGroupMessage, dev/inmo/tgbotapi/types/message/abstracts/PossiblyOfflineMessage, dev/inmo/tgbotapi/types/message/abstracts/PossiblyPaidMessage, dev/inmo/tgbotapi/types/message/abstracts/PossiblyReplyMessage { } public final class dev/inmo/tgbotapi/types/message/abstracts/CommonMessage$DefaultImpls { @@ -20908,6 +21435,15 @@ public final class dev/inmo/tgbotapi/types/message/abstracts/PossiblyOfflineMess public static fun getMetaInfo-fV8YnZ8 (Ldev/inmo/tgbotapi/types/message/abstracts/PossiblyOfflineMessage;)Lkotlin/Triple; } +public abstract interface class dev/inmo/tgbotapi/types/message/abstracts/PossiblyPaidMessage : dev/inmo/tgbotapi/types/message/abstracts/Message { + public abstract fun getCost ()Ljava/lang/Integer; +} + +public final class dev/inmo/tgbotapi/types/message/abstracts/PossiblyPaidMessage$DefaultImpls { + public static fun getBusinessConnectionId-nXr5wdE (Ldev/inmo/tgbotapi/types/message/abstracts/PossiblyPaidMessage;)Ljava/lang/String; + public static fun getMetaInfo-fV8YnZ8 (Ldev/inmo/tgbotapi/types/message/abstracts/PossiblyPaidMessage;)Lkotlin/Triple; +} + public abstract interface class dev/inmo/tgbotapi/types/message/abstracts/PossiblyPaymentMessage : dev/inmo/tgbotapi/types/message/abstracts/AccessibleMessage { public abstract fun getPaymentInfo ()Ldev/inmo/tgbotapi/types/message/payments/abstracts/PaymentInfo; } @@ -25013,6 +25549,35 @@ public final class dev/inmo/tgbotapi/types/payments/stars/RevenueWithdrawalState public final fun serializer ()Lkotlinx/serialization/KSerializer; } +public final class dev/inmo/tgbotapi/types/payments/stars/StarAmount { + public static final field Companion Ldev/inmo/tgbotapi/types/payments/stars/StarAmount$Companion; + public fun (JJ)V + public synthetic fun (JJILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()J + public final fun component2 ()J + public final fun copy (JJ)Ldev/inmo/tgbotapi/types/payments/stars/StarAmount; + public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/payments/stars/StarAmount;JJILjava/lang/Object;)Ldev/inmo/tgbotapi/types/payments/stars/StarAmount; + public fun equals (Ljava/lang/Object;)Z + public final fun getAmount ()J + public final fun getNanostarAmount ()J + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public synthetic class dev/inmo/tgbotapi/types/payments/stars/StarAmount$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Ldev/inmo/tgbotapi/types/payments/stars/StarAmount$$serializer; + public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/types/payments/stars/StarAmount; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/types/payments/stars/StarAmount;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public final class dev/inmo/tgbotapi/types/payments/stars/StarAmount$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + public abstract interface class dev/inmo/tgbotapi/types/payments/stars/StarTransaction : dev/inmo/tgbotapi/types/payments/abstracts/Amounted { public static final field Companion Ldev/inmo/tgbotapi/types/payments/stars/StarTransaction$Companion; public abstract fun getDate ()Ldev/inmo/tgbotapi/types/TelegramDate; @@ -27155,6 +27720,10 @@ public final class dev/inmo/tgbotapi/utils/DefaultKSLogKt { public static final fun setDefaultKTgBotAPIKSLogSystemTag (Ljava/lang/String;)V } +public final class dev/inmo/tgbotapi/utils/DeserializeWithUnknownKt { + public static final fun deserializeWithRaw (Lkotlinx/serialization/encoding/Decoder;Lkotlinx/serialization/KSerializer;)Lkotlin/Pair; +} + public final class dev/inmo/tgbotapi/utils/EntitiesBuilder { public fun ()V public fun (Ldev/inmo/tgbotapi/types/message/textsources/TextSource;)V diff --git a/tgbotapi.utils/api/tgbotapi.utils.api b/tgbotapi.utils/api/tgbotapi.utils.api index 84358fc933..359166e3f1 100644 --- a/tgbotapi.utils/api/tgbotapi.utils.api +++ b/tgbotapi.utils/api/tgbotapi.utils.api @@ -1794,6 +1794,7 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt { public static final fun ifPaidMediaInfoContent (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifPaidMediaPurchased (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifPaidMediaPurchasedUpdate (Ldev/inmo/tgbotapi/types/update/abstracts/Update;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; + public static final fun ifPaidMessagePriceChanged (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifPassport (Ldev/inmo/tgbotapi/types/passport/encrypted/abstracts/EncryptedPassportElement;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifPassportElementErrorDataField (Ldev/inmo/tgbotapi/types/passport/PassportElementError;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifPassportElementErrorFile (Ldev/inmo/tgbotapi/types/passport/PassportElementError;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; @@ -1834,6 +1835,7 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt { public static final fun ifPossiblyForwardedMessage (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifPossiblyMediaGroupMessage (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifPossiblyOfflineMessage (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; + public static final fun ifPossiblyPaidMessage (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifPossiblyPaymentMessage (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifPossiblyPremiumChat (Ldev/inmo/tgbotapi/types/chat/Chat;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifPossiblySentViaBotCommonMessage (Ldev/inmo/tgbotapi/types/message/abstracts/Message;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; @@ -2222,6 +2224,8 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt { public static final fun paidMediaPurchasedOrThrow (Ldev/inmo/tgbotapi/abstracts/OptionallyWithUser;)Ldev/inmo/tgbotapi/types/message/payments/PaidMediaPurchased; public static final fun paidMediaPurchasedUpdateOrNull (Ldev/inmo/tgbotapi/types/update/abstracts/Update;)Ldev/inmo/tgbotapi/types/update/PaidMediaPurchasedUpdate; public static final fun paidMediaPurchasedUpdateOrThrow (Ldev/inmo/tgbotapi/types/update/abstracts/Update;)Ldev/inmo/tgbotapi/types/update/PaidMediaPurchasedUpdate; + public static final fun paidMessagePriceChangedOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/PaidMessagePriceChanged; + public static final fun paidMessagePriceChangedOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/PaidMessagePriceChanged; public static final fun paidOrNull (Ldev/inmo/tgbotapi/types/reactions/Reaction;)Ldev/inmo/tgbotapi/types/reactions/Reaction$Paid; public static final fun paidOrThrow (Ldev/inmo/tgbotapi/types/reactions/Reaction;)Ldev/inmo/tgbotapi/types/reactions/Reaction$Paid; public static final fun passportElementErrorDataFieldOrNull (Ldev/inmo/tgbotapi/types/passport/PassportElementError;)Ldev/inmo/tgbotapi/types/passport/PassportElementErrorDataField; @@ -2304,6 +2308,8 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt { public static final fun possiblyMediaGroupMessageOrThrow (Ldev/inmo/tgbotapi/types/message/abstracts/Message;)Ldev/inmo/tgbotapi/types/message/abstracts/PossiblyMediaGroupMessage; public static final fun possiblyOfflineMessageOrNull (Ldev/inmo/tgbotapi/types/message/abstracts/Message;)Ldev/inmo/tgbotapi/types/message/abstracts/PossiblyOfflineMessage; public static final fun possiblyOfflineMessageOrThrow (Ldev/inmo/tgbotapi/types/message/abstracts/Message;)Ldev/inmo/tgbotapi/types/message/abstracts/PossiblyOfflineMessage; + public static final fun possiblyPaidMessageOrNull (Ldev/inmo/tgbotapi/types/message/abstracts/Message;)Ldev/inmo/tgbotapi/types/message/abstracts/PossiblyPaidMessage; + public static final fun possiblyPaidMessageOrThrow (Ldev/inmo/tgbotapi/types/message/abstracts/Message;)Ldev/inmo/tgbotapi/types/message/abstracts/PossiblyPaidMessage; public static final fun possiblyPaymentMessageOrNull (Ldev/inmo/tgbotapi/types/message/abstracts/Message;)Ldev/inmo/tgbotapi/types/message/abstracts/PossiblyPaymentMessage; public static final fun possiblyPaymentMessageOrThrow (Ldev/inmo/tgbotapi/types/message/abstracts/Message;)Ldev/inmo/tgbotapi/types/message/abstracts/PossiblyPaymentMessage; public static final fun possiblyPremiumChatOrNull (Ldev/inmo/tgbotapi/types/chat/Chat;)Ldev/inmo/tgbotapi/types/chat/PossiblyPremiumChat; diff --git a/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/ClassCastsNew.kt b/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/ClassCastsNew.kt index 19d61cb812..7b832805a4 100644 --- a/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/ClassCastsNew.kt +++ b/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/ClassCastsNew.kt @@ -80,6 +80,7 @@ import dev.inmo.tgbotapi.types.InlineQueries.InputMessageContent.InputVenueMessa import dev.inmo.tgbotapi.types.InlineQueries.query.BaseInlineQuery import dev.inmo.tgbotapi.types.InlineQueries.query.InlineQuery import dev.inmo.tgbotapi.types.InlineQueries.query.LocationInlineQuery +import dev.inmo.tgbotapi.types.PaidMessagePriceChanged import dev.inmo.tgbotapi.types.PrimaryInviteLink import dev.inmo.tgbotapi.types.ReplyInfo import dev.inmo.tgbotapi.types.SecondaryChatInviteLink @@ -308,6 +309,7 @@ import dev.inmo.tgbotapi.types.message.abstracts.PossiblyEditedMessage import dev.inmo.tgbotapi.types.message.abstracts.PossiblyForwardedMessage import dev.inmo.tgbotapi.types.message.abstracts.PossiblyMediaGroupMessage import dev.inmo.tgbotapi.types.message.abstracts.PossiblyOfflineMessage +import dev.inmo.tgbotapi.types.message.abstracts.PossiblyPaidMessage import dev.inmo.tgbotapi.types.message.abstracts.PossiblyPaymentMessage import dev.inmo.tgbotapi.types.message.abstracts.PossiblySentViaBotCommonMessage import dev.inmo.tgbotapi.types.message.abstracts.PossiblyTopicMessage @@ -3292,6 +3294,15 @@ public inline fun TelegramMedia.ifWithCustomizableCaptionTelegramMedia(block: (WithCustomizableCaptionTelegramMedia) -> T): T? = withCustomizableCaptionTelegramMediaOrNull() ?.let(block) +public inline fun ChatEvent.paidMessagePriceChangedOrNull(): PaidMessagePriceChanged? = this as? + dev.inmo.tgbotapi.types.PaidMessagePriceChanged + +public inline fun ChatEvent.paidMessagePriceChangedOrThrow(): PaidMessagePriceChanged = this as + dev.inmo.tgbotapi.types.PaidMessagePriceChanged + +public inline fun ChatEvent.ifPaidMessagePriceChanged(block: (PaidMessagePriceChanged) -> T): T? + = paidMessagePriceChangedOrNull() ?.let(block) + public inline fun ChatEvent.chatBackgroundOrNull(): ChatBackground? = this as? dev.inmo.tgbotapi.types.chat.ChatBackground @@ -4058,6 +4069,15 @@ public inline fun Message.possiblyOfflineMessageOrThrow(): PossiblyOfflineMessag public inline fun Message.ifPossiblyOfflineMessage(block: (PossiblyOfflineMessage) -> T): T? = possiblyOfflineMessageOrNull() ?.let(block) +public inline fun Message.possiblyPaidMessageOrNull(): PossiblyPaidMessage? = this as? + dev.inmo.tgbotapi.types.message.abstracts.PossiblyPaidMessage + +public inline fun Message.possiblyPaidMessageOrThrow(): PossiblyPaidMessage = this as + dev.inmo.tgbotapi.types.message.abstracts.PossiblyPaidMessage + +public inline fun Message.ifPossiblyPaidMessage(block: (PossiblyPaidMessage) -> T): T? = + possiblyPaidMessageOrNull() ?.let(block) + public inline fun Message.possiblyPaymentMessageOrNull(): PossiblyPaymentMessage? = this as? dev.inmo.tgbotapi.types.message.abstracts.PossiblyPaymentMessage From 9e56a6cc1a288ab560e16c90ac1a9cd2f280e624 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sat, 19 Apr 2025 13:01:52 +0600 Subject: [PATCH 35/36] small updates in DeviceStorage --- .../dev/inmo/tgbotapi/webapps/storage/DeviceStorage.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tgbotapi.webapps/src/jsMain/kotlin/dev/inmo/tgbotapi/webapps/storage/DeviceStorage.kt b/tgbotapi.webapps/src/jsMain/kotlin/dev/inmo/tgbotapi/webapps/storage/DeviceStorage.kt index 4e38a1fb2d..9b9bcc0f2b 100644 --- a/tgbotapi.webapps/src/jsMain/kotlin/dev/inmo/tgbotapi/webapps/storage/DeviceStorage.kt +++ b/tgbotapi.webapps/src/jsMain/kotlin/dev/inmo/tgbotapi/webapps/storage/DeviceStorage.kt @@ -16,7 +16,7 @@ external interface DeviceStorage { * @param value The value to store. * @param callback A callback function that is called when the operation is complete. The first argument is an error object, if any, and the second argument is a boolean indicating whether the operation was successful. */ - fun setItem(key: String, value: String, callback: (Throwable?, Boolean?) -> Unit) + fun setItem(key: String, value: String, callback: (Throwable?, Boolean?) -> Unit): DeviceStorage /** * Retrieves the value associated with a key. @@ -24,7 +24,7 @@ external interface DeviceStorage { * @param key The key to retrieve the value for. * @param callback A callback function that is called when the operation is complete. The first argument is an error object, if any, and the second argument is the value associated with the key, or null if the key is not found. */ - fun getItem(key: String, callback: (Throwable?, String?) -> Unit) + fun getItem(key: String, callback: (Throwable?, String?) -> Unit): DeviceStorage /** * Removes the key-value pair associated with a key. @@ -32,14 +32,14 @@ external interface DeviceStorage { * @param key The key to remove. * @param callback A callback function that is called when the operation is complete. The first argument is an error object, if any, and the second argument is a boolean indicating whether the operation was successful. */ - fun removeItem(key: String, callback: (Throwable?, Boolean?) -> Unit) + fun removeItem(key: String, callback: (Throwable?, Boolean?) -> Unit): DeviceStorage /** * Clears all key-value pairs from the storage. * * @param callback A callback function that is called when the operation is complete. The first argument is an error object, if any, and the second argument is a boolean indicating whether the operation was successful. */ - fun clear(callback: (Throwable?, Boolean?) -> Unit) + fun clear(callback: (Throwable?, Boolean?) -> Unit): DeviceStorage } /** From c610f4eab231a150f003d8140d464ef19b00c334 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Mon, 21 Apr 2025 12:16:17 +0600 Subject: [PATCH 36/36] update classcasts --- gradle/libs.versions.toml | 1 + tgbotapi.api/api/tgbotapi.api.api | 16 +- .../api/tgbotapi.behaviour_builder.api | 12 + .../expectations/WaitEventAction.kt | 12 +- .../expectations/WaitEventActionMessages.kt | 11 + .../triggers_handling/EventTriggers.kt | 46 +- tgbotapi.core/api/tgbotapi.core.api | 644 +++++++++++++--- tgbotapi.core/build.gradle | 4 +- .../dev/inmo/tgbotapi/types/gifts/GiftInfo.kt | 72 -- .../types/gifts/GiftSentOrReceived.kt | 286 ++++++++ .../tgbotapi/types/message/ForwardInfo.kt | 1 + .../inmo/tgbotapi/types/message/RawMessage.kt | 7 +- .../tgbotapi/utils/DeserializeWithUnknown.kt | 18 + .../utils/internal/ClassCastsIncluded.kt | 7 +- tgbotapi.ksp/build.gradle | 1 + .../src/main/kotlin/ClassCastsFiller.kt | 30 +- .../kotlin/TelegramBotAPISymbolProcessor.kt | 80 +- tgbotapi.utils/api/tgbotapi.utils.api | 3 + .../extensions/utils/ClassCastsNew.kt | 687 +++++++++++------- 19 files changed, 1484 insertions(+), 454 deletions(-) delete mode 100644 tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/GiftInfo.kt create mode 100644 tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived.kt diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 2f41247f5e..1ebbdc756d 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -57,6 +57,7 @@ microutils-serialization-mapper = { module = "dev.inmo:micro_utils.serialization microutils-languageCodes = { module = "dev.inmo:micro_utils.language_codes", version.ref = "microutils" } microutils-ktor-common = { module = "dev.inmo:micro_utils.ktor.common", version.ref = "microutils" } microutils-fsm-common = { module = "dev.inmo:micro_utils.fsm.common", version.ref = "microutils" } +microutils-ksp-generator = { module = "dev.inmo:micro_utils.ksp.generator", version.ref = "microutils" } microutils-ksp-sealed = { module = "dev.inmo:micro_utils.ksp.sealed", version.ref = "microutils" } microutils-ksp-sealed-generator = { module = "dev.inmo:micro_utils.ksp.sealed.generator", version.ref = "microutils" } microutils-ksp-variations = { module = "dev.inmo:micro_utils.ksp.variations", version.ref = "microutils" } diff --git a/tgbotapi.api/api/tgbotapi.api.api b/tgbotapi.api/api/tgbotapi.api.api index df2014c549..aeb7488949 100644 --- a/tgbotapi.api/api/tgbotapi.api.api +++ b/tgbotapi.api/api/tgbotapi.api.api @@ -1140,12 +1140,12 @@ public final class dev/inmo/tgbotapi/extensions/api/gifts/GetAvailableGiftsKt { } public final class dev/inmo/tgbotapi/extensions/api/gifts/SendGiftGeneratedVariationKt { - public static final fun sendGift (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/gifts/Gift;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static final fun sendGift (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/gifts/Gift;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun sendGift (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun sendGift (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun sendGift-0SDnvgk (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun sendGift-GROm3fU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/User;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static final fun sendGift-VjR9mJc (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLdev/inmo/tgbotapi/types/gifts/Gift;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static final fun sendGift-ySMgKnk (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLdev/inmo/tgbotapi/types/gifts/Gift;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun sendGift-VjR9mJc (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLdev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun sendGift-ySMgKnk (Ldev/inmo/tgbotapi/bot/RequestsExecutor;JLdev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; } public final class dev/inmo/tgbotapi/extensions/api/gifts/SendGiftKt { @@ -1160,10 +1160,10 @@ public final class dev/inmo/tgbotapi/extensions/api/gifts/SendGiftKt { } public final class dev/inmo/tgbotapi/extensions/api/gifts/SendGiftToChatGeneratedVariationKt { - public static final fun sendGiftToChat (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/gifts/Gift;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static final fun sendGiftToChat (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/gifts/Gift;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static final fun sendGiftToChat (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/PublicChat;Ldev/inmo/tgbotapi/types/gifts/Gift;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static final fun sendGiftToChat (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/PublicChat;Ldev/inmo/tgbotapi/types/gifts/Gift;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun sendGiftToChat (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun sendGiftToChat (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun sendGiftToChat (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/PublicChat;Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun sendGiftToChat (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/PublicChat;Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun sendGiftToChat-0SDnvgk (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/PublicChat;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZLkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun sendGiftToChat-GROm3fU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/PublicChat;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; } diff --git a/tgbotapi.behaviour_builder/api/tgbotapi.behaviour_builder.api b/tgbotapi.behaviour_builder/api/tgbotapi.behaviour_builder.api index cac19168aa..2341f63931 100644 --- a/tgbotapi.behaviour_builder/api/tgbotapi.behaviour_builder.api +++ b/tgbotapi.behaviour_builder/api/tgbotapi.behaviour_builder.api @@ -666,12 +666,16 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/W public static synthetic fun waitPublicChatEvents$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun waitRefundedPaymentEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun waitRefundedPaymentEvents$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun waitRegularGiftSentOrReceived (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun waitRegularGiftSentOrReceived$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun waitSuccessfulPaymentEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun waitSuccessfulPaymentEvents$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun waitSupergroupChatCreatedEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun waitSupergroupChatCreatedEvents$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun waitSupergroupEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun waitSupergroupEvents$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun waitUniqueGiftSentOrReceived (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun waitUniqueGiftSentOrReceived$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun waitUserLoggedInEvents (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun waitUserLoggedInEvents$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun waitUserShared (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; @@ -757,12 +761,16 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/W public static synthetic fun waitPublicChatEventsMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun waitRefundedPaymentEventsMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun waitRefundedPaymentEventsMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun waitRegularGiftSentOrReceivedMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun waitRegularGiftSentOrReceivedMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun waitSuccessfulPaymentEventsMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun waitSuccessfulPaymentEventsMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun waitSupergroupChatCreatedEventsMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun waitSupergroupChatCreatedEventsMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun waitSupergroupEventsMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun waitSupergroupEventsMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun waitUniqueGiftSentOrReceivedMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun waitUniqueGiftSentOrReceivedMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun waitUserLoggedInEventsMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun waitUserLoggedInEventsMessages$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun waitUserSharedEventsMessages (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/requests/abstracts/Request;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; @@ -1364,12 +1372,16 @@ public final class dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handl public static synthetic fun onPublicChatEvent$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun onRefundedPayment (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun onRefundedPayment$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun onRegularGiftSentOrReceived (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun onRegularGiftSentOrReceived$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun onSuccessfulPayment (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun onSuccessfulPayment$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun onSupergroupChatCreated (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun onSupergroupChatCreated$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun onSupergroupEvent (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun onSupergroupEvent$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun onUniqueGiftSentOrReceived (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun onUniqueGiftSentOrReceived$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun onUserLoggedIn (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun onUserLoggedIn$default (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun onUserShared (Ldev/inmo/tgbotapi/extensions/behaviour_builder/BehaviourContext;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/SimpleFilter;Lkotlin/jvm/functions/Function4;Ldev/inmo/tgbotapi/extensions/behaviour_builder/utils/marker_factories/MarkerFactory;Lkotlin/jvm/functions/Function4;Lkotlin/jvm/functions/Function3;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; diff --git a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitEventAction.kt b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitEventAction.kt index 73a4e0095e..44cb50626d 100644 --- a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitEventAction.kt +++ b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitEventAction.kt @@ -7,9 +7,9 @@ import dev.inmo.tgbotapi.extensions.utils.* import dev.inmo.tgbotapi.requests.abstracts.Request import dev.inmo.tgbotapi.types.PaidMessagePriceChanged import dev.inmo.tgbotapi.types.chat.ChatBackground +import dev.inmo.tgbotapi.types.gifts.GiftSentOrReceived import dev.inmo.tgbotapi.types.giveaway.GiveawayCreated import dev.inmo.tgbotapi.types.giveaway.GiveawayPrivateResults -import dev.inmo.tgbotapi.types.giveaway.GiveawayPublicResults import dev.inmo.tgbotapi.types.message.ChatEvents.* import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.* import dev.inmo.tgbotapi.types.message.ChatEvents.forum.ForumTopicClosed @@ -254,3 +254,13 @@ suspend fun BehaviourContext.waitPaidMessagePriceChanged( initRequest: Request<*>? = null, errorFactory: NullableRequestBuilder<*> = { null } ) = waitEvents(initRequest, errorFactory) + +suspend fun BehaviourContext.waitRegularGiftSentOrReceived( + initRequest: Request<*>? = null, + errorFactory: NullableRequestBuilder<*> = { null } +) = waitEvents(initRequest, errorFactory) + +suspend fun BehaviourContext.waitUniqueGiftSentOrReceived( + initRequest: Request<*>? = null, + errorFactory: NullableRequestBuilder<*> = { null } +) = waitEvents(initRequest, errorFactory) diff --git a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitEventActionMessages.kt b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitEventActionMessages.kt index 0d23f53a78..3ff34cb909 100644 --- a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitEventActionMessages.kt +++ b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/expectations/WaitEventActionMessages.kt @@ -7,6 +7,7 @@ import dev.inmo.tgbotapi.extensions.utils.* import dev.inmo.tgbotapi.requests.abstracts.Request import dev.inmo.tgbotapi.types.PaidMessagePriceChanged import dev.inmo.tgbotapi.types.chat.ChatBackground +import dev.inmo.tgbotapi.types.gifts.GiftSentOrReceived import dev.inmo.tgbotapi.types.message.ChatEvents.* import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.* import dev.inmo.tgbotapi.types.message.ChatEvents.forum.ForumTopicClosed @@ -230,3 +231,13 @@ suspend fun BehaviourContext.waitPaidMessagePriceChangedMessages( initRequest: Request<*>? = null, errorFactory: NullableRequestBuilder<*> = { null } ) = waitEventsMessages(initRequest, errorFactory) + +suspend fun BehaviourContext.waitRegularGiftSentOrReceivedMessages( + initRequest: Request<*>? = null, + errorFactory: NullableRequestBuilder<*> = { null } +) = waitEventsMessages(initRequest, errorFactory) + +suspend fun BehaviourContext.waitUniqueGiftSentOrReceivedMessages( + initRequest: Request<*>? = null, + errorFactory: NullableRequestBuilder<*> = { null } +) = waitEventsMessages(initRequest, errorFactory) diff --git a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/EventTriggers.kt b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/EventTriggers.kt index c5ae3cf425..280580f01f 100644 --- a/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/EventTriggers.kt +++ b/tgbotapi.behaviour_builder/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/behaviour_builder/triggers_handling/EventTriggers.kt @@ -12,9 +12,9 @@ import dev.inmo.tgbotapi.extensions.utils.baseSentMessageUpdateOrNull import dev.inmo.tgbotapi.extensions.utils.chatEventMessageOrNull import dev.inmo.tgbotapi.types.PaidMessagePriceChanged import dev.inmo.tgbotapi.types.chat.ChatBackground +import dev.inmo.tgbotapi.types.gifts.GiftSentOrReceived import dev.inmo.tgbotapi.types.giveaway.GiveawayCreated import dev.inmo.tgbotapi.types.giveaway.GiveawayPrivateResults -import dev.inmo.tgbotapi.types.giveaway.GiveawayPublicResults import dev.inmo.tgbotapi.types.message.ChatEvents.* import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.* import dev.inmo.tgbotapi.types.message.ChatEvents.forum.ForumTopicClosed @@ -1068,3 +1068,47 @@ suspend fun BC.onPaidMessagePriceChanged( additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver>? = null, scenarioReceiver: CustomBehaviourContextAndTypeReceiver> ) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) + + +/** + * @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call + * @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example, + * this filter will be used if you will call [dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitContentMessage]. + * Use [dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver] function to create your own. + * Use [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.plus] or [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times] + * to combinate several filters + * @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream". + * [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for + * "stream" + * @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that + * data + */ +suspend fun BC.onRegularGiftSentOrReceived( + initialFilter: SimpleFilter>? = null, + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update>? = MessageFilterByChat, + markerFactory: MarkerFactory, Any>? = ByChatMessageMarkerFactory, + additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver>? = null, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver> +) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) + + +/** + * @param initialFilter This filter will be called to remove unnecessary data BEFORE [scenarioReceiver] call + * @param subcontextUpdatesFilter This filter will be applied to each update inside of [scenarioReceiver]. For example, + * this filter will be used if you will call [dev.inmo.tgbotapi.extensions.behaviour_builder.expectations.waitContentMessage]. + * Use [dev.inmo.tgbotapi.extensions.behaviour_builder.BehaviourContextAndTwoTypesReceiver] function to create your own. + * Use [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.plus] or [dev.inmo.tgbotapi.extensions.behaviour_builder.utils.times] + * to combinate several filters + * @param [markerFactory] **Pass null to handle requests fully parallel**. Will be used to identify different "stream". + * [scenarioReceiver] will be called synchronously in one "stream". Output of [markerFactory] will be used as a key for + * "stream" + * @param scenarioReceiver Main callback which will be used to handle incoming data if [initialFilter] will pass that + * data + */ +suspend fun BC.onUniqueGiftSentOrReceived( + initialFilter: SimpleFilter>? = null, + subcontextUpdatesFilter: CustomBehaviourContextAndTwoTypesReceiver, Update>? = MessageFilterByChat, + markerFactory: MarkerFactory, Any>? = ByChatMessageMarkerFactory, + additionalSubcontextInitialAction: CustomBehaviourContextAndTwoTypesReceiver>? = null, + scenarioReceiver: CustomBehaviourContextAndTypeReceiver> +) = onEventWithCustomChatEventMessage(initialFilter, subcontextUpdatesFilter, markerFactory, additionalSubcontextInitialAction, scenarioReceiver) diff --git a/tgbotapi.core/api/tgbotapi.core.api b/tgbotapi.core/api/tgbotapi.core.api index 6312581ed1..51b3467a6b 100644 --- a/tgbotapi.core/api/tgbotapi.core.api +++ b/tgbotapi.core/api/tgbotapi.core.api @@ -9195,6 +9195,7 @@ public final class dev/inmo/tgbotapi/types/ChatPhoto$Companion { public final class dev/inmo/tgbotapi/types/CommonKt { public static final field accentColorIdField Ljava/lang/String; + public static final field acceptedGiftTypesField Ljava/lang/String; public static final field actionField Ljava/lang/String; public static final field activeUsernamesField Ljava/lang/String; public static final field actorChatField Ljava/lang/String; @@ -9222,8 +9223,10 @@ public final class dev/inmo/tgbotapi/types/CommonKt { public static final field audioUrlField Ljava/lang/String; public static final field authorSignatureField Ljava/lang/String; public static final field availableReactionsField Ljava/lang/String; + public static final field backdropField Ljava/lang/String; public static final field backgroundCustomEmojiIdField Ljava/lang/String; public static final field bankStatementField Ljava/lang/String; + public static final field baseNameField Ljava/lang/String; public static final field bigFileIdField Ljava/lang/String; public static final field bigFileUniqueIdField Ljava/lang/String; public static final field bioField Ljava/lang/String; @@ -9251,6 +9254,7 @@ public final class dev/inmo/tgbotapi/types/CommonKt { public static final field callbackQueryIdField Ljava/lang/String; public static final field canAddWebPagePreviewsField Ljava/lang/String; public static final field canBeEditedField Ljava/lang/String; + public static final field canBeUpgradedField Ljava/lang/String; public static final field canChangeGiftSettingsField Ljava/lang/String; public static final field canChangeInfoField Ljava/lang/String; public static final field canConnectToBusinessField Ljava/lang/String; @@ -9297,6 +9301,7 @@ public final class dev/inmo/tgbotapi/types/CommonKt { public static final field canViewGiftsAndStarsField Ljava/lang/String; public static final field captionEntitiesField Ljava/lang/String; public static final field captionField Ljava/lang/String; + public static final field centerColorField Ljava/lang/String; public static final field certificateField Ljava/lang/String; public static final field chatField Ljava/lang/String; public static final field chatHasUsernameField Ljava/lang/String; @@ -9313,6 +9318,7 @@ public final class dev/inmo/tgbotapi/types/CommonKt { public static final field colorsField Ljava/lang/String; public static final field commissionPerMilleField Ljava/lang/String; public static final field containsMasksField Ljava/lang/String; + public static final field convertStarCountField Ljava/lang/String; public static final field copyTextField Ljava/lang/String; public static final field correctOptionIdField Ljava/lang/String; public static final field countryCodeField Ljava/lang/String; @@ -9344,6 +9350,7 @@ public final class dev/inmo/tgbotapi/types/CommonKt { public static final field driverLicenseField Ljava/lang/String; public static final field dropPendingUpdatesField Ljava/lang/String; public static final field durationField Ljava/lang/String; + public static final field edgeColorField Ljava/lang/String; public static final field emailField Ljava/lang/String; public static final field emojiField Ljava/lang/String; public static final field emojiListField Ljava/lang/String; @@ -9442,6 +9449,7 @@ public final class dev/inmo/tgbotapi/types/CommonKt { public static final field isPersonalField Ljava/lang/String; public static final field isPremiumField Ljava/lang/String; public static final field isPrimaryField Ljava/lang/String; + public static final field isPrivateField Ljava/lang/String; public static final field isPublicField Ljava/lang/String; public static final field isRecurringField Ljava/lang/String; public static final field isRevokedField Ljava/lang/String; @@ -9460,6 +9468,7 @@ public final class dev/inmo/tgbotapi/types/CommonKt { public static final field latitudeField Ljava/lang/String; public static final field lengthField Ljava/lang/String; public static final field limitField Ljava/lang/String; + public static final field limitedGiftsField Ljava/lang/String; public static final field linkPreviewOptionsField Ljava/lang/String; public static final field linkedChatIdField Ljava/lang/String; public static final field livePeriodField Ljava/lang/String; @@ -9484,6 +9493,7 @@ public final class dev/inmo/tgbotapi/types/CommonKt { public static final field messageTextField Ljava/lang/String; public static final field messageThreadIdField Ljava/lang/String; public static final field mimeTypeField Ljava/lang/String; + public static final field modelField Ljava/lang/String; public static final field monthField Ljava/lang/String; public static final field mpeg4GifDurationField Ljava/lang/String; public static final field mpeg4GifFileIdField Ljava/lang/String; @@ -9497,6 +9507,7 @@ public final class dev/inmo/tgbotapi/types/CommonKt { public static final field newReactionField Ljava/lang/String; public static final field nextOffsetField Ljava/lang/String; public static final field nonceField Ljava/lang/String; + public static final field numberField Ljava/lang/String; public static final field offsetField Ljava/lang/String; public static final field okField Ljava/lang/String; public static final field oldChatMemberField Ljava/lang/String; @@ -9512,6 +9523,7 @@ public final class dev/inmo/tgbotapi/types/CommonKt { public static final field optionsField Ljava/lang/String; public static final field orderInfoField Ljava/lang/String; public static final field originField Ljava/lang/String; + public static final field ownedGiftIdField Ljava/lang/String; public static final field paidMediaField Ljava/lang/String; public static final field paidMediaPayloadField Ljava/lang/String; public static final field paidMessageStarCountField Ljava/lang/String; @@ -9544,7 +9556,9 @@ public final class dev/inmo/tgbotapi/types/CommonKt { public static final field preferLargeMediaField Ljava/lang/String; public static final field preferSmallMediaField Ljava/lang/String; public static final field premiumAnimationField Ljava/lang/String; + public static final field premiumSubscriptionField Ljava/lang/String; public static final field premiumSubscriptionMonthCountField Ljava/lang/String; + public static final field prepaidUpgradeStarCountField Ljava/lang/String; public static final field priceDependOnShipAddressField Ljava/lang/String; public static final field pricesField Ljava/lang/String; public static final field prizeDescriptionField Ljava/lang/String; @@ -9565,6 +9579,7 @@ public final class dev/inmo/tgbotapi/types/CommonKt { public static final field quoteField Ljava/lang/String; public static final field quoteParseModeField Ljava/lang/String; public static final field quotePositionField Ljava/lang/String; + public static final field rarityPerMilleField Ljava/lang/String; public static final field reactionField Ljava/lang/String; public static final field reactionsField Ljava/lang/String; public static final field receiverField Ljava/lang/String; @@ -9653,8 +9668,11 @@ public final class dev/inmo/tgbotapi/types/CommonKt { public static final field switchInlineQueryField Ljava/lang/String; public static final field switchPmParameterField Ljava/lang/String; public static final field switchPmTextField Ljava/lang/String; + public static final field symbolColorField Ljava/lang/String; + public static final field symbolField Ljava/lang/String; public static final field telegramPaymentChargeIdField Ljava/lang/String; public static final field temporaryRegistrationField Ljava/lang/String; + public static final field textColorField Ljava/lang/String; public static final field textEntitiesField Ljava/lang/String; public static final field textField Ljava/lang/String; public static final field textParseModeField Ljava/lang/String; @@ -9673,11 +9691,14 @@ public final class dev/inmo/tgbotapi/types/CommonKt { public static final field totalCountField Ljava/lang/String; public static final field totalVoterCountField Ljava/lang/String; public static final field transactionsField Ljava/lang/String; + public static final field transferStarCountField Ljava/lang/String; public static final field translationField Ljava/lang/String; public static final field translationFileField Ljava/lang/String; public static final field translationFilesField Ljava/lang/String; public static final field typeField Ljava/lang/String; public static final field unclaimedPrizeCountField Ljava/lang/String; + public static final field uniqueGiftsField Ljava/lang/String; + public static final field unlimitedGiftsField Ljava/lang/String; public static final field unrestrictBoostsCountField Ljava/lang/String; public static final field unspecifiedField Ljava/lang/String; public static final field untilDateField Ljava/lang/String; @@ -15561,8 +15582,8 @@ public final class dev/inmo/tgbotapi/types/chat/CommonUser$Companion { public final class dev/inmo/tgbotapi/types/chat/ExtendedBot : dev/inmo/tgbotapi/types/chat/Bot, dev/inmo/tgbotapi/types/chat/ExtendedChat { public static final field Companion Ldev/inmo/tgbotapi/types/chat/ExtendedBot$Companion; - public synthetic fun (JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZZZLdev/inmo/tgbotapi/types/ChatPhoto;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;IZZILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZZZLdev/inmo/tgbotapi/types/ChatPhoto;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;IZZLkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZZZLdev/inmo/tgbotapi/types/ChatPhoto;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;IZLdev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZZZLdev/inmo/tgbotapi/types/ChatPhoto;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;IZLdev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1-tHkBKVM ()J public final fun component10-f3WtEc0 ()I public final fun component11-mg_h9nU ()Ldev/inmo/tgbotapi/types/colors/ColorId; @@ -15570,7 +15591,7 @@ public final class dev/inmo/tgbotapi/types/chat/ExtendedBot : dev/inmo/tgbotapi/ public final fun component13-GbmMWyQ ()Ljava/lang/String; public final fun component14 ()I public final fun component15 ()Z - public final fun component16 ()Z + public final fun component16 ()Ldev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes; public final fun component2 ()Ljava/lang/String; public final fun component3 ()Ljava/lang/String; public final fun component4-san03mo ()Ljava/lang/String; @@ -15579,10 +15600,11 @@ public final class dev/inmo/tgbotapi/types/chat/ExtendedBot : dev/inmo/tgbotapi/ public final fun component7 ()Z public final fun component8 ()Z public final fun component9 ()Ldev/inmo/tgbotapi/types/ChatPhoto; - public final fun copy-NtAqVms (JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZZZLdev/inmo/tgbotapi/types/ChatPhoto;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;IZZ)Ldev/inmo/tgbotapi/types/chat/ExtendedBot; - public static synthetic fun copy-NtAqVms$default (Ldev/inmo/tgbotapi/types/chat/ExtendedBot;JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZZZLdev/inmo/tgbotapi/types/ChatPhoto;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;IZZILjava/lang/Object;)Ldev/inmo/tgbotapi/types/chat/ExtendedBot; + public final fun copy-NtAqVms (JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZZZLdev/inmo/tgbotapi/types/ChatPhoto;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;IZLdev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes;)Ldev/inmo/tgbotapi/types/chat/ExtendedBot; + public static synthetic fun copy-NtAqVms$default (Ldev/inmo/tgbotapi/types/chat/ExtendedBot;JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZZZLdev/inmo/tgbotapi/types/ChatPhoto;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;IZLdev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/chat/ExtendedBot; public fun equals (Ljava/lang/Object;)Z public fun getAccentColorId-f3WtEc0 ()I + public fun getAcceptedGiftTypes ()Ldev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes; public fun getBackgroundCustomEmojiId-GbmMWyQ ()Ljava/lang/String; public final fun getCanConnectToBusiness ()Z public final fun getCanJoinGroups ()Z @@ -15626,6 +15648,10 @@ public final class dev/inmo/tgbotapi/types/chat/ExtendedBusinessChat$Companion { public final fun serializer ()Lkotlinx/serialization/KSerializer; } +public final class dev/inmo/tgbotapi/types/chat/ExtendedBusinessChat$DefaultImpls { + public static fun getCanReceiveGifts (Ldev/inmo/tgbotapi/types/chat/ExtendedBusinessChat;)Z +} + public final class dev/inmo/tgbotapi/types/chat/ExtendedBusinessChatImpl : dev/inmo/tgbotapi/types/chat/ExtendedBusinessChat, dev/inmo/tgbotapi/types/chat/ExtendedChat { public static final field Companion Ldev/inmo/tgbotapi/types/chat/ExtendedBusinessChatImpl$Companion; public synthetic fun (Lkotlin/Pair;Ldev/inmo/tgbotapi/types/chat/ExtendedPrivateChat;Lkotlin/jvm/internal/DefaultConstructorMarker;)V @@ -15635,6 +15661,7 @@ public final class dev/inmo/tgbotapi/types/chat/ExtendedBusinessChatImpl : dev/i public static synthetic fun copy-rh-56jM$default (Ldev/inmo/tgbotapi/types/chat/ExtendedBusinessChatImpl;Lkotlin/Pair;Ldev/inmo/tgbotapi/types/chat/ExtendedPrivateChat;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/chat/ExtendedBusinessChatImpl; public fun equals (Ljava/lang/Object;)Z public fun getAccentColorId-f3WtEc0 ()I + public fun getAcceptedGiftTypes ()Ldev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes; public fun getBackgroundCustomEmojiId-GbmMWyQ ()Ljava/lang/String; public fun getCanReceiveGifts ()Z public fun getChatPhoto ()Ldev/inmo/tgbotapi/types/ChatPhoto; @@ -15673,35 +15700,40 @@ public final class dev/inmo/tgbotapi/types/chat/ExtendedChannelChat$Companion { public final fun serializer ()Lkotlinx/serialization/KSerializer; } +public final class dev/inmo/tgbotapi/types/chat/ExtendedChannelChat$DefaultImpls { + public static fun getCanReceiveGifts (Ldev/inmo/tgbotapi/types/chat/ExtendedChannelChat;)Z +} + public final class dev/inmo/tgbotapi/types/chat/ExtendedChannelChatImpl : dev/inmo/tgbotapi/types/chat/ExtendedChannelChat { public static final field Companion Ldev/inmo/tgbotapi/types/chat/ExtendedChannelChatImpl$Companion; - public synthetic fun (JLjava/lang/String;Ljava/lang/String;Ljava/util/List;Ldev/inmo/tgbotapi/types/ChatPhoto;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/abstracts/Message;ZLdev/inmo/tgbotapi/types/IdChatIdentifier;ZLjava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;ZIZILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (JLjava/lang/String;Ljava/lang/String;Ljava/util/List;Ldev/inmo/tgbotapi/types/ChatPhoto;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/abstracts/Message;ZLdev/inmo/tgbotapi/types/IdChatIdentifier;ZLjava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;ZIZLkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (JLjava/lang/String;Ldev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes;Ljava/lang/String;Ljava/util/List;Ldev/inmo/tgbotapi/types/ChatPhoto;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/abstracts/Message;ZLdev/inmo/tgbotapi/types/IdChatIdentifier;ZLjava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;ZIILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (JLjava/lang/String;Ldev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes;Ljava/lang/String;Ljava/util/List;Ldev/inmo/tgbotapi/types/ChatPhoto;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/abstracts/Message;ZLdev/inmo/tgbotapi/types/IdChatIdentifier;ZLjava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1-tHkBKVM ()J - public final fun component10 ()Ldev/inmo/tgbotapi/types/IdChatIdentifier; - public final fun component11 ()Z - public final fun component12 ()Ljava/util/List; - public final fun component13-GbmMWyQ ()Ljava/lang/String; - public final fun component14 ()Ldev/inmo/tgbotapi/types/TelegramDate; - public final fun component15-f3WtEc0 ()I - public final fun component16-mg_h9nU ()Ldev/inmo/tgbotapi/types/colors/ColorId; - public final fun component17-GbmMWyQ ()Ljava/lang/String; + public final fun component10 ()Z + public final fun component11 ()Ldev/inmo/tgbotapi/types/IdChatIdentifier; + public final fun component12 ()Z + public final fun component13 ()Ljava/util/List; + public final fun component14-GbmMWyQ ()Ljava/lang/String; + public final fun component15 ()Ldev/inmo/tgbotapi/types/TelegramDate; + public final fun component16-f3WtEc0 ()I + public final fun component17-mg_h9nU ()Ldev/inmo/tgbotapi/types/colors/ColorId; public final fun component18-GbmMWyQ ()Ljava/lang/String; - public final fun component19 ()Z + public final fun component19-GbmMWyQ ()Ljava/lang/String; public final fun component2 ()Ljava/lang/String; - public final fun component20 ()I - public final fun component21 ()Z - public final fun component3-san03mo ()Ljava/lang/String; - public final fun component4 ()Ljava/util/List; - public final fun component5 ()Ldev/inmo/tgbotapi/types/ChatPhoto; - public final fun component6 ()Ljava/lang/String; + public final fun component20 ()Z + public final fun component21 ()I + public final fun component3 ()Ldev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes; + public final fun component4-san03mo ()Ljava/lang/String; + public final fun component5 ()Ljava/util/List; + public final fun component6 ()Ldev/inmo/tgbotapi/types/ChatPhoto; public final fun component7 ()Ljava/lang/String; - public final fun component8 ()Ldev/inmo/tgbotapi/types/message/abstracts/Message; - public final fun component9 ()Z - public final fun copy-tkF88cM (JLjava/lang/String;Ljava/lang/String;Ljava/util/List;Ldev/inmo/tgbotapi/types/ChatPhoto;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/abstracts/Message;ZLdev/inmo/tgbotapi/types/IdChatIdentifier;ZLjava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;ZIZ)Ldev/inmo/tgbotapi/types/chat/ExtendedChannelChatImpl; - public static synthetic fun copy-tkF88cM$default (Ldev/inmo/tgbotapi/types/chat/ExtendedChannelChatImpl;JLjava/lang/String;Ljava/lang/String;Ljava/util/List;Ldev/inmo/tgbotapi/types/ChatPhoto;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/abstracts/Message;ZLdev/inmo/tgbotapi/types/IdChatIdentifier;ZLjava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;ZIZILjava/lang/Object;)Ldev/inmo/tgbotapi/types/chat/ExtendedChannelChatImpl; + public final fun component8 ()Ljava/lang/String; + public final fun component9 ()Ldev/inmo/tgbotapi/types/message/abstracts/Message; + public final fun copy-wEHGSAw (JLjava/lang/String;Ldev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes;Ljava/lang/String;Ljava/util/List;Ldev/inmo/tgbotapi/types/ChatPhoto;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/abstracts/Message;ZLdev/inmo/tgbotapi/types/IdChatIdentifier;ZLjava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;ZI)Ldev/inmo/tgbotapi/types/chat/ExtendedChannelChatImpl; + public static synthetic fun copy-wEHGSAw$default (Ldev/inmo/tgbotapi/types/chat/ExtendedChannelChatImpl;JLjava/lang/String;Ldev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes;Ljava/lang/String;Ljava/util/List;Ldev/inmo/tgbotapi/types/ChatPhoto;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/abstracts/Message;ZLdev/inmo/tgbotapi/types/IdChatIdentifier;ZLjava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;ZIILjava/lang/Object;)Ldev/inmo/tgbotapi/types/chat/ExtendedChannelChatImpl; public fun equals (Ljava/lang/Object;)Z public fun getAccentColorId-f3WtEc0 ()I + public fun getAcceptedGiftTypes ()Ldev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes; public fun getActiveUsernames ()Ljava/util/List; public fun getAvailableReactions ()Ljava/util/List; public fun getBackgroundCustomEmojiId-GbmMWyQ ()Ljava/lang/String; @@ -15744,6 +15776,7 @@ public final class dev/inmo/tgbotapi/types/chat/ExtendedChannelChatImpl$Companio public abstract interface class dev/inmo/tgbotapi/types/chat/ExtendedChat : dev/inmo/tgbotapi/types/chat/Chat { public static final field Companion Ldev/inmo/tgbotapi/types/chat/ExtendedChat$Companion; public abstract fun getAccentColorId-f3WtEc0 ()I + public abstract fun getAcceptedGiftTypes ()Ldev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes; public abstract fun getBackgroundCustomEmojiId-GbmMWyQ ()Ljava/lang/String; public abstract fun getCanReceiveGifts ()Z public abstract fun getChatPhoto ()Ldev/inmo/tgbotapi/types/ChatPhoto; @@ -15756,6 +15789,10 @@ public final class dev/inmo/tgbotapi/types/chat/ExtendedChat$Companion { public final fun serializer ()Lkotlinx/serialization/KSerializer; } +public final class dev/inmo/tgbotapi/types/chat/ExtendedChat$DefaultImpls { + public static fun getCanReceiveGifts (Ldev/inmo/tgbotapi/types/chat/ExtendedChat;)Z +} + public abstract class dev/inmo/tgbotapi/types/chat/ExtendedChatSerializer : kotlinx/serialization/KSerializer { public static final field Companion Ldev/inmo/tgbotapi/types/chat/ExtendedChatSerializer$Companion; public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/types/chat/ExtendedChat; @@ -15789,6 +15826,10 @@ public final class dev/inmo/tgbotapi/types/chat/ExtendedChatWithUsername$Compani public final fun serializer ()Lkotlinx/serialization/KSerializer; } +public final class dev/inmo/tgbotapi/types/chat/ExtendedChatWithUsername$DefaultImpls { + public static fun getCanReceiveGifts (Ldev/inmo/tgbotapi/types/chat/ExtendedChatWithUsername;)Z +} + public abstract interface class dev/inmo/tgbotapi/types/chat/ExtendedForumChat : dev/inmo/tgbotapi/types/chat/ExtendedSupergroupChat, dev/inmo/tgbotapi/types/chat/ForumChat { public static final field Companion Ldev/inmo/tgbotapi/types/chat/ExtendedForumChat$Companion; } @@ -15797,10 +15838,14 @@ public final class dev/inmo/tgbotapi/types/chat/ExtendedForumChat$Companion { public final fun serializer ()Lkotlinx/serialization/KSerializer; } +public final class dev/inmo/tgbotapi/types/chat/ExtendedForumChat$DefaultImpls { + public static fun getCanReceiveGifts (Ldev/inmo/tgbotapi/types/chat/ExtendedForumChat;)Z +} + public final class dev/inmo/tgbotapi/types/chat/ExtendedForumChatImpl : dev/inmo/tgbotapi/types/chat/ExtendedForumChat { public static final field Companion Ldev/inmo/tgbotapi/types/chat/ExtendedForumChatImpl$Companion; - public synthetic fun (Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ldev/inmo/tgbotapi/types/ChatPhoto;Ldev/inmo/tgbotapi/types/chat/ChatPermissions;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/abstracts/Message;Ljava/lang/String;Ljava/lang/Long;ZLdev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/ChatLocation;ZZZZLjava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;Ljava/lang/String;IZILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ldev/inmo/tgbotapi/types/ChatPhoto;Ldev/inmo/tgbotapi/types/chat/ChatPermissions;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/abstracts/Message;Ljava/lang/String;Ljava/lang/Long;ZLdev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/ChatLocation;ZZZZLjava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;Ljava/lang/String;IZLkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ldev/inmo/tgbotapi/types/ChatPhoto;Ldev/inmo/tgbotapi/types/chat/ChatPermissions;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/abstracts/Message;Ljava/lang/String;Ljava/lang/Long;ZLdev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/ChatLocation;ZZZZLjava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;Ljava/lang/String;ILdev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ldev/inmo/tgbotapi/types/ChatPhoto;Ldev/inmo/tgbotapi/types/chat/ChatPermissions;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/abstracts/Message;Ljava/lang/String;Ljava/lang/Long;ZLdev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/ChatLocation;ZZZZLjava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;Ljava/lang/String;ILdev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ldev/inmo/tgbotapi/types/IdChatIdentifier; public final fun component10-eaLzeK0 ()Ljava/lang/String; public final fun component11 ()Ljava/lang/Long; @@ -15824,17 +15869,18 @@ public final class dev/inmo/tgbotapi/types/chat/ExtendedForumChatImpl : dev/inmo public final fun component28-eaLzeK0 ()Ljava/lang/String; public final fun component29 ()I public final fun component3-san03mo ()Ljava/lang/String; - public final fun component30 ()Z + public final fun component30 ()Ldev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes; public final fun component4 ()Ljava/util/List; public final fun component5 ()Ldev/inmo/tgbotapi/types/ChatPhoto; public final fun component6 ()Ldev/inmo/tgbotapi/types/chat/ChatPermissions; public final fun component7 ()Ljava/lang/String; public final fun component8 ()Ljava/lang/String; public final fun component9 ()Ldev/inmo/tgbotapi/types/message/abstracts/Message; - public final fun copy-reSXiMQ (Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ldev/inmo/tgbotapi/types/ChatPhoto;Ldev/inmo/tgbotapi/types/chat/ChatPermissions;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/abstracts/Message;Ljava/lang/String;Ljava/lang/Long;ZLdev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/ChatLocation;ZZZZLjava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;Ljava/lang/String;IZ)Ldev/inmo/tgbotapi/types/chat/ExtendedForumChatImpl; - public static synthetic fun copy-reSXiMQ$default (Ldev/inmo/tgbotapi/types/chat/ExtendedForumChatImpl;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ldev/inmo/tgbotapi/types/ChatPhoto;Ldev/inmo/tgbotapi/types/chat/ChatPermissions;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/abstracts/Message;Ljava/lang/String;Ljava/lang/Long;ZLdev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/ChatLocation;ZZZZLjava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;Ljava/lang/String;IZILjava/lang/Object;)Ldev/inmo/tgbotapi/types/chat/ExtendedForumChatImpl; + public final fun copy-reSXiMQ (Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ldev/inmo/tgbotapi/types/ChatPhoto;Ldev/inmo/tgbotapi/types/chat/ChatPermissions;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/abstracts/Message;Ljava/lang/String;Ljava/lang/Long;ZLdev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/ChatLocation;ZZZZLjava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;Ljava/lang/String;ILdev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes;)Ldev/inmo/tgbotapi/types/chat/ExtendedForumChatImpl; + public static synthetic fun copy-reSXiMQ$default (Ldev/inmo/tgbotapi/types/chat/ExtendedForumChatImpl;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ldev/inmo/tgbotapi/types/ChatPhoto;Ldev/inmo/tgbotapi/types/chat/ChatPermissions;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/abstracts/Message;Ljava/lang/String;Ljava/lang/Long;ZLdev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/ChatLocation;ZZZZLjava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;Ljava/lang/String;ILdev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/chat/ExtendedForumChatImpl; public fun equals (Ljava/lang/Object;)Z public fun getAccentColorId-f3WtEc0 ()I + public fun getAcceptedGiftTypes ()Ldev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes; public fun getActiveUsernames ()Ljava/util/List; public fun getAvailableReactions ()Ljava/util/List; public fun getBackgroundCustomEmojiId-GbmMWyQ ()Ljava/lang/String; @@ -15891,10 +15937,14 @@ public final class dev/inmo/tgbotapi/types/chat/ExtendedGroupChat$Companion { public final fun serializer ()Lkotlinx/serialization/KSerializer; } +public final class dev/inmo/tgbotapi/types/chat/ExtendedGroupChat$DefaultImpls { + public static fun getCanReceiveGifts (Ldev/inmo/tgbotapi/types/chat/ExtendedGroupChat;)Z +} + public final class dev/inmo/tgbotapi/types/chat/ExtendedGroupChatImpl : dev/inmo/tgbotapi/types/chat/ExtendedGroupChat { public static final field Companion Ldev/inmo/tgbotapi/types/chat/ExtendedGroupChatImpl$Companion; - public synthetic fun (JLjava/lang/String;Ldev/inmo/tgbotapi/types/ChatPhoto;Ldev/inmo/tgbotapi/types/chat/ChatPermissions;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/abstracts/Message;ZLjava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;ZIZILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (JLjava/lang/String;Ldev/inmo/tgbotapi/types/ChatPhoto;Ldev/inmo/tgbotapi/types/chat/ChatPermissions;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/abstracts/Message;ZLjava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;ZIZLkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (JLjava/lang/String;Ldev/inmo/tgbotapi/types/ChatPhoto;Ldev/inmo/tgbotapi/types/chat/ChatPermissions;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/abstracts/Message;ZLjava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;ZILdev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (JLjava/lang/String;Ldev/inmo/tgbotapi/types/ChatPhoto;Ldev/inmo/tgbotapi/types/chat/ChatPermissions;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/abstracts/Message;ZLjava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;ZILdev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1-tHkBKVM ()J public final fun component10-GbmMWyQ ()Ljava/lang/String; public final fun component11 ()Ldev/inmo/tgbotapi/types/TelegramDate; @@ -15904,7 +15954,7 @@ public final class dev/inmo/tgbotapi/types/chat/ExtendedGroupChatImpl : dev/inmo public final fun component15-GbmMWyQ ()Ljava/lang/String; public final fun component16 ()Z public final fun component17 ()I - public final fun component18 ()Z + public final fun component18 ()Ldev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes; public final fun component2 ()Ljava/lang/String; public final fun component3 ()Ldev/inmo/tgbotapi/types/ChatPhoto; public final fun component4 ()Ldev/inmo/tgbotapi/types/chat/ChatPermissions; @@ -15913,10 +15963,11 @@ public final class dev/inmo/tgbotapi/types/chat/ExtendedGroupChatImpl : dev/inmo public final fun component7 ()Ldev/inmo/tgbotapi/types/message/abstracts/Message; public final fun component8 ()Z public final fun component9 ()Ljava/util/List; - public final fun copy-S0sfXWc (JLjava/lang/String;Ldev/inmo/tgbotapi/types/ChatPhoto;Ldev/inmo/tgbotapi/types/chat/ChatPermissions;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/abstracts/Message;ZLjava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;ZIZ)Ldev/inmo/tgbotapi/types/chat/ExtendedGroupChatImpl; - public static synthetic fun copy-S0sfXWc$default (Ldev/inmo/tgbotapi/types/chat/ExtendedGroupChatImpl;JLjava/lang/String;Ldev/inmo/tgbotapi/types/ChatPhoto;Ldev/inmo/tgbotapi/types/chat/ChatPermissions;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/abstracts/Message;ZLjava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;ZIZILjava/lang/Object;)Ldev/inmo/tgbotapi/types/chat/ExtendedGroupChatImpl; + public final fun copy-S0sfXWc (JLjava/lang/String;Ldev/inmo/tgbotapi/types/ChatPhoto;Ldev/inmo/tgbotapi/types/chat/ChatPermissions;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/abstracts/Message;ZLjava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;ZILdev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes;)Ldev/inmo/tgbotapi/types/chat/ExtendedGroupChatImpl; + public static synthetic fun copy-S0sfXWc$default (Ldev/inmo/tgbotapi/types/chat/ExtendedGroupChatImpl;JLjava/lang/String;Ldev/inmo/tgbotapi/types/ChatPhoto;Ldev/inmo/tgbotapi/types/chat/ChatPermissions;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/abstracts/Message;ZLjava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;ZILdev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/chat/ExtendedGroupChatImpl; public fun equals (Ljava/lang/Object;)Z public fun getAccentColorId-f3WtEc0 ()I + public fun getAcceptedGiftTypes ()Ldev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes; public fun getAvailableReactions ()Ljava/util/List; public fun getBackgroundCustomEmojiId-GbmMWyQ ()Ljava/lang/String; public fun getCanReceiveGifts ()Z @@ -15963,6 +16014,10 @@ public final class dev/inmo/tgbotapi/types/chat/ExtendedNonBotChat$Companion { public final fun serializer ()Lkotlinx/serialization/KSerializer; } +public final class dev/inmo/tgbotapi/types/chat/ExtendedNonBotChat$DefaultImpls { + public static fun getCanReceiveGifts (Ldev/inmo/tgbotapi/types/chat/ExtendedNonBotChat;)Z +} + public abstract interface class dev/inmo/tgbotapi/types/chat/ExtendedPrivateChat : dev/inmo/tgbotapi/types/chat/ExtendedChatWithUsername, dev/inmo/tgbotapi/types/chat/ExtendedNonBotChat, dev/inmo/tgbotapi/types/chat/PrivateChat { public static final field Companion Ldev/inmo/tgbotapi/types/chat/ExtendedPrivateChat$Companion; public abstract fun getAllowCreateUserIdLink ()Z @@ -15982,12 +16037,13 @@ public final class dev/inmo/tgbotapi/types/chat/ExtendedPrivateChat$Companion { public final class dev/inmo/tgbotapi/types/chat/ExtendedPrivateChat$DefaultImpls { public static fun getAllowCreateUserIdLink (Ldev/inmo/tgbotapi/types/chat/ExtendedPrivateChat;)Z + public static fun getCanReceiveGifts (Ldev/inmo/tgbotapi/types/chat/ExtendedPrivateChat;)Z } public final class dev/inmo/tgbotapi/types/chat/ExtendedPrivateChatImpl : dev/inmo/tgbotapi/types/chat/ExtendedPrivateChat { public static final field Companion Ldev/inmo/tgbotapi/types/chat/ExtendedPrivateChatImpl$Companion; - public synthetic fun (JLdev/inmo/tgbotapi/types/ChatPhoto;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZLjava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/business_connection/BusinessIntro;Ldev/inmo/tgbotapi/types/business_connection/BusinessLocation;Ldev/inmo/tgbotapi/types/business_connection/BusinessOpeningHours;Ldev/inmo/tgbotapi/types/Birthdate;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;IZILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (JLdev/inmo/tgbotapi/types/ChatPhoto;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZLjava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/business_connection/BusinessIntro;Ldev/inmo/tgbotapi/types/business_connection/BusinessLocation;Ldev/inmo/tgbotapi/types/business_connection/BusinessOpeningHours;Ldev/inmo/tgbotapi/types/Birthdate;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;IZLkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (JLdev/inmo/tgbotapi/types/ChatPhoto;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZLjava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/business_connection/BusinessIntro;Ldev/inmo/tgbotapi/types/business_connection/BusinessLocation;Ldev/inmo/tgbotapi/types/business_connection/BusinessOpeningHours;Ldev/inmo/tgbotapi/types/Birthdate;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;ILdev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (JLdev/inmo/tgbotapi/types/ChatPhoto;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZLjava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/business_connection/BusinessIntro;Ldev/inmo/tgbotapi/types/business_connection/BusinessLocation;Ldev/inmo/tgbotapi/types/business_connection/BusinessOpeningHours;Ldev/inmo/tgbotapi/types/Birthdate;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;ILdev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1-tHkBKVM ()J public final fun component10-GbmMWyQ ()Ljava/lang/String; public final fun component11 ()Ldev/inmo/tgbotapi/types/TelegramDate; @@ -16002,7 +16058,7 @@ public final class dev/inmo/tgbotapi/types/chat/ExtendedPrivateChatImpl : dev/in public final fun component2 ()Ldev/inmo/tgbotapi/types/ChatPhoto; public final fun component20 ()Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat; public final fun component21 ()I - public final fun component22 ()Z + public final fun component22 ()Ldev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes; public final fun component3-san03mo ()Ljava/lang/String; public final fun component4 ()Ljava/util/List; public final fun component5 ()Ljava/lang/String; @@ -16010,10 +16066,11 @@ public final class dev/inmo/tgbotapi/types/chat/ExtendedPrivateChatImpl : dev/in public final fun component7 ()Ljava/lang/String; public final fun component8 ()Z public final fun component9 ()Z - public final fun copy-5RSODus (JLdev/inmo/tgbotapi/types/ChatPhoto;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZLjava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/business_connection/BusinessIntro;Ldev/inmo/tgbotapi/types/business_connection/BusinessLocation;Ldev/inmo/tgbotapi/types/business_connection/BusinessOpeningHours;Ldev/inmo/tgbotapi/types/Birthdate;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;IZ)Ldev/inmo/tgbotapi/types/chat/ExtendedPrivateChatImpl; - public static synthetic fun copy-5RSODus$default (Ldev/inmo/tgbotapi/types/chat/ExtendedPrivateChatImpl;JLdev/inmo/tgbotapi/types/ChatPhoto;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZLjava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/business_connection/BusinessIntro;Ldev/inmo/tgbotapi/types/business_connection/BusinessLocation;Ldev/inmo/tgbotapi/types/business_connection/BusinessOpeningHours;Ldev/inmo/tgbotapi/types/Birthdate;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;IZILjava/lang/Object;)Ldev/inmo/tgbotapi/types/chat/ExtendedPrivateChatImpl; + public final fun copy-5RSODus (JLdev/inmo/tgbotapi/types/ChatPhoto;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZLjava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/business_connection/BusinessIntro;Ldev/inmo/tgbotapi/types/business_connection/BusinessLocation;Ldev/inmo/tgbotapi/types/business_connection/BusinessOpeningHours;Ldev/inmo/tgbotapi/types/Birthdate;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;ILdev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes;)Ldev/inmo/tgbotapi/types/chat/ExtendedPrivateChatImpl; + public static synthetic fun copy-5RSODus$default (Ldev/inmo/tgbotapi/types/chat/ExtendedPrivateChatImpl;JLdev/inmo/tgbotapi/types/ChatPhoto;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZLjava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/business_connection/BusinessIntro;Ldev/inmo/tgbotapi/types/business_connection/BusinessLocation;Ldev/inmo/tgbotapi/types/business_connection/BusinessOpeningHours;Ldev/inmo/tgbotapi/types/Birthdate;Ldev/inmo/tgbotapi/types/chat/PreviewChannelChat;ILdev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/chat/ExtendedPrivateChatImpl; public fun equals (Ljava/lang/Object;)Z public fun getAccentColorId-f3WtEc0 ()I + public fun getAcceptedGiftTypes ()Ldev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes; public fun getActiveUsernames ()Ljava/util/List; public fun getAllowCreateUserIdLink ()Z public fun getBackgroundCustomEmojiId-GbmMWyQ ()Ljava/lang/String; @@ -16064,6 +16121,10 @@ public abstract interface class dev/inmo/tgbotapi/types/chat/ExtendedPublicChat public abstract fun getPinnedMessage ()Ldev/inmo/tgbotapi/types/message/abstracts/Message; } +public final class dev/inmo/tgbotapi/types/chat/ExtendedPublicChat$DefaultImpls { + public static fun getCanReceiveGifts (Ldev/inmo/tgbotapi/types/chat/ExtendedPublicChat;)Z +} + public abstract interface class dev/inmo/tgbotapi/types/chat/ExtendedSupergroupChat : dev/inmo/tgbotapi/types/chat/ExtendedChatWithUsername, dev/inmo/tgbotapi/types/chat/ExtendedGroupChat, dev/inmo/tgbotapi/types/chat/SupergroupChat { public static final field Companion Ldev/inmo/tgbotapi/types/chat/ExtendedSupergroupChat$Companion; public abstract fun getCanSetStickerSet ()Z @@ -16082,10 +16143,14 @@ public final class dev/inmo/tgbotapi/types/chat/ExtendedSupergroupChat$Companion public final fun serializer ()Lkotlinx/serialization/KSerializer; } +public final class dev/inmo/tgbotapi/types/chat/ExtendedSupergroupChat$DefaultImpls { + public static fun getCanReceiveGifts (Ldev/inmo/tgbotapi/types/chat/ExtendedSupergroupChat;)Z +} + public final class dev/inmo/tgbotapi/types/chat/ExtendedSupergroupChatImpl : dev/inmo/tgbotapi/types/chat/ExtendedSupergroupChat { public static final field Companion Ldev/inmo/tgbotapi/types/chat/ExtendedSupergroupChatImpl$Companion; - public synthetic fun (JLjava/lang/String;Ljava/lang/String;Ljava/util/List;Ldev/inmo/tgbotapi/types/ChatPhoto;Ldev/inmo/tgbotapi/types/chat/ChatPermissions;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/abstracts/Message;Ljava/lang/String;Ljava/lang/Long;ZLdev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/ChatLocation;ZZZZLjava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;Ljava/lang/String;IZILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (JLjava/lang/String;Ljava/lang/String;Ljava/util/List;Ldev/inmo/tgbotapi/types/ChatPhoto;Ldev/inmo/tgbotapi/types/chat/ChatPermissions;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/abstracts/Message;Ljava/lang/String;Ljava/lang/Long;ZLdev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/ChatLocation;ZZZZLjava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;Ljava/lang/String;IZLkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (JLjava/lang/String;Ljava/lang/String;Ljava/util/List;Ldev/inmo/tgbotapi/types/ChatPhoto;Ldev/inmo/tgbotapi/types/chat/ChatPermissions;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/abstracts/Message;Ljava/lang/String;Ljava/lang/Long;ZLdev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/ChatLocation;ZZZZLjava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;Ljava/lang/String;ILdev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (JLjava/lang/String;Ljava/lang/String;Ljava/util/List;Ldev/inmo/tgbotapi/types/ChatPhoto;Ldev/inmo/tgbotapi/types/chat/ChatPermissions;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/abstracts/Message;Ljava/lang/String;Ljava/lang/Long;ZLdev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/ChatLocation;ZZZZLjava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;Ljava/lang/String;ILdev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1-tHkBKVM ()J public final fun component10-eaLzeK0 ()Ljava/lang/String; public final fun component11 ()Ljava/lang/Long; @@ -16109,17 +16174,18 @@ public final class dev/inmo/tgbotapi/types/chat/ExtendedSupergroupChatImpl : dev public final fun component28-eaLzeK0 ()Ljava/lang/String; public final fun component29 ()I public final fun component3-san03mo ()Ljava/lang/String; - public final fun component30 ()Z + public final fun component30 ()Ldev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes; public final fun component4 ()Ljava/util/List; public final fun component5 ()Ldev/inmo/tgbotapi/types/ChatPhoto; public final fun component6 ()Ldev/inmo/tgbotapi/types/chat/ChatPermissions; public final fun component7 ()Ljava/lang/String; public final fun component8 ()Ljava/lang/String; public final fun component9 ()Ldev/inmo/tgbotapi/types/message/abstracts/Message; - public final fun copy-HPKNO20 (JLjava/lang/String;Ljava/lang/String;Ljava/util/List;Ldev/inmo/tgbotapi/types/ChatPhoto;Ldev/inmo/tgbotapi/types/chat/ChatPermissions;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/abstracts/Message;Ljava/lang/String;Ljava/lang/Long;ZLdev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/ChatLocation;ZZZZLjava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;Ljava/lang/String;IZ)Ldev/inmo/tgbotapi/types/chat/ExtendedSupergroupChatImpl; - public static synthetic fun copy-HPKNO20$default (Ldev/inmo/tgbotapi/types/chat/ExtendedSupergroupChatImpl;JLjava/lang/String;Ljava/lang/String;Ljava/util/List;Ldev/inmo/tgbotapi/types/ChatPhoto;Ldev/inmo/tgbotapi/types/chat/ChatPermissions;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/abstracts/Message;Ljava/lang/String;Ljava/lang/Long;ZLdev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/ChatLocation;ZZZZLjava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;Ljava/lang/String;IZILjava/lang/Object;)Ldev/inmo/tgbotapi/types/chat/ExtendedSupergroupChatImpl; + public final fun copy-HPKNO20 (JLjava/lang/String;Ljava/lang/String;Ljava/util/List;Ldev/inmo/tgbotapi/types/ChatPhoto;Ldev/inmo/tgbotapi/types/chat/ChatPermissions;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/abstracts/Message;Ljava/lang/String;Ljava/lang/Long;ZLdev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/ChatLocation;ZZZZLjava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;Ljava/lang/String;ILdev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes;)Ldev/inmo/tgbotapi/types/chat/ExtendedSupergroupChatImpl; + public static synthetic fun copy-HPKNO20$default (Ldev/inmo/tgbotapi/types/chat/ExtendedSupergroupChatImpl;JLjava/lang/String;Ljava/lang/String;Ljava/util/List;Ldev/inmo/tgbotapi/types/ChatPhoto;Ldev/inmo/tgbotapi/types/chat/ChatPermissions;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/abstracts/Message;Ljava/lang/String;Ljava/lang/Long;ZLdev/inmo/tgbotapi/types/IdChatIdentifier;Ldev/inmo/tgbotapi/types/ChatLocation;ZZZZLjava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/TelegramDate;ILdev/inmo/tgbotapi/types/colors/ColorId;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;Ljava/lang/String;ILdev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/chat/ExtendedSupergroupChatImpl; public fun equals (Ljava/lang/Object;)Z public fun getAccentColorId-f3WtEc0 ()I + public fun getAcceptedGiftTypes ()Ldev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes; public fun getActiveUsernames ()Ljava/util/List; public fun getAvailableReactions ()Ljava/util/List; public fun getBackgroundCustomEmojiId-GbmMWyQ ()Ljava/lang/String; @@ -16484,6 +16550,7 @@ public final class dev/inmo/tgbotapi/types/chat/UnknownExtendedChat : dev/inmo/t public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/chat/UnknownExtendedChat;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ljava/lang/String;Lkotlinx/serialization/json/JsonObject;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/chat/UnknownExtendedChat; public fun equals (Ljava/lang/Object;)Z public fun getAccentColorId-f3WtEc0 ()I + public fun getAcceptedGiftTypes ()Ldev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes; public fun getBackgroundCustomEmojiId-GbmMWyQ ()Ljava/lang/String; public fun getCanReceiveGifts ()Z public fun getChatPhoto ()Ldev/inmo/tgbotapi/types/ChatPhoto; @@ -18687,14 +18754,42 @@ public final class dev/inmo/tgbotapi/types/games/GameHighScore$Companion { public final fun serializer ()Lkotlinx/serialization/KSerializer; } +public final class dev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes { + public static final field Companion Ldev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes$Companion; + public fun ()V + public fun (ZZZZ)V + public synthetic fun (ZZZZILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Z + public final fun component2 ()Z + public final fun component3 ()Z + public final fun component4 ()Z + public final fun copy (ZZZZ)Ldev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes; + public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes;ZZZZILjava/lang/Object;)Ldev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes; + public fun equals (Ljava/lang/Object;)Z + public final fun getLimitedGifts ()Z + public final fun getPremiumSubscription ()Z + public final fun getUniqueGifts ()Z + public final fun getUnlimitedGifts ()Z + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public synthetic class dev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Ldev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes$$serializer; + public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public final class dev/inmo/tgbotapi/types/gifts/AcceptedGiftTypes$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + public abstract interface class dev/inmo/tgbotapi/types/gifts/Gift { public static final field Companion Ldev/inmo/tgbotapi/types/gifts/Gift$Companion; - public abstract fun getId-OyCYJok ()Ljava/lang/String; - public abstract fun getRemainingCount ()Ljava/lang/Integer; - public abstract fun getStarCount ()I - public abstract fun getSticker ()Ldev/inmo/tgbotapi/types/files/Sticker; - public abstract fun getTotalCount ()Ljava/lang/Integer; - public abstract fun getUpgradeStarCount ()Ljava/lang/Integer; } public final class dev/inmo/tgbotapi/types/gifts/Gift$Companion : kotlinx/serialization/KSerializer { @@ -18706,8 +18801,27 @@ public final class dev/inmo/tgbotapi/types/gifts/Gift$Companion : kotlinx/serial public final fun serializer ()Lkotlinx/serialization/KSerializer; } -public final class dev/inmo/tgbotapi/types/gifts/Gift$Limited : dev/inmo/tgbotapi/types/gifts/Gift { - public static final field Companion Ldev/inmo/tgbotapi/types/gifts/Gift$Limited$Companion; +public abstract interface class dev/inmo/tgbotapi/types/gifts/Gift$Regular : dev/inmo/tgbotapi/types/gifts/Gift { + public static final field Companion Ldev/inmo/tgbotapi/types/gifts/Gift$Regular$Companion; + public abstract fun getId-OyCYJok ()Ljava/lang/String; + public abstract fun getRemainingCount ()Ljava/lang/Integer; + public abstract fun getStarCount ()I + public abstract fun getSticker ()Ldev/inmo/tgbotapi/types/files/Sticker; + public abstract fun getTotalCount ()Ljava/lang/Integer; + public abstract fun getUpgradeStarCount ()Ljava/lang/Integer; +} + +public final class dev/inmo/tgbotapi/types/gifts/Gift$Regular$Companion : kotlinx/serialization/KSerializer { + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/types/gifts/Gift$Regular; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class dev/inmo/tgbotapi/types/gifts/Gift$Regular$Limited : dev/inmo/tgbotapi/types/gifts/Gift$Regular { + public static final field Companion Ldev/inmo/tgbotapi/types/gifts/Gift$Regular$Limited$Companion; public synthetic fun (Ljava/lang/String;Ldev/inmo/tgbotapi/types/files/Sticker;IIILjava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public synthetic fun (Ljava/lang/String;Ldev/inmo/tgbotapi/types/files/Sticker;IIILjava/lang/Integer;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1-OyCYJok ()Ljava/lang/String; @@ -18716,8 +18830,8 @@ public final class dev/inmo/tgbotapi/types/gifts/Gift$Limited : dev/inmo/tgbotap public final fun component4 ()I public final fun component5 ()I public final fun component6 ()Ljava/lang/Integer; - public final fun copy-RpW899k (Ljava/lang/String;Ldev/inmo/tgbotapi/types/files/Sticker;IIILjava/lang/Integer;)Ldev/inmo/tgbotapi/types/gifts/Gift$Limited; - public static synthetic fun copy-RpW899k$default (Ldev/inmo/tgbotapi/types/gifts/Gift$Limited;Ljava/lang/String;Ldev/inmo/tgbotapi/types/files/Sticker;IIILjava/lang/Integer;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/gifts/Gift$Limited; + public final fun copy-RpW899k (Ljava/lang/String;Ldev/inmo/tgbotapi/types/files/Sticker;IIILjava/lang/Integer;)Ldev/inmo/tgbotapi/types/gifts/Gift$Regular$Limited; + public static synthetic fun copy-RpW899k$default (Ldev/inmo/tgbotapi/types/gifts/Gift$Regular$Limited;Ljava/lang/String;Ldev/inmo/tgbotapi/types/files/Sticker;IIILjava/lang/Integer;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/gifts/Gift$Regular$Limited; public fun equals (Ljava/lang/Object;)Z public fun getId-OyCYJok ()Ljava/lang/String; public fun getRemainingCount ()Ljava/lang/Integer; @@ -18729,30 +18843,30 @@ public final class dev/inmo/tgbotapi/types/gifts/Gift$Limited : dev/inmo/tgbotap public fun toString ()Ljava/lang/String; } -public synthetic class dev/inmo/tgbotapi/types/gifts/Gift$Limited$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Ldev/inmo/tgbotapi/types/gifts/Gift$Limited$$serializer; +public synthetic class dev/inmo/tgbotapi/types/gifts/Gift$Regular$Limited$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Ldev/inmo/tgbotapi/types/gifts/Gift$Regular$Limited$$serializer; public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/types/gifts/Gift$Limited; + public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/types/gifts/Gift$Regular$Limited; public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/types/gifts/Gift$Limited;)V + public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/types/gifts/Gift$Regular$Limited;)V public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V } -public final class dev/inmo/tgbotapi/types/gifts/Gift$Limited$Companion { +public final class dev/inmo/tgbotapi/types/gifts/Gift$Regular$Limited$Companion { public final fun serializer ()Lkotlinx/serialization/KSerializer; } -public final class dev/inmo/tgbotapi/types/gifts/Gift$Unlimited : dev/inmo/tgbotapi/types/gifts/Gift { - public static final field Companion Ldev/inmo/tgbotapi/types/gifts/Gift$Unlimited$Companion; +public final class dev/inmo/tgbotapi/types/gifts/Gift$Regular$Unlimited : dev/inmo/tgbotapi/types/gifts/Gift$Regular { + public static final field Companion Ldev/inmo/tgbotapi/types/gifts/Gift$Regular$Unlimited$Companion; public synthetic fun (Ljava/lang/String;Ldev/inmo/tgbotapi/types/files/Sticker;ILjava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public synthetic fun (Ljava/lang/String;Ldev/inmo/tgbotapi/types/files/Sticker;ILjava/lang/Integer;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1-OyCYJok ()Ljava/lang/String; public final fun component2 ()Ldev/inmo/tgbotapi/types/files/Sticker; public final fun component3 ()I public final fun component4 ()Ljava/lang/Integer; - public final fun copy-Pd50qfQ (Ljava/lang/String;Ldev/inmo/tgbotapi/types/files/Sticker;ILjava/lang/Integer;)Ldev/inmo/tgbotapi/types/gifts/Gift$Unlimited; - public static synthetic fun copy-Pd50qfQ$default (Ldev/inmo/tgbotapi/types/gifts/Gift$Unlimited;Ljava/lang/String;Ldev/inmo/tgbotapi/types/files/Sticker;ILjava/lang/Integer;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/gifts/Gift$Unlimited; + public final fun copy-Pd50qfQ (Ljava/lang/String;Ldev/inmo/tgbotapi/types/files/Sticker;ILjava/lang/Integer;)Ldev/inmo/tgbotapi/types/gifts/Gift$Regular$Unlimited; + public static synthetic fun copy-Pd50qfQ$default (Ldev/inmo/tgbotapi/types/gifts/Gift$Regular$Unlimited;Ljava/lang/String;Ldev/inmo/tgbotapi/types/files/Sticker;ILjava/lang/Integer;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/gifts/Gift$Regular$Unlimited; public fun equals (Ljava/lang/Object;)Z public fun getId-OyCYJok ()Ljava/lang/String; public fun getRemainingCount ()Ljava/lang/Integer; @@ -18764,17 +18878,260 @@ public final class dev/inmo/tgbotapi/types/gifts/Gift$Unlimited : dev/inmo/tgbot public fun toString ()Ljava/lang/String; } -public synthetic class dev/inmo/tgbotapi/types/gifts/Gift$Unlimited$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Ldev/inmo/tgbotapi/types/gifts/Gift$Unlimited$$serializer; +public synthetic class dev/inmo/tgbotapi/types/gifts/Gift$Regular$Unlimited$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Ldev/inmo/tgbotapi/types/gifts/Gift$Regular$Unlimited$$serializer; public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/types/gifts/Gift$Unlimited; + public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/types/gifts/Gift$Regular$Unlimited; public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/types/gifts/Gift$Unlimited;)V + public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/types/gifts/Gift$Regular$Unlimited;)V public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V } -public final class dev/inmo/tgbotapi/types/gifts/Gift$Unlimited$Companion { +public final class dev/inmo/tgbotapi/types/gifts/Gift$Regular$Unlimited$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class dev/inmo/tgbotapi/types/gifts/Gift$Unique : dev/inmo/tgbotapi/types/gifts/Gift { + public static final field Companion Ldev/inmo/tgbotapi/types/gifts/Gift$Unique$Companion; + public fun (Ljava/lang/String;Ljava/lang/String;ILdev/inmo/tgbotapi/types/gifts/unique/UniqueGiftModel;Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftSymbol;Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftBackdrop;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Ljava/lang/String; + public final fun component3 ()I + public final fun component4 ()Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftModel; + public final fun component5 ()Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftSymbol; + public final fun component6 ()Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftBackdrop; + public final fun copy (Ljava/lang/String;Ljava/lang/String;ILdev/inmo/tgbotapi/types/gifts/unique/UniqueGiftModel;Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftSymbol;Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftBackdrop;)Ldev/inmo/tgbotapi/types/gifts/Gift$Unique; + public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/gifts/Gift$Unique;Ljava/lang/String;Ljava/lang/String;ILdev/inmo/tgbotapi/types/gifts/unique/UniqueGiftModel;Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftSymbol;Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftBackdrop;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/gifts/Gift$Unique; + public fun equals (Ljava/lang/Object;)Z + public final fun getBackdrop ()Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftBackdrop; + public final fun getBaseName ()Ljava/lang/String; + public final fun getModel ()Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftModel; + public final fun getName ()Ljava/lang/String; + public final fun getNumber ()I + public final fun getSymbol ()Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftSymbol; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public synthetic class dev/inmo/tgbotapi/types/gifts/Gift$Unique$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Ldev/inmo/tgbotapi/types/gifts/Gift$Unique$$serializer; + public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/types/gifts/Gift$Unique; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/types/gifts/Gift$Unique;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public final class dev/inmo/tgbotapi/types/gifts/Gift$Unique$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public abstract interface class dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived : dev/inmo/tgbotapi/types/message/ChatEvents/abstracts/CommonEvent { + public static final field Companion Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Companion; + public abstract fun getGift ()Ldev/inmo/tgbotapi/types/gifts/Gift; + public abstract fun getOwnedGiftId-FhTg01o ()Ljava/lang/String; +} + +public final class dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public abstract interface class dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$ReceivedInBusinessAccount : dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived { + public static final field Companion Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$ReceivedInBusinessAccount$Companion; + public abstract fun getOwnedGiftId-OyCYJok ()Ljava/lang/String; +} + +public final class dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$ReceivedInBusinessAccount$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public abstract interface class dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular : dev/inmo/tgbotapi/abstracts/TextedInput, dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived { + public static final field Companion Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$Companion; + public abstract fun getCanBeUpgraded ()Z + public abstract fun getConvertStarCount ()Ljava/lang/Integer; + public abstract fun getGift ()Ldev/inmo/tgbotapi/types/gifts/Gift$Regular; + public abstract fun getPrepaidUpgradeStarCount ()Ljava/lang/Integer; + public abstract fun isPrivate ()Z +} + +public final class dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$Common : dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular { + public static final field Companion Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$Common$Companion; + public fun (Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/Integer;Ljava/lang/Integer;ZLjava/lang/String;Ljava/util/List;Z)V + public synthetic fun (Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/Integer;Ljava/lang/Integer;ZLjava/lang/String;Ljava/util/List;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Ldev/inmo/tgbotapi/types/gifts/Gift$Regular; + public final fun component2 ()Ljava/lang/Integer; + public final fun component3 ()Ljava/lang/Integer; + public final fun component4 ()Z + public final fun component5 ()Ljava/lang/String; + public final fun component7 ()Z + public final fun copy (Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/Integer;Ljava/lang/Integer;ZLjava/lang/String;Ljava/util/List;Z)Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$Common; + public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$Common;Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/Integer;Ljava/lang/Integer;ZLjava/lang/String;Ljava/util/List;ZILjava/lang/Object;)Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$Common; + public fun equals (Ljava/lang/Object;)Z + public fun getCanBeUpgraded ()Z + public fun getConvertStarCount ()Ljava/lang/Integer; + public fun getGift ()Ldev/inmo/tgbotapi/types/gifts/Gift$Regular; + public synthetic fun getGift ()Ldev/inmo/tgbotapi/types/gifts/Gift; + public fun getOwnedGiftId-FhTg01o ()Ljava/lang/String; + public fun getPrepaidUpgradeStarCount ()Ljava/lang/Integer; + public fun getText ()Ljava/lang/String; + public fun getTextSources ()Ljava/util/List; + public fun hashCode ()I + public fun isPrivate ()Z + public fun toString ()Ljava/lang/String; +} + +public synthetic class dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$Common$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$Common$$serializer; + public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$Common; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$Common;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public final class dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$Common$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$Companion : kotlinx/serialization/KSerializer { + public final fun PublicConstructor (Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;ZLjava/lang/String;Ljava/util/List;IZ)Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular; + public static synthetic fun PublicConstructor$default (Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$Companion;Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;ZLjava/lang/String;Ljava/util/List;IZILjava/lang/Object;)Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$ReceivedInBusinessAccount : dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$ReceivedInBusinessAccount, dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular { + public static final field Companion Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$ReceivedInBusinessAccount$Companion; + public synthetic fun (Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;ZLjava/lang/String;Ljava/util/List;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;ZLjava/lang/String;Ljava/util/List;ZLkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Ldev/inmo/tgbotapi/types/gifts/Gift$Regular; + public final fun component2-OyCYJok ()Ljava/lang/String; + public final fun component3 ()Ljava/lang/Integer; + public final fun component4 ()Ljava/lang/Integer; + public final fun component5 ()Z + public final fun component6 ()Ljava/lang/String; + public final fun component8 ()Z + public final fun copy-xVLKMpc (Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;ZLjava/lang/String;Ljava/util/List;Z)Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$ReceivedInBusinessAccount; + public static synthetic fun copy-xVLKMpc$default (Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$ReceivedInBusinessAccount;Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;ZLjava/lang/String;Ljava/util/List;ZILjava/lang/Object;)Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$ReceivedInBusinessAccount; + public fun equals (Ljava/lang/Object;)Z + public fun getCanBeUpgraded ()Z + public fun getConvertStarCount ()Ljava/lang/Integer; + public fun getGift ()Ldev/inmo/tgbotapi/types/gifts/Gift$Regular; + public synthetic fun getGift ()Ldev/inmo/tgbotapi/types/gifts/Gift; + public synthetic fun getOwnedGiftId-FhTg01o ()Ljava/lang/String; + public fun getOwnedGiftId-OyCYJok ()Ljava/lang/String; + public fun getPrepaidUpgradeStarCount ()Ljava/lang/Integer; + public fun getText ()Ljava/lang/String; + public fun getTextSources ()Ljava/util/List; + public fun hashCode ()I + public fun isPrivate ()Z + public fun toString ()Ljava/lang/String; +} + +public synthetic class dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$ReceivedInBusinessAccount$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$ReceivedInBusinessAccount$$serializer; + public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$ReceivedInBusinessAccount; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$ReceivedInBusinessAccount;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public final class dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Regular$ReceivedInBusinessAccount$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public abstract interface class dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique : dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived { + public static final field Companion Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Companion; + public abstract fun getGift ()Ldev/inmo/tgbotapi/types/gifts/Gift$Unique; + public abstract fun getOrigin ()Ljava/lang/String; + public abstract fun getTransferStarCount ()Ljava/lang/Integer; +} + +public final class dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Common : dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique { + public static final field Companion Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Common$Companion; + public fun (Ldev/inmo/tgbotapi/types/gifts/Gift$Unique;Ljava/lang/String;Ljava/lang/Integer;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/gifts/Gift$Unique;Ljava/lang/String;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Ldev/inmo/tgbotapi/types/gifts/Gift$Unique; + public final fun component2 ()Ljava/lang/String; + public final fun component3 ()Ljava/lang/Integer; + public final fun copy (Ldev/inmo/tgbotapi/types/gifts/Gift$Unique;Ljava/lang/String;Ljava/lang/Integer;)Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Common; + public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Common;Ldev/inmo/tgbotapi/types/gifts/Gift$Unique;Ljava/lang/String;Ljava/lang/Integer;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Common; + public fun equals (Ljava/lang/Object;)Z + public fun getGift ()Ldev/inmo/tgbotapi/types/gifts/Gift$Unique; + public synthetic fun getGift ()Ldev/inmo/tgbotapi/types/gifts/Gift; + public fun getOrigin ()Ljava/lang/String; + public fun getOwnedGiftId-FhTg01o ()Ljava/lang/String; + public fun getTransferStarCount ()Ljava/lang/Integer; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public synthetic class dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Common$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Common$$serializer; + public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Common; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Common;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public final class dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Common$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Companion : kotlinx/serialization/KSerializer { + public final fun PublicConstructor (Ldev/inmo/tgbotapi/types/gifts/Gift$Unique;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;)Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique; + public static synthetic fun PublicConstructor$default (Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$Companion;Ldev/inmo/tgbotapi/types/gifts/Gift$Unique;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$ReceivedInBusinessAccount : dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$ReceivedInBusinessAccount, dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique { + public static final field Companion Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$ReceivedInBusinessAccount$Companion; + public synthetic fun (Ldev/inmo/tgbotapi/types/gifts/Gift$Unique;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/gifts/Gift$Unique;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Ldev/inmo/tgbotapi/types/gifts/Gift$Unique; + public final fun component2-OyCYJok ()Ljava/lang/String; + public final fun component3 ()Ljava/lang/String; + public final fun component4 ()Ljava/lang/Integer; + public final fun copy-A6CMM0Q (Ldev/inmo/tgbotapi/types/gifts/Gift$Unique;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;)Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$ReceivedInBusinessAccount; + public static synthetic fun copy-A6CMM0Q$default (Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$ReceivedInBusinessAccount;Ldev/inmo/tgbotapi/types/gifts/Gift$Unique;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$ReceivedInBusinessAccount; + public fun equals (Ljava/lang/Object;)Z + public fun getGift ()Ldev/inmo/tgbotapi/types/gifts/Gift$Unique; + public synthetic fun getGift ()Ldev/inmo/tgbotapi/types/gifts/Gift; + public fun getOrigin ()Ljava/lang/String; + public synthetic fun getOwnedGiftId-FhTg01o ()Ljava/lang/String; + public fun getOwnedGiftId-OyCYJok ()Ljava/lang/String; + public fun getTransferStarCount ()Ljava/lang/Integer; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public synthetic class dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$ReceivedInBusinessAccount$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$ReceivedInBusinessAccount$$serializer; + public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$ReceivedInBusinessAccount; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$ReceivedInBusinessAccount;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public final class dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived$Unique$ReceivedInBusinessAccount$Companion { public final fun serializer ()Lkotlinx/serialization/KSerializer; } @@ -18804,6 +19161,128 @@ public final class dev/inmo/tgbotapi/types/gifts/Gifts$Companion { public final fun serializer ()Lkotlinx/serialization/KSerializer; } +public final class dev/inmo/tgbotapi/types/gifts/unique/UniqueGiftBackdrop { + public static final field Companion Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftBackdrop$Companion; + public fun (Ljava/lang/String;Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftBackdropColors;I)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftBackdropColors; + public final fun component3 ()I + public final fun copy (Ljava/lang/String;Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftBackdropColors;I)Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftBackdrop; + public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftBackdrop;Ljava/lang/String;Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftBackdropColors;IILjava/lang/Object;)Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftBackdrop; + public fun equals (Ljava/lang/Object;)Z + public final fun getColors ()Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftBackdropColors; + public final fun getName ()Ljava/lang/String; + public final fun getRarityPerMille ()I + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public synthetic class dev/inmo/tgbotapi/types/gifts/unique/UniqueGiftBackdrop$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftBackdrop$$serializer; + public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftBackdrop; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftBackdrop;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public final class dev/inmo/tgbotapi/types/gifts/unique/UniqueGiftBackdrop$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class dev/inmo/tgbotapi/types/gifts/unique/UniqueGiftBackdropColors { + public static final field Companion Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftBackdropColors$Companion; + public synthetic fun (IIIILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1-m7U56J0 ()I + public final fun component2-m7U56J0 ()I + public final fun component3-m7U56J0 ()I + public final fun component4-m7U56J0 ()I + public final fun copy-t-gPp28 (IIII)Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftBackdropColors; + public static synthetic fun copy-t-gPp28$default (Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftBackdropColors;IIIIILjava/lang/Object;)Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftBackdropColors; + public fun equals (Ljava/lang/Object;)Z + public final fun getCenterColor-m7U56J0 ()I + public final fun getEdgeColor-m7U56J0 ()I + public final fun getSymbolColor-m7U56J0 ()I + public final fun getTextColor-m7U56J0 ()I + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public synthetic class dev/inmo/tgbotapi/types/gifts/unique/UniqueGiftBackdropColors$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftBackdropColors$$serializer; + public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftBackdropColors; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftBackdropColors;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public final class dev/inmo/tgbotapi/types/gifts/unique/UniqueGiftBackdropColors$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class dev/inmo/tgbotapi/types/gifts/unique/UniqueGiftModel { + public static final field Companion Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftModel$Companion; + public fun (Ljava/lang/String;Ldev/inmo/tgbotapi/types/files/Sticker;I)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Ldev/inmo/tgbotapi/types/files/Sticker; + public final fun component3 ()I + public final fun copy (Ljava/lang/String;Ldev/inmo/tgbotapi/types/files/Sticker;I)Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftModel; + public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftModel;Ljava/lang/String;Ldev/inmo/tgbotapi/types/files/Sticker;IILjava/lang/Object;)Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftModel; + public fun equals (Ljava/lang/Object;)Z + public final fun getName ()Ljava/lang/String; + public final fun getRarityPerMille ()I + public final fun getSticker ()Ldev/inmo/tgbotapi/types/files/Sticker; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public synthetic class dev/inmo/tgbotapi/types/gifts/unique/UniqueGiftModel$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftModel$$serializer; + public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftModel; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftModel;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public final class dev/inmo/tgbotapi/types/gifts/unique/UniqueGiftModel$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class dev/inmo/tgbotapi/types/gifts/unique/UniqueGiftSymbol { + public static final field Companion Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftSymbol$Companion; + public fun (Ljava/lang/String;Ldev/inmo/tgbotapi/types/files/Sticker;I)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Ldev/inmo/tgbotapi/types/files/Sticker; + public final fun component3 ()I + public final fun copy (Ljava/lang/String;Ldev/inmo/tgbotapi/types/files/Sticker;I)Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftSymbol; + public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftSymbol;Ljava/lang/String;Ldev/inmo/tgbotapi/types/files/Sticker;IILjava/lang/Object;)Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftSymbol; + public fun equals (Ljava/lang/Object;)Z + public final fun getName ()Ljava/lang/String; + public final fun getRarityPerMille ()I + public final fun getSticker ()Ldev/inmo/tgbotapi/types/files/Sticker; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; +} + +public synthetic class dev/inmo/tgbotapi/types/gifts/unique/UniqueGiftSymbol$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftSymbol$$serializer; + public final fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftSymbol; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public final fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public final fun serialize (Lkotlinx/serialization/encoding/Encoder;Ldev/inmo/tgbotapi/types/gifts/unique/UniqueGiftSymbol;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public final class dev/inmo/tgbotapi/types/gifts/unique/UniqueGiftSymbol$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + public final class dev/inmo/tgbotapi/types/giveaway/Giveaway : dev/inmo/tgbotapi/types/ReplyInfo$External$ContentVariant, dev/inmo/tgbotapi/types/giveaway/GiveawayInfo$OptionallyPremium, dev/inmo/tgbotapi/types/giveaway/GiveawayInfo$OptionallyStars { public static final field Companion Ldev/inmo/tgbotapi/types/giveaway/Giveaway$Companion; public fun (Ljava/util/List;Ldev/inmo/tgbotapi/types/TelegramDate;IZZLjava/lang/String;Ljava/util/List;Ljava/lang/Integer;Ljava/lang/Integer;)V @@ -25748,15 +26227,15 @@ public final class dev/inmo/tgbotapi/types/payments/stars/TransactionPartner$Aff public final class dev/inmo/tgbotapi/types/payments/stars/TransactionPartner$Chat : dev/inmo/tgbotapi/types/payments/stars/TransactionPartner { public static final field Companion Ldev/inmo/tgbotapi/types/payments/stars/TransactionPartner$Chat$Companion; public static final field type Ljava/lang/String; - public fun (Ldev/inmo/tgbotapi/types/chat/PreviewChat;Ldev/inmo/tgbotapi/types/gifts/Gift;)V - public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewChat;Ldev/inmo/tgbotapi/types/gifts/Gift;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ldev/inmo/tgbotapi/types/chat/PreviewChat;Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewChat;Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ldev/inmo/tgbotapi/types/chat/PreviewChat; - public final fun component2 ()Ldev/inmo/tgbotapi/types/gifts/Gift; - public final fun copy (Ldev/inmo/tgbotapi/types/chat/PreviewChat;Ldev/inmo/tgbotapi/types/gifts/Gift;)Ldev/inmo/tgbotapi/types/payments/stars/TransactionPartner$Chat; - public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/payments/stars/TransactionPartner$Chat;Ldev/inmo/tgbotapi/types/chat/PreviewChat;Ldev/inmo/tgbotapi/types/gifts/Gift;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/payments/stars/TransactionPartner$Chat; + public final fun component2 ()Ldev/inmo/tgbotapi/types/gifts/Gift$Regular; + public final fun copy (Ldev/inmo/tgbotapi/types/chat/PreviewChat;Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;)Ldev/inmo/tgbotapi/types/payments/stars/TransactionPartner$Chat; + public static synthetic fun copy$default (Ldev/inmo/tgbotapi/types/payments/stars/TransactionPartner$Chat;Ldev/inmo/tgbotapi/types/chat/PreviewChat;Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/payments/stars/TransactionPartner$Chat; public fun equals (Ljava/lang/Object;)Z public final fun getChat ()Ldev/inmo/tgbotapi/types/chat/PreviewChat; - public final fun getGift ()Ldev/inmo/tgbotapi/types/gifts/Gift; + public final fun getGift ()Ldev/inmo/tgbotapi/types/gifts/Gift$Regular; public fun getType ()Ljava/lang/String; public fun hashCode ()I public fun toString ()Ljava/lang/String; @@ -25841,20 +26320,20 @@ public final class dev/inmo/tgbotapi/types/payments/stars/TransactionPartner$Unk public final class dev/inmo/tgbotapi/types/payments/stars/TransactionPartner$User : dev/inmo/tgbotapi/abstracts/types/SubscriptionPeriodInfo, dev/inmo/tgbotapi/types/payments/stars/TransactionPartner { public static final field Companion Ldev/inmo/tgbotapi/types/payments/stars/TransactionPartner$User$Companion; public static final field type Ljava/lang/String; - public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewUser;Ldev/inmo/tgbotapi/types/payments/AffiliateInfo;Ljava/lang/String;Lkotlin/time/Duration;Ljava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/gifts/Gift;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewUser;Ldev/inmo/tgbotapi/types/payments/AffiliateInfo;Ljava/lang/String;Lkotlin/time/Duration;Ljava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/gifts/Gift;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewUser;Ldev/inmo/tgbotapi/types/payments/AffiliateInfo;Ljava/lang/String;Lkotlin/time/Duration;Ljava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/chat/PreviewUser;Ldev/inmo/tgbotapi/types/payments/AffiliateInfo;Ljava/lang/String;Lkotlin/time/Duration;Ljava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ldev/inmo/tgbotapi/types/chat/PreviewUser; public final fun component2 ()Ldev/inmo/tgbotapi/types/payments/AffiliateInfo; public final fun component3 ()Ljava/lang/String; public final fun component4-FghU774 ()Lkotlin/time/Duration; public final fun component5 ()Ljava/util/List; public final fun component6-Y25QJn4 ()Ljava/lang/String; - public final fun component7 ()Ldev/inmo/tgbotapi/types/gifts/Gift; - public final fun copy-13OOIVY (Ldev/inmo/tgbotapi/types/chat/PreviewUser;Ldev/inmo/tgbotapi/types/payments/AffiliateInfo;Ljava/lang/String;Lkotlin/time/Duration;Ljava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/gifts/Gift;)Ldev/inmo/tgbotapi/types/payments/stars/TransactionPartner$User; - public static synthetic fun copy-13OOIVY$default (Ldev/inmo/tgbotapi/types/payments/stars/TransactionPartner$User;Ldev/inmo/tgbotapi/types/chat/PreviewUser;Ldev/inmo/tgbotapi/types/payments/AffiliateInfo;Ljava/lang/String;Lkotlin/time/Duration;Ljava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/gifts/Gift;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/payments/stars/TransactionPartner$User; + public final fun component7 ()Ldev/inmo/tgbotapi/types/gifts/Gift$Regular; + public final fun copy-13OOIVY (Ldev/inmo/tgbotapi/types/chat/PreviewUser;Ldev/inmo/tgbotapi/types/payments/AffiliateInfo;Ljava/lang/String;Lkotlin/time/Duration;Ljava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;)Ldev/inmo/tgbotapi/types/payments/stars/TransactionPartner$User; + public static synthetic fun copy-13OOIVY$default (Ldev/inmo/tgbotapi/types/payments/stars/TransactionPartner$User;Ldev/inmo/tgbotapi/types/chat/PreviewUser;Ldev/inmo/tgbotapi/types/payments/AffiliateInfo;Ljava/lang/String;Lkotlin/time/Duration;Ljava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/gifts/Gift$Regular;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/payments/stars/TransactionPartner$User; public fun equals (Ljava/lang/Object;)Z public final fun getAffiliate ()Ldev/inmo/tgbotapi/types/payments/AffiliateInfo; - public final fun getGift ()Ldev/inmo/tgbotapi/types/gifts/Gift; + public final fun getGift ()Ldev/inmo/tgbotapi/types/gifts/Gift$Regular; public final fun getInvoicePayload ()Ljava/lang/String; public final fun getPaidMedia ()Ljava/util/List; public final fun getPaidMediaPayload-Y25QJn4 ()Ljava/lang/String; @@ -27721,6 +28200,7 @@ public final class dev/inmo/tgbotapi/utils/DefaultKSLogKt { } public final class dev/inmo/tgbotapi/utils/DeserializeWithUnknownKt { + public static final fun deserializeEitherWithRaw (Lkotlinx/serialization/encoding/Decoder;Lkotlinx/serialization/KSerializer;)Ldev/inmo/micro_utils/common/Either; public static final fun deserializeWithRaw (Lkotlinx/serialization/encoding/Decoder;Lkotlinx/serialization/KSerializer;)Lkotlin/Pair; } diff --git a/tgbotapi.core/build.gradle b/tgbotapi.core/build.gradle index 1740d84192..913de5000c 100644 --- a/tgbotapi.core/build.gradle +++ b/tgbotapi.core/build.gradle @@ -78,6 +78,6 @@ dependencies { ksp { arg("cctargetPackage", "dev.inmo.tgbotapi.extensions.utils") - arg("ccoutputFileName", "ClassCastsNew") - arg("ccoutputFolder", project(":tgbotapi.utils").file("src/commonMain/kotlin").absolutePath) + arg("ccoutputFileName", "ClassCastsNew.kt") + arg("ccoutputFolder", project(":tgbotapi.utils").file("src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils").absolutePath) } diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/GiftInfo.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/GiftInfo.kt deleted file mode 100644 index 676a179281..0000000000 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/GiftInfo.kt +++ /dev/null @@ -1,72 +0,0 @@ -package dev.inmo.tgbotapi.types.gifts - -import dev.inmo.tgbotapi.types.* -import dev.inmo.tgbotapi.types.message.RawMessageEntities -import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList -import dev.inmo.tgbotapi.types.message.toRawMessageEntities -import kotlinx.serialization.SerialName -import kotlinx.serialization.Serializable -import kotlin.jvm.JvmName - - -@Serializable -sealed interface GiftInfo { - val ownedGiftId: GiftId? - val gift: Gift - - @Serializable - data class Regular( - @SerialName(giftField) - override val gift: Gift.Regular, - @SerialName(ownedGiftIdField) - override val ownedGiftId: GiftId? = null, - @SerialName(convertStarCountField) - val convertStarCount: Int? = null, - @SerialName(prepaidUpgradeStarCountField) - val prepaidUpgradeStarCount: Int? = null, - @SerialName(canBeUpgradedField) - val canBeUpgraded: Boolean = false, - @SerialName(textField) - val text: String? = null, - @SerialName(entitiesField) - val entities: RawMessageEntities = emptyList(), - @SerialName(isPrivateField) - val isPrivate: Boolean = false - ) : GiftInfo { - companion object { - @JvmName("PublicConstructor") - operator fun invoke( - gift: Gift.Regular, - ownedGiftId: GiftId? = null, - convertStarCount: Int? = null, - prepaidUpgradeStarCount: Int? = null, - canBeUpgraded: Boolean = false, - text: String? = null, - textSources: TextSourcesList = emptyList(), - position: Int, - isPrivate: Boolean = false - ) = Regular( - gift, - ownedGiftId, - convertStarCount, - prepaidUpgradeStarCount, - canBeUpgraded, - text, - textSources.toRawMessageEntities(position), - isPrivate - ) - } - } - - @Serializable - data class Unique( - @SerialName(giftField) - override val gift: Gift.Unique, - @SerialName(originField) - val origin: String? = null, - @SerialName(ownedGiftIdField) - override val ownedGiftId: GiftId? = null, - @SerialName(transferStarCountField) - val transferStarCount: Int? = null - ): GiftInfo -} diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived.kt new file mode 100644 index 0000000000..8ae20fae10 --- /dev/null +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/gifts/GiftSentOrReceived.kt @@ -0,0 +1,286 @@ +package dev.inmo.tgbotapi.types.gifts + +import dev.inmo.tgbotapi.abstracts.TextedInput +import dev.inmo.tgbotapi.types.* +import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.CommonEvent +import dev.inmo.tgbotapi.types.message.RawMessageEntities +import dev.inmo.tgbotapi.types.message.asTextSources +import dev.inmo.tgbotapi.types.message.textsources.TextSource +import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList +import dev.inmo.tgbotapi.types.message.toRawMessageEntities +import dev.inmo.tgbotapi.utils.internal.ClassCastsIncluded +import kotlinx.serialization.KSerializer +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable +import kotlinx.serialization.descriptors.SerialDescriptor +import kotlinx.serialization.encoding.Decoder +import kotlinx.serialization.encoding.Encoder +import kotlin.jvm.JvmName + + +/** + * Represent Telegram Bots API abstraction [GiftInfo](https://core.telegram.org/bots/api#giftinfo) and + * [UniqueGiftInfo](https://core.telegram.org/bots/api#uniquegiftinfo) + * + * @see ReceivedInBusinessAccount + * @see Regular.Common + * @see Regular.ReceivedInBusinessAccount + * @see Unique.Common + * @see Unique.ReceivedInBusinessAccount + */ +@Serializable +sealed interface GiftSentOrReceived : CommonEvent { + val ownedGiftId: GiftId? + val gift: Gift + + @Serializable + sealed interface ReceivedInBusinessAccount : GiftSentOrReceived { + override val ownedGiftId: GiftId + } + + @Serializable(Regular.Companion::class) + sealed interface Regular : GiftSentOrReceived, TextedInput { + override val gift: Gift.Regular + val convertStarCount: Int? + val prepaidUpgradeStarCount: Int? + val canBeUpgraded: Boolean + val isPrivate: Boolean + + @Serializable + data class Common( + @SerialName(giftField) + override val gift: Gift.Regular, + @SerialName(convertStarCountField) + override val convertStarCount: Int? = null, + @SerialName(prepaidUpgradeStarCountField) + override val prepaidUpgradeStarCount: Int? = null, + @SerialName(canBeUpgradedField) + override val canBeUpgraded: Boolean = false, + @SerialName(textField) + override val text: String? = null, + @SerialName(entitiesField) + private val entities: RawMessageEntities? = null, + @SerialName(isPrivateField) + override val isPrivate: Boolean = false + ) : Regular { + override val textSources: List by lazy { + entities ?.asTextSources(text ?: return@lazy emptyList()) ?: emptyList() + } + override val ownedGiftId: GiftId? + get() = null + } + + @Serializable + data class ReceivedInBusinessAccount( + @SerialName(giftField) + override val gift: Gift.Regular, + @SerialName(ownedGiftIdField) + override val ownedGiftId: GiftId, + @SerialName(convertStarCountField) + override val convertStarCount: Int? = null, + @SerialName(prepaidUpgradeStarCountField) + override val prepaidUpgradeStarCount: Int? = null, + @SerialName(canBeUpgradedField) + override val canBeUpgraded: Boolean = false, + @SerialName(textField) + override val text: String? = null, + @SerialName(entitiesField) + private val entities: RawMessageEntities? = null, + @SerialName(isPrivateField) + override val isPrivate: Boolean = false + ) : Regular, GiftSentOrReceived.ReceivedInBusinessAccount { + override val textSources: List by lazy { + entities ?.asTextSources(text ?: return@lazy emptyList()) ?: emptyList() + } + } + + companion object : KSerializer { + @Serializable + private data class Surrogate( + @SerialName(giftField) + val gift: Gift.Regular, + @SerialName(ownedGiftIdField) + val ownedGiftId: GiftId? = null, + @SerialName(convertStarCountField) + val convertStarCount: Int? = null, + @SerialName(prepaidUpgradeStarCountField) + val prepaidUpgradeStarCount: Int? = null, + @SerialName(canBeUpgradedField) + val canBeUpgraded: Boolean = false, + @SerialName(textField) + val text: String? = null, + @SerialName(entitiesField) + val entities: RawMessageEntities? = null, + @SerialName(isPrivateField) + val isPrivate: Boolean = false + ) + + override val descriptor: SerialDescriptor + get() = Surrogate.serializer().descriptor + + override fun serialize(encoder: Encoder, value: Regular) { + when (value) { + is Common -> Common.serializer().serialize(encoder, value) + is ReceivedInBusinessAccount -> ReceivedInBusinessAccount.serializer().serialize(encoder, value) + } + } + + override fun deserialize(decoder: Decoder): Regular { + val surrogate = Surrogate.serializer().deserialize(decoder) + + return when { + surrogate.ownedGiftId == null -> { + Common( + gift = surrogate.gift, + convertStarCount = surrogate.convertStarCount, + prepaidUpgradeStarCount = surrogate.prepaidUpgradeStarCount, + canBeUpgraded = surrogate.canBeUpgraded, + text = surrogate.text, + entities = surrogate.entities, + isPrivate = surrogate.isPrivate + ) + } + else -> { + ReceivedInBusinessAccount( + gift = surrogate.gift, + ownedGiftId = surrogate.ownedGiftId, + convertStarCount = surrogate.convertStarCount, + prepaidUpgradeStarCount = surrogate.prepaidUpgradeStarCount, + canBeUpgraded = surrogate.canBeUpgraded, + text = surrogate.text, + entities = surrogate.entities, + isPrivate = surrogate.isPrivate + ) + } + } + } + @JvmName("PublicConstructor") + operator fun invoke( + gift: Gift.Regular, + ownedGiftId: GiftId? = null, + convertStarCount: Int? = null, + prepaidUpgradeStarCount: Int? = null, + canBeUpgraded: Boolean = false, + text: String? = null, + textSources: TextSourcesList = emptyList(), + position: Int, + isPrivate: Boolean = false + ) = ownedGiftId ?.let { + ReceivedInBusinessAccount( + gift, + ownedGiftId, + convertStarCount, + prepaidUpgradeStarCount, + canBeUpgraded, + text, + textSources.toRawMessageEntities(position), + isPrivate + ) + } ?: Common( + gift, + convertStarCount, + prepaidUpgradeStarCount, + canBeUpgraded, + text, + textSources.toRawMessageEntities(position), + isPrivate + ) + } + } + + @Serializable(Unique.Companion::class) + sealed interface Unique : GiftSentOrReceived { + override val gift: Gift.Unique + val origin: String? + val transferStarCount: Int? + + @Serializable + data class Common( + @SerialName(giftField) + override val gift: Gift.Unique, + @SerialName(originField) + override val origin: String? = null, + @SerialName(transferStarCountField) + override val transferStarCount: Int? = null + ) : Unique { + override val ownedGiftId: GiftId? + get() = null + } + + @Serializable + data class ReceivedInBusinessAccount( + @SerialName(giftField) + override val gift: Gift.Unique, + @SerialName(ownedGiftIdField) + override val ownedGiftId: GiftId, + @SerialName(originField) + override val origin: String? = null, + @SerialName(transferStarCountField) + override val transferStarCount: Int? = null + ) : Unique, GiftSentOrReceived.ReceivedInBusinessAccount + + companion object : KSerializer { + @Serializable + private data class Surrogate( + @SerialName(giftField) + val gift: Gift.Unique, + @SerialName(ownedGiftIdField) + val ownedGiftId: GiftId? = null, + @SerialName(originField) + val origin: String? = null, + @SerialName(transferStarCountField) + val transferStarCount: Int? = null + ) + + override val descriptor: SerialDescriptor + get() = Surrogate.serializer().descriptor + + override fun serialize(encoder: Encoder, value: Unique) { + when (value) { + is Common -> Common.serializer().serialize(encoder, value) + is ReceivedInBusinessAccount -> ReceivedInBusinessAccount.serializer().serialize(encoder, value) + } + } + + override fun deserialize(decoder: Decoder): Unique { + val surrogate = Surrogate.serializer().deserialize(decoder) + + return when { + surrogate.ownedGiftId == null -> { + Common( + gift = surrogate.gift, + origin = surrogate.origin, + transferStarCount = surrogate.transferStarCount + ) + } + else -> { + ReceivedInBusinessAccount( + gift = surrogate.gift, + ownedGiftId = surrogate.ownedGiftId, + origin = surrogate.origin, + transferStarCount = surrogate.transferStarCount + ) + } + } + } + @JvmName("PublicConstructor") + operator fun invoke( + gift: Gift.Unique, + origin: String? = null, + ownedGiftId: GiftId? = null, + transferStarCount: Int? = null + ) = ownedGiftId ?.let { + ReceivedInBusinessAccount( + gift, + ownedGiftId, + origin, + transferStarCount, + ) + } ?: Common( + gift, + origin, + transferStarCount, + ) + } + } +} diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ForwardInfo.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ForwardInfo.kt index 287cc2b757..7f8aee8848 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ForwardInfo.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/ForwardInfo.kt @@ -20,6 +20,7 @@ sealed interface ForwardInfo { override val from: User ) : ForwardInfo, FromUser + @ClassCastsIncluded.ExcludeSubName sealed interface PublicChat : ForwardInfo { val chat: dev.inmo.tgbotapi.types.chat.PublicChat diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/RawMessage.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/RawMessage.kt index fa09324f73..41492d95fc 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/RawMessage.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/message/RawMessage.kt @@ -10,7 +10,7 @@ import dev.inmo.tgbotapi.types.dice.Dice import dev.inmo.tgbotapi.types.files.* import dev.inmo.tgbotapi.types.files.Sticker import dev.inmo.tgbotapi.types.games.RawGame -import dev.inmo.tgbotapi.types.gifts.GiftInfo +import dev.inmo.tgbotapi.types.gifts.GiftSentOrReceived import dev.inmo.tgbotapi.types.giveaway.* import dev.inmo.tgbotapi.types.message.content.GiveawayContent import dev.inmo.tgbotapi.types.location.Location @@ -166,7 +166,8 @@ internal data class RawMessage( private val giveaway_completed: GiveawayPrivateResults? = null, // Gifts - private val gift: GiftInfo? = null, + private val gift: GiftSentOrReceived.Regular? = null, + private val unique_gift: GiftSentOrReceived.Unique? = null, ) { private val checkedFrom = from ?.takeIf { !it.isFakeTelegramUser() } private val content: MessageContent? by lazy { @@ -290,6 +291,8 @@ internal data class RawMessage( boost_added != null -> boost_added chat_background_set != null -> chat_background_set paid_message_price_changed != null -> paid_message_price_changed + gift != null -> gift + unique_gift != null -> unique_gift else -> null } } diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/utils/DeserializeWithUnknown.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/utils/DeserializeWithUnknown.kt index 0cd36caee6..c092fa45c6 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/utils/DeserializeWithUnknown.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/utils/DeserializeWithUnknown.kt @@ -1,5 +1,8 @@ package dev.inmo.tgbotapi.utils +import dev.inmo.micro_utils.common.Either +import dev.inmo.micro_utils.common.EitherFirst +import dev.inmo.micro_utils.common.EitherSecond import kotlinx.serialization.KSerializer import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.json.JsonDecoder @@ -13,3 +16,18 @@ fun Decoder.deserializeWithRaw(serializer: KSerializer): Pair Decoder.deserializeEitherWithRaw(serializer: KSerializer): Either, Pair> { + return if (this is JsonDecoder) { + val json = decodeJsonElement() + EitherFirst( + runCatching { + this.json.decodeFromJsonElement(serializer, json) + }.getOrNull() to json + ) + } else { + EitherSecond( + serializer.deserialize(this) to null + ) + } +} diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/utils/internal/ClassCastsIncluded.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/utils/internal/ClassCastsIncluded.kt index b3b184352e..7076600c59 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/utils/internal/ClassCastsIncluded.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/utils/internal/ClassCastsIncluded.kt @@ -5,7 +5,12 @@ import dev.inmo.tgbotapi.utils.RiskFeature @Target(AnnotationTarget.CLASS) @Retention(AnnotationRetention.SOURCE) @RiskFeature("It is internal API in tgbotapi.core and should not be used outside") -annotation class ClassCastsIncluded(val typesRegex: String = "", val excludeRegex: String = "") +annotation class ClassCastsIncluded(val typesRegex: String = "", val excludeRegex: String = "") { + @Target(AnnotationTarget.CLASS) + @Retention(AnnotationRetention.SOURCE) + @RiskFeature("It is internal API in tgbotapi.core and should not be used outside") + annotation class ExcludeSubName +} @Target(AnnotationTarget.CLASS) @Retention(AnnotationRetention.SOURCE) diff --git a/tgbotapi.ksp/build.gradle b/tgbotapi.ksp/build.gradle index bcf67a0160..ee4533a497 100644 --- a/tgbotapi.ksp/build.gradle +++ b/tgbotapi.ksp/build.gradle @@ -9,5 +9,6 @@ repositories { dependencies { implementation libs.kotlin.poet implementation libs.ksp + implementation libs.microutils.ksp.generator implementation project(":tgbotapi.core") } diff --git a/tgbotapi.ksp/src/main/kotlin/ClassCastsFiller.kt b/tgbotapi.ksp/src/main/kotlin/ClassCastsFiller.kt index 6ff48ffec5..ddceb473df 100644 --- a/tgbotapi.ksp/src/main/kotlin/ClassCastsFiller.kt +++ b/tgbotapi.ksp/src/main/kotlin/ClassCastsFiller.kt @@ -1,9 +1,13 @@ package dev.inmo.tgbotapi.ksp.processor +import com.google.devtools.ksp.KspExperimental +import com.google.devtools.ksp.getAnnotationsByType +import com.google.devtools.ksp.isAnnotationPresent import com.google.devtools.ksp.symbol.* import com.squareup.kotlinpoet.* import com.squareup.kotlinpoet.ParameterizedTypeName.Companion.parameterizedBy import com.squareup.kotlinpoet.ksp.* +import dev.inmo.tgbotapi.utils.internal.ClassCastsIncluded private fun FileSpec.Builder.addTopLevelImport(className: ClassName) { className.topLevelClassName().let { @@ -27,6 +31,24 @@ private fun FileSpec.Builder.createTypeDefinition(ksClassDeclaration: KSClassDec } } +@OptIn(KspExperimental::class) +private fun KSClassDeclaration.buildPrefix(sourceDeclaration: KSClassDeclaration): String { + val ownName = if (isAnnotationPresent(ClassCastsIncluded.ExcludeSubName::class)) { + "" + } else { + simpleName.asString() + } + when (val parentDeclaration = parentDeclaration) { + is KSClassDeclaration -> if (parentDeclaration === sourceDeclaration) { + return ownName + } else { + return "${parentDeclaration.buildPrefix(sourceDeclaration)}$ownName" + } + } + return ownName +} + +@OptIn(KspExperimental::class) fun FileSpec.Builder.fill( sourceKSClassDeclaration: KSClassDeclaration, subtypesMap: Map>, @@ -40,8 +62,10 @@ fun FileSpec.Builder.fill( val sourceClassName = sourceKSClassDeclaration.toClassName() val targetClassClassName = targetClassDeclaration.toClassName() val targetClassTypeDefinition = createTypeDefinition(targetClassDeclaration) - val simpleName = targetClassDeclaration.simpleName.asString() - val withFirstLowerCase = simpleName.replaceFirstChar { it.lowercase() } +// val simpleName = targetClassDeclaration.simpleName.asString() +// val additionalPrefix = targetClassDeclaration.buildPrefix() + val resultPrefix = targetClassDeclaration.buildPrefix(sourceKSClassDeclaration) + val withFirstLowerCase = resultPrefix.replaceFirstChar { it.lowercase() } val castedOrNullName = "${withFirstLowerCase}OrNull" addTopLevelImport(targetClassClassName) @@ -68,7 +92,7 @@ fun FileSpec.Builder.fill( }.build() ) addFunction( - FunSpec.builder("if$simpleName").apply { + FunSpec.builder("if$resultPrefix").apply { val genericType = TypeVariableName("T", null) addTypeVariable(genericType) receiver(sourceClassName) diff --git a/tgbotapi.ksp/src/main/kotlin/TelegramBotAPISymbolProcessor.kt b/tgbotapi.ksp/src/main/kotlin/TelegramBotAPISymbolProcessor.kt index f6c5e3a9d7..190aa962db 100644 --- a/tgbotapi.ksp/src/main/kotlin/TelegramBotAPISymbolProcessor.kt +++ b/tgbotapi.ksp/src/main/kotlin/TelegramBotAPISymbolProcessor.kt @@ -1,22 +1,21 @@ package dev.inmo.tgbotapi.ksp.processor -import com.google.devtools.ksp.KspExperimental -import com.google.devtools.ksp.getAllSuperTypes -import com.google.devtools.ksp.getAnnotationsByType -import com.google.devtools.ksp.isAnnotationPresent +import com.google.devtools.ksp.* import com.google.devtools.ksp.processing.* -import com.google.devtools.ksp.symbol.KSAnnotated -import com.google.devtools.ksp.symbol.KSClassDeclaration +import com.google.devtools.ksp.symbol.* import com.squareup.kotlinpoet.AnnotationSpec -import com.squareup.kotlinpoet.ClassName import com.squareup.kotlinpoet.FileSpec import com.squareup.kotlinpoet.asClassName -import com.squareup.kotlinpoet.ksp.toClassName import com.squareup.kotlinpoet.ksp.writeTo +import dev.inmo.micro_ksp.generator.resolveSubclasses +import dev.inmo.tgbotapi.types.message.ChatEvents.abstracts.ChatEvent import dev.inmo.tgbotapi.utils.RiskFeature import dev.inmo.tgbotapi.utils.internal.ClassCastsExcluded import dev.inmo.tgbotapi.utils.internal.ClassCastsIncluded import java.io.File +import java.io.InputStream +import java.io.OutputStreamWriter +import java.io.StringWriter class TelegramBotAPISymbolProcessor( private val codeGenerator: CodeGenerator, @@ -37,25 +36,38 @@ class TelegramBotAPISymbolProcessor( val classesSubtypes = mutableMapOf>() resolver.getAllFiles().forEach { - it.declarations.forEach { potentialSubtype -> - if ( - potentialSubtype is KSClassDeclaration - && potentialSubtype.isAnnotationPresent(ClassCastsExcluded::class).not() - ) { - val allSupertypes = potentialSubtype.getAllSuperTypes().map { it.declaration } + val declarationsToAnalyze = mutableSetOf() + declarationsToAnalyze.addAll(it.declarations) + val analyzed = mutableSetOf() - for (currentClass in classes) { - val regexes = classesRegexes[currentClass] - val simpleName = potentialSubtype.simpleName.getShortName() - when { - currentClass !in allSupertypes - || regexes ?.first ?.matches(simpleName) == false - || regexes ?.second ?.matches(simpleName) == true -> continue - else -> { - classesSubtypes.getOrPut(currentClass) { mutableSetOf() }.add(potentialSubtype) + while (declarationsToAnalyze.isNotEmpty()) { + val potentialSubtype = declarationsToAnalyze.first() + declarationsToAnalyze.remove(potentialSubtype) + if (analyzed.add(potentialSubtype)) { + if ( + potentialSubtype is KSClassDeclaration + && potentialSubtype.isAnnotationPresent(ClassCastsExcluded::class).not() + ) { + val allSupertypes = potentialSubtype.getAllSuperTypes().map { it.declaration } + + for (currentClass in classes) { + val regexes = classesRegexes[currentClass] + val simpleName = potentialSubtype.simpleName.getShortName() + when { + currentClass !in allSupertypes + || regexes ?.first ?.matches(simpleName) == false + || regexes ?.second ?.matches(simpleName) == true -> continue + else -> { + classesSubtypes.getOrPut(currentClass) { mutableSetOf() }.add(potentialSubtype) + } } } } + when (potentialSubtype) { + is KSFile -> declarationsToAnalyze.addAll(potentialSubtype.declarations) + is KSClassDeclaration ->declarationsToAnalyze.addAll(potentialSubtype.declarations) + is KSFunctionDeclaration -> declarationsToAnalyze.addAll(potentialSubtype.declarations) + } } } } @@ -98,15 +110,21 @@ class TelegramBotAPISymbolProcessor( ) } }.build() - runCatching { - outputFolder ?.also { - File(it).apply { - delete() - runCatching { mkdirs() } - fileSpec.writeTo(this) + + outputFolder ?.also { + File(it, outputFile).apply { + val text = StringWriter().use { + fileSpec.writeTo(it) + it.toString() } - } ?: fileSpec.writeTo(codeGenerator, false) - } + if (exists() == false || readText() != text) { + delete() + runCatching { parentFile.mkdirs() } + createNewFile() + writeText(text) + } + } + } ?: fileSpec.writeTo(codeGenerator, false) return emptyList() } diff --git a/tgbotapi.utils/api/tgbotapi.utils.api b/tgbotapi.utils/api/tgbotapi.utils.api index 359166e3f1..6535860e00 100644 --- a/tgbotapi.utils/api/tgbotapi.utils.api +++ b/tgbotapi.utils/api/tgbotapi.utils.api @@ -1447,6 +1447,8 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt { public static final fun generalForumTopicUnhiddenOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/message/ChatEvents/forum/GeneralForumTopicUnhidden; public static final fun giftCodeOrNull (Ldev/inmo/tgbotapi/types/boosts/ChatBoostSource;)Ldev/inmo/tgbotapi/types/boosts/ChatBoostSource$GiftCode; public static final fun giftCodeOrThrow (Ldev/inmo/tgbotapi/types/boosts/ChatBoostSource;)Ldev/inmo/tgbotapi/types/boosts/ChatBoostSource$GiftCode; + public static final fun giftSentOrReceivedOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived; + public static final fun giftSentOrReceivedOrThrow (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/gifts/GiftSentOrReceived; public static final fun giveawayContentOrNull (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;)Ldev/inmo/tgbotapi/types/message/content/GiveawayContent; public static final fun giveawayContentOrThrow (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;)Ldev/inmo/tgbotapi/types/message/content/GiveawayContent; public static final fun giveawayCreatedOrNull (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;)Ldev/inmo/tgbotapi/types/giveaway/GiveawayCreated; @@ -1676,6 +1678,7 @@ public final class dev/inmo/tgbotapi/extensions/utils/ClassCastsNewKt { public static final fun ifGeneralForumTopicHidden (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifGeneralForumTopicUnhidden (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifGiftCode (Ldev/inmo/tgbotapi/types/boosts/ChatBoostSource;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; + public static final fun ifGiftSentOrReceived (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifGiveaway (Ldev/inmo/tgbotapi/types/boosts/ChatBoostSource;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifGiveawayContent (Ldev/inmo/tgbotapi/types/message/content/ResendableContent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; public static final fun ifGiveawayCreated (Ldev/inmo/tgbotapi/types/message/ChatEvents/abstracts/ChatEvent;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object; diff --git a/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/ClassCastsNew.kt b/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/ClassCastsNew.kt index 7b832805a4..e613cccdb6 100644 --- a/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/ClassCastsNew.kt +++ b/tgbotapi.utils/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/utils/ClassCastsNew.kt @@ -216,6 +216,7 @@ import dev.inmo.tgbotapi.types.files.VideoFile import dev.inmo.tgbotapi.types.files.VideoNoteFile import dev.inmo.tgbotapi.types.files.VideoSticker import dev.inmo.tgbotapi.types.files.VoiceFile +import dev.inmo.tgbotapi.types.gifts.GiftSentOrReceived import dev.inmo.tgbotapi.types.giveaway.GiveawayCreated import dev.inmo.tgbotapi.types.giveaway.GiveawayPrivateResults import dev.inmo.tgbotapi.types.location.LiveLocation @@ -827,6 +828,15 @@ public inline fun OptionallyWithUser.ifCommonSupergroupEventMessage(block: (CommonSupergroupEventMessage) -> T): T? = commonSupergroupEventMessageOrNull() ?.let(block) +public inline fun OptionallyWithUser.forwardInfoByUserOrNull(): ForwardInfo.ByUser? = this as? + dev.inmo.tgbotapi.types.message.ForwardInfo.ByUser + +public inline fun OptionallyWithUser.forwardInfoByUserOrThrow(): ForwardInfo.ByUser = this as + dev.inmo.tgbotapi.types.message.ForwardInfo.ByUser + +public inline fun OptionallyWithUser.ifForwardInfoByUser(block: (ForwardInfo.ByUser) -> T): T? = + forwardInfoByUserOrNull() ?.let(block) + public inline fun OptionallyWithUser.passportMessageOrNull(): PassportMessage? = this as? dev.inmo.tgbotapi.types.message.PassportMessage @@ -975,6 +985,24 @@ public inline fun OptionallyWithUser.pollAnswerOrThrow(): PollAnswer = this as public inline fun OptionallyWithUser.ifPollAnswer(block: (PollAnswer) -> T): T? = pollAnswerOrNull() ?.let(block) +public inline fun OptionallyWithUser.pollAnswerPublicOrNull(): PollAnswer.Public? = this as? + dev.inmo.tgbotapi.types.polls.PollAnswer.Public + +public inline fun OptionallyWithUser.pollAnswerPublicOrThrow(): PollAnswer.Public = this as + dev.inmo.tgbotapi.types.polls.PollAnswer.Public + +public inline fun OptionallyWithUser.ifPollAnswerPublic(block: (PollAnswer.Public) -> T): T? = + pollAnswerPublicOrNull() ?.let(block) + +public inline fun OptionallyWithUser.pollAnswerAnonymousOrNull(): PollAnswer.Anonymous? = this as? + dev.inmo.tgbotapi.types.polls.PollAnswer.Anonymous + +public inline fun OptionallyWithUser.pollAnswerAnonymousOrThrow(): PollAnswer.Anonymous = this as + dev.inmo.tgbotapi.types.polls.PollAnswer.Anonymous + +public inline fun OptionallyWithUser.ifPollAnswerAnonymous(block: (PollAnswer.Anonymous) -> T): + T? = pollAnswerAnonymousOrNull() ?.let(block) + public inline fun OptionallyWithUser.abstractMessageCallbackQueryOrNull(): AbstractMessageCallbackQuery? = this as? dev.inmo.tgbotapi.types.queries.callback.AbstractMessageCallbackQuery @@ -1128,6 +1156,16 @@ public inline fun OptionallyWithUser.ifMessageGameShortNameCallbackQuery(block: (MessageGameShortNameCallbackQuery) -> T): T? = messageGameShortNameCallbackQueryOrNull() ?.let(block) +public inline fun InlineQueryResultsButton.webAppOrNull(): InlineQueryResultsButton.WebApp? = this + as? dev.inmo.tgbotapi.requests.answers.InlineQueryResultsButton.WebApp + +public inline fun InlineQueryResultsButton.webAppOrThrow(): InlineQueryResultsButton.WebApp = this + as dev.inmo.tgbotapi.requests.answers.InlineQueryResultsButton.WebApp + +public inline fun + InlineQueryResultsButton.ifWebApp(block: (InlineQueryResultsButton.WebApp) -> T): T? = + webAppOrNull() ?.let(block) + public inline fun InlineQueryResultsButton.startOrNull(): InlineQueryResultsButton.Start? = this as? dev.inmo.tgbotapi.requests.answers.InlineQueryResultsButton.Start @@ -1148,16 +1186,6 @@ public inline fun InlineQueryResultsButton.ifUnknown(block: (InlineQueryResultsButton.Unknown) -> T): T? = unknownOrNull() ?.let(block) -public inline fun InlineQueryResultsButton.webAppOrNull(): InlineQueryResultsButton.WebApp? = this - as? dev.inmo.tgbotapi.requests.answers.InlineQueryResultsButton.WebApp - -public inline fun InlineQueryResultsButton.webAppOrThrow(): InlineQueryResultsButton.WebApp = this - as dev.inmo.tgbotapi.requests.answers.InlineQueryResultsButton.WebApp - -public inline fun - InlineQueryResultsButton.ifWebApp(block: (InlineQueryResultsButton.WebApp) -> T): T? = - webAppOrNull() ?.let(block) - public inline fun InputSticker.maskOrNull(): InputSticker.Mask? = this as? dev.inmo.tgbotapi.requests.stickers.InputSticker.Mask @@ -1176,24 +1204,45 @@ public inline fun InputSticker.withKeywordsOrThrow(): InputSticker.WithKeywords public inline fun InputSticker.ifWithKeywords(block: (InputSticker.WithKeywords) -> T): T? = withKeywordsOrNull() ?.let(block) -public inline fun InputSticker.customEmojiOrNull(): InputSticker.WithKeywords.CustomEmoji? = this - as? dev.inmo.tgbotapi.requests.stickers.InputSticker.WithKeywords.CustomEmoji +public inline fun InputSticker.withKeywordsRegularOrNull(): InputSticker.WithKeywords.Regular? = + this as? dev.inmo.tgbotapi.requests.stickers.InputSticker.WithKeywords.Regular -public inline fun InputSticker.customEmojiOrThrow(): InputSticker.WithKeywords.CustomEmoji = this as +public inline fun InputSticker.withKeywordsRegularOrThrow(): InputSticker.WithKeywords.Regular = + this as dev.inmo.tgbotapi.requests.stickers.InputSticker.WithKeywords.Regular + +public inline fun + InputSticker.ifWithKeywordsRegular(block: (InputSticker.WithKeywords.Regular) -> T): T? = + withKeywordsRegularOrNull() ?.let(block) + +public inline fun InputSticker.withKeywordsCustomEmojiOrNull(): + InputSticker.WithKeywords.CustomEmoji? = this as? + dev.inmo.tgbotapi.requests.stickers.InputSticker.WithKeywords.CustomEmoji + +public inline fun InputSticker.withKeywordsCustomEmojiOrThrow(): + InputSticker.WithKeywords.CustomEmoji = this as dev.inmo.tgbotapi.requests.stickers.InputSticker.WithKeywords.CustomEmoji public inline fun - InputSticker.ifCustomEmoji(block: (InputSticker.WithKeywords.CustomEmoji) -> T): T? = - customEmojiOrNull() ?.let(block) + InputSticker.ifWithKeywordsCustomEmoji(block: (InputSticker.WithKeywords.CustomEmoji) -> T): T? + = withKeywordsCustomEmojiOrNull() ?.let(block) -public inline fun InputSticker.regularOrNull(): InputSticker.WithKeywords.Regular? = this as? - dev.inmo.tgbotapi.requests.stickers.InputSticker.WithKeywords.Regular +public inline fun BackgroundFill.solidOrNull(): BackgroundFill.Solid? = this as? + dev.inmo.tgbotapi.types.BackgroundFill.Solid -public inline fun InputSticker.regularOrThrow(): InputSticker.WithKeywords.Regular = this as - dev.inmo.tgbotapi.requests.stickers.InputSticker.WithKeywords.Regular +public inline fun BackgroundFill.solidOrThrow(): BackgroundFill.Solid = this as + dev.inmo.tgbotapi.types.BackgroundFill.Solid -public inline fun InputSticker.ifRegular(block: (InputSticker.WithKeywords.Regular) -> T): T? = - regularOrNull() ?.let(block) +public inline fun BackgroundFill.ifSolid(block: (BackgroundFill.Solid) -> T): T? = solidOrNull() + ?.let(block) + +public inline fun BackgroundFill.gradientOrNull(): BackgroundFill.Gradient? = this as? + dev.inmo.tgbotapi.types.BackgroundFill.Gradient + +public inline fun BackgroundFill.gradientOrThrow(): BackgroundFill.Gradient = this as + dev.inmo.tgbotapi.types.BackgroundFill.Gradient + +public inline fun BackgroundFill.ifGradient(block: (BackgroundFill.Gradient) -> T): T? = + gradientOrNull() ?.let(block) public inline fun BackgroundFill.freeformGradientOrNull(): BackgroundFill.FreeformGradient? = this as? dev.inmo.tgbotapi.types.BackgroundFill.FreeformGradient @@ -1205,24 +1254,6 @@ public inline fun BackgroundFill.ifFreeformGradient(block: (BackgroundFill.FreeformGradient) -> T): T? = freeformGradientOrNull() ?.let(block) -public inline fun BackgroundFill.gradientOrNull(): BackgroundFill.Gradient? = this as? - dev.inmo.tgbotapi.types.BackgroundFill.Gradient - -public inline fun BackgroundFill.gradientOrThrow(): BackgroundFill.Gradient = this as - dev.inmo.tgbotapi.types.BackgroundFill.Gradient - -public inline fun BackgroundFill.ifGradient(block: (BackgroundFill.Gradient) -> T): T? = - gradientOrNull() ?.let(block) - -public inline fun BackgroundFill.solidOrNull(): BackgroundFill.Solid? = this as? - dev.inmo.tgbotapi.types.BackgroundFill.Solid - -public inline fun BackgroundFill.solidOrThrow(): BackgroundFill.Solid = this as - dev.inmo.tgbotapi.types.BackgroundFill.Solid - -public inline fun BackgroundFill.ifSolid(block: (BackgroundFill.Solid) -> T): T? = solidOrNull() - ?.let(block) - public inline fun BackgroundFill.unknownOrNull(): BackgroundFill.Unknown? = this as? dev.inmo.tgbotapi.types.BackgroundFill.Unknown @@ -1232,14 +1263,14 @@ public inline fun BackgroundFill.unknownOrThrow(): BackgroundFill.Unknown = this public inline fun BackgroundFill.ifUnknown(block: (BackgroundFill.Unknown) -> T): T? = unknownOrNull() ?.let(block) -public inline fun BackgroundType.chatThemeOrNull(): BackgroundType.ChatTheme? = this as? - dev.inmo.tgbotapi.types.BackgroundType.ChatTheme +public inline fun BackgroundType.movableOrNull(): BackgroundType.Movable? = this as? + dev.inmo.tgbotapi.types.BackgroundType.Movable -public inline fun BackgroundType.chatThemeOrThrow(): BackgroundType.ChatTheme = this as - dev.inmo.tgbotapi.types.BackgroundType.ChatTheme +public inline fun BackgroundType.movableOrThrow(): BackgroundType.Movable = this as + dev.inmo.tgbotapi.types.BackgroundType.Movable -public inline fun BackgroundType.ifChatTheme(block: (BackgroundType.ChatTheme) -> T): T? = - chatThemeOrNull() ?.let(block) +public inline fun BackgroundType.ifMovable(block: (BackgroundType.Movable) -> T): T? = + movableOrNull() ?.let(block) public inline fun BackgroundType.dimmableOrNull(): BackgroundType.Dimmable? = this as? dev.inmo.tgbotapi.types.BackgroundType.Dimmable @@ -1250,6 +1281,24 @@ public inline fun BackgroundType.dimmableOrThrow(): BackgroundType.Dimmable = th public inline fun BackgroundType.ifDimmable(block: (BackgroundType.Dimmable) -> T): T? = dimmableOrNull() ?.let(block) +public inline fun BackgroundType.fillableOrNull(): BackgroundType.Fillable? = this as? + dev.inmo.tgbotapi.types.BackgroundType.Fillable + +public inline fun BackgroundType.fillableOrThrow(): BackgroundType.Fillable = this as + dev.inmo.tgbotapi.types.BackgroundType.Fillable + +public inline fun BackgroundType.ifFillable(block: (BackgroundType.Fillable) -> T): T? = + fillableOrNull() ?.let(block) + +public inline fun BackgroundType.withDocumentOrNull(): BackgroundType.WithDocument? = this as? + dev.inmo.tgbotapi.types.BackgroundType.WithDocument + +public inline fun BackgroundType.withDocumentOrThrow(): BackgroundType.WithDocument = this as + dev.inmo.tgbotapi.types.BackgroundType.WithDocument + +public inline fun BackgroundType.ifWithDocument(block: (BackgroundType.WithDocument) -> T): T? = + withDocumentOrNull() ?.let(block) + public inline fun BackgroundType.fillOrNull(): BackgroundType.Fill? = this as? dev.inmo.tgbotapi.types.BackgroundType.Fill @@ -1268,15 +1317,6 @@ public inline fun BackgroundType.wallpaperOrThrow(): BackgroundType.Wallpaper = public inline fun BackgroundType.ifWallpaper(block: (BackgroundType.Wallpaper) -> T): T? = wallpaperOrNull() ?.let(block) -public inline fun BackgroundType.fillableOrNull(): BackgroundType.Fillable? = this as? - dev.inmo.tgbotapi.types.BackgroundType.Fillable - -public inline fun BackgroundType.fillableOrThrow(): BackgroundType.Fillable = this as - dev.inmo.tgbotapi.types.BackgroundType.Fillable - -public inline fun BackgroundType.ifFillable(block: (BackgroundType.Fillable) -> T): T? = - fillableOrNull() ?.let(block) - public inline fun BackgroundType.patternOrNull(): BackgroundType.Pattern? = this as? dev.inmo.tgbotapi.types.BackgroundType.Pattern @@ -1286,14 +1326,14 @@ public inline fun BackgroundType.patternOrThrow(): BackgroundType.Pattern = this public inline fun BackgroundType.ifPattern(block: (BackgroundType.Pattern) -> T): T? = patternOrNull() ?.let(block) -public inline fun BackgroundType.movableOrNull(): BackgroundType.Movable? = this as? - dev.inmo.tgbotapi.types.BackgroundType.Movable +public inline fun BackgroundType.chatThemeOrNull(): BackgroundType.ChatTheme? = this as? + dev.inmo.tgbotapi.types.BackgroundType.ChatTheme -public inline fun BackgroundType.movableOrThrow(): BackgroundType.Movable = this as - dev.inmo.tgbotapi.types.BackgroundType.Movable +public inline fun BackgroundType.chatThemeOrThrow(): BackgroundType.ChatTheme = this as + dev.inmo.tgbotapi.types.BackgroundType.ChatTheme -public inline fun BackgroundType.ifMovable(block: (BackgroundType.Movable) -> T): T? = - movableOrNull() ?.let(block) +public inline fun BackgroundType.ifChatTheme(block: (BackgroundType.ChatTheme) -> T): T? = + chatThemeOrNull() ?.let(block) public inline fun BackgroundType.unknownOrNull(): BackgroundType.Unknown? = this as? dev.inmo.tgbotapi.types.BackgroundType.Unknown @@ -1304,15 +1344,6 @@ public inline fun BackgroundType.unknownOrThrow(): BackgroundType.Unknown = this public inline fun BackgroundType.ifUnknown(block: (BackgroundType.Unknown) -> T): T? = unknownOrNull() ?.let(block) -public inline fun BackgroundType.withDocumentOrNull(): BackgroundType.WithDocument? = this as? - dev.inmo.tgbotapi.types.BackgroundType.WithDocument - -public inline fun BackgroundType.withDocumentOrThrow(): BackgroundType.WithDocument = this as - dev.inmo.tgbotapi.types.BackgroundType.WithDocument - -public inline fun BackgroundType.ifWithDocument(block: (BackgroundType.WithDocument) -> T): T? = - withDocumentOrNull() ?.let(block) - public inline fun ChatIdentifier.idChatIdentifierOrNull(): IdChatIdentifier? = this as? dev.inmo.tgbotapi.types.IdChatIdentifier @@ -1846,51 +1877,6 @@ public inline fun InputMessageContent.ifInputVenueMessageContent(block: (InputVenueMessageContent) -> T): T? = inputVenueMessageContentOrNull() ?.let(block) -public inline fun ReplyInfo.externalOrNull(): ReplyInfo.External? = this as? - dev.inmo.tgbotapi.types.ReplyInfo.External - -public inline fun ReplyInfo.externalOrThrow(): ReplyInfo.External = this as - dev.inmo.tgbotapi.types.ReplyInfo.External - -public inline fun ReplyInfo.ifExternal(block: (ReplyInfo.External) -> T): T? = externalOrNull() - ?.let(block) - -public inline fun ReplyInfo.contentOrNull(): ReplyInfo.External.Content? = this as? - dev.inmo.tgbotapi.types.ReplyInfo.External.Content - -public inline fun ReplyInfo.contentOrThrow(): ReplyInfo.External.Content = this as - dev.inmo.tgbotapi.types.ReplyInfo.External.Content - -public inline fun ReplyInfo.ifContent(block: (ReplyInfo.External.Content) -> T): T? = - contentOrNull() ?.let(block) - -public inline fun ReplyInfo.mediaOrNull(): ReplyInfo.External.Content.Media? = this as? - dev.inmo.tgbotapi.types.ReplyInfo.External.Content.Media - -public inline fun ReplyInfo.mediaOrThrow(): ReplyInfo.External.Content.Media = this as - dev.inmo.tgbotapi.types.ReplyInfo.External.Content.Media - -public inline fun ReplyInfo.ifMedia(block: (ReplyInfo.External.Content.Media) -> T): T? = - mediaOrNull() ?.let(block) - -public inline fun ReplyInfo.simpleOrNull(): ReplyInfo.External.Content.Simple? = this as? - dev.inmo.tgbotapi.types.ReplyInfo.External.Content.Simple - -public inline fun ReplyInfo.simpleOrThrow(): ReplyInfo.External.Content.Simple = this as - dev.inmo.tgbotapi.types.ReplyInfo.External.Content.Simple - -public inline fun ReplyInfo.ifSimple(block: (ReplyInfo.External.Content.Simple) -> T): T? = - simpleOrNull() ?.let(block) - -public inline fun ReplyInfo.textOrNull(): ReplyInfo.External.Text? = this as? - dev.inmo.tgbotapi.types.ReplyInfo.External.Text - -public inline fun ReplyInfo.textOrThrow(): ReplyInfo.External.Text = this as - dev.inmo.tgbotapi.types.ReplyInfo.External.Text - -public inline fun ReplyInfo.ifText(block: (ReplyInfo.External.Text) -> T): T? = textOrNull() - ?.let(block) - public inline fun ReplyInfo.internalOrNull(): ReplyInfo.Internal? = this as? dev.inmo.tgbotapi.types.ReplyInfo.Internal @@ -1909,6 +1895,53 @@ public inline fun ReplyInfo.toStoryOrThrow(): ReplyInfo.ToStory = this as public inline fun ReplyInfo.ifToStory(block: (ReplyInfo.ToStory) -> T): T? = toStoryOrNull() ?.let(block) +public inline fun ReplyInfo.externalOrNull(): ReplyInfo.External? = this as? + dev.inmo.tgbotapi.types.ReplyInfo.External + +public inline fun ReplyInfo.externalOrThrow(): ReplyInfo.External = this as + dev.inmo.tgbotapi.types.ReplyInfo.External + +public inline fun ReplyInfo.ifExternal(block: (ReplyInfo.External) -> T): T? = externalOrNull() + ?.let(block) + +public inline fun ReplyInfo.externalTextOrNull(): ReplyInfo.External.Text? = this as? + dev.inmo.tgbotapi.types.ReplyInfo.External.Text + +public inline fun ReplyInfo.externalTextOrThrow(): ReplyInfo.External.Text = this as + dev.inmo.tgbotapi.types.ReplyInfo.External.Text + +public inline fun ReplyInfo.ifExternalText(block: (ReplyInfo.External.Text) -> T): T? = + externalTextOrNull() ?.let(block) + +public inline fun ReplyInfo.externalContentOrNull(): ReplyInfo.External.Content? = this as? + dev.inmo.tgbotapi.types.ReplyInfo.External.Content + +public inline fun ReplyInfo.externalContentOrThrow(): ReplyInfo.External.Content = this as + dev.inmo.tgbotapi.types.ReplyInfo.External.Content + +public inline fun ReplyInfo.ifExternalContent(block: (ReplyInfo.External.Content) -> T): T? = + externalContentOrNull() ?.let(block) + +public inline fun ReplyInfo.externalContentSimpleOrNull(): ReplyInfo.External.Content.Simple? = this + as? dev.inmo.tgbotapi.types.ReplyInfo.External.Content.Simple + +public inline fun ReplyInfo.externalContentSimpleOrThrow(): ReplyInfo.External.Content.Simple = this + as dev.inmo.tgbotapi.types.ReplyInfo.External.Content.Simple + +public inline fun + ReplyInfo.ifExternalContentSimple(block: (ReplyInfo.External.Content.Simple) -> T): T? = + externalContentSimpleOrNull() ?.let(block) + +public inline fun ReplyInfo.externalContentMediaOrNull(): ReplyInfo.External.Content.Media? = this + as? dev.inmo.tgbotapi.types.ReplyInfo.External.Content.Media + +public inline fun ReplyInfo.externalContentMediaOrThrow(): ReplyInfo.External.Content.Media = this + as dev.inmo.tgbotapi.types.ReplyInfo.External.Content.Media + +public inline fun + ReplyInfo.ifExternalContentMedia(block: (ReplyInfo.External.Content.Media) -> T): T? = + externalContentMediaOrNull() ?.let(block) + public inline fun BotAction.typingActionOrNull(): TypingAction? = this as? dev.inmo.tgbotapi.types.actions.TypingAction @@ -2026,24 +2059,6 @@ public inline fun ChatBoostSource.byUserOrThrow(): ChatBoostSource.ByUser = this public inline fun ChatBoostSource.ifByUser(block: (ChatBoostSource.ByUser) -> T): T? = byUserOrNull() ?.let(block) -public inline fun ChatBoostSource.giftCodeOrNull(): ChatBoostSource.GiftCode? = this as? - dev.inmo.tgbotapi.types.boosts.ChatBoostSource.GiftCode - -public inline fun ChatBoostSource.giftCodeOrThrow(): ChatBoostSource.GiftCode = this as - dev.inmo.tgbotapi.types.boosts.ChatBoostSource.GiftCode - -public inline fun ChatBoostSource.ifGiftCode(block: (ChatBoostSource.GiftCode) -> T): T? = - giftCodeOrNull() ?.let(block) - -public inline fun ChatBoostSource.claimedOrNull(): ChatBoostSource.Giveaway.Claimed? = this as? - dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Giveaway.Claimed - -public inline fun ChatBoostSource.claimedOrThrow(): ChatBoostSource.Giveaway.Claimed = this as - dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Giveaway.Claimed - -public inline fun ChatBoostSource.ifClaimed(block: (ChatBoostSource.Giveaway.Claimed) -> T): T? - = claimedOrNull() ?.let(block) - public inline fun ChatBoostSource.premiumOrNull(): ChatBoostSource.Premium? = this as? dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Premium @@ -2053,6 +2068,15 @@ public inline fun ChatBoostSource.premiumOrThrow(): ChatBoostSource.Premium = th public inline fun ChatBoostSource.ifPremium(block: (ChatBoostSource.Premium) -> T): T? = premiumOrNull() ?.let(block) +public inline fun ChatBoostSource.giftCodeOrNull(): ChatBoostSource.GiftCode? = this as? + dev.inmo.tgbotapi.types.boosts.ChatBoostSource.GiftCode + +public inline fun ChatBoostSource.giftCodeOrThrow(): ChatBoostSource.GiftCode = this as + dev.inmo.tgbotapi.types.boosts.ChatBoostSource.GiftCode + +public inline fun ChatBoostSource.ifGiftCode(block: (ChatBoostSource.GiftCode) -> T): T? = + giftCodeOrNull() ?.let(block) + public inline fun ChatBoostSource.giveawayOrNull(): ChatBoostSource.Giveaway? = this as? dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Giveaway @@ -2062,24 +2086,6 @@ public inline fun ChatBoostSource.giveawayOrThrow(): ChatBoostSource.Giveaway = public inline fun ChatBoostSource.ifGiveaway(block: (ChatBoostSource.Giveaway) -> T): T? = giveawayOrNull() ?.let(block) -public inline fun ChatBoostSource.createdOrNull(): ChatBoostSource.Giveaway.Created? = this as? - dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Giveaway.Created - -public inline fun ChatBoostSource.createdOrThrow(): ChatBoostSource.Giveaway.Created = this as - dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Giveaway.Created - -public inline fun ChatBoostSource.ifCreated(block: (ChatBoostSource.Giveaway.Created) -> T): T? - = createdOrNull() ?.let(block) - -public inline fun ChatBoostSource.unclaimedOrNull(): ChatBoostSource.Giveaway.Unclaimed? = this as? - dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Giveaway.Unclaimed - -public inline fun ChatBoostSource.unclaimedOrThrow(): ChatBoostSource.Giveaway.Unclaimed = this as - dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Giveaway.Unclaimed - -public inline fun ChatBoostSource.ifUnclaimed(block: (ChatBoostSource.Giveaway.Unclaimed) -> T): - T? = unclaimedOrNull() ?.let(block) - public inline fun ChatBoostSource.unknownOrNull(): ChatBoostSource.Unknown? = this as? dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Unknown @@ -2089,14 +2095,35 @@ public inline fun ChatBoostSource.unknownOrThrow(): ChatBoostSource.Unknown = th public inline fun ChatBoostSource.ifUnknown(block: (ChatBoostSource.Unknown) -> T): T? = unknownOrNull() ?.let(block) -public inline fun BusinessConnection.disabledOrNull(): BusinessConnection.Disabled? = this as? - dev.inmo.tgbotapi.types.business_connection.BusinessConnection.Disabled +public inline fun ChatBoostSource.giveawayCreatedOrNull(): ChatBoostSource.Giveaway.Created? = this + as? dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Giveaway.Created -public inline fun BusinessConnection.disabledOrThrow(): BusinessConnection.Disabled = this as - dev.inmo.tgbotapi.types.business_connection.BusinessConnection.Disabled +public inline fun ChatBoostSource.giveawayCreatedOrThrow(): ChatBoostSource.Giveaway.Created = this + as dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Giveaway.Created -public inline fun BusinessConnection.ifDisabled(block: (BusinessConnection.Disabled) -> T): T? = - disabledOrNull() ?.let(block) +public inline fun + ChatBoostSource.ifGiveawayCreated(block: (ChatBoostSource.Giveaway.Created) -> T): T? = + giveawayCreatedOrNull() ?.let(block) + +public inline fun ChatBoostSource.giveawayClaimedOrNull(): ChatBoostSource.Giveaway.Claimed? = this + as? dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Giveaway.Claimed + +public inline fun ChatBoostSource.giveawayClaimedOrThrow(): ChatBoostSource.Giveaway.Claimed = this + as dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Giveaway.Claimed + +public inline fun + ChatBoostSource.ifGiveawayClaimed(block: (ChatBoostSource.Giveaway.Claimed) -> T): T? = + giveawayClaimedOrNull() ?.let(block) + +public inline fun ChatBoostSource.giveawayUnclaimedOrNull(): ChatBoostSource.Giveaway.Unclaimed? = + this as? dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Giveaway.Unclaimed + +public inline fun ChatBoostSource.giveawayUnclaimedOrThrow(): ChatBoostSource.Giveaway.Unclaimed = + this as dev.inmo.tgbotapi.types.boosts.ChatBoostSource.Giveaway.Unclaimed + +public inline fun + ChatBoostSource.ifGiveawayUnclaimed(block: (ChatBoostSource.Giveaway.Unclaimed) -> T): T? = + giveawayUnclaimedOrNull() ?.let(block) public inline fun BusinessConnection.enabledOrNull(): BusinessConnection.Enabled? = this as? dev.inmo.tgbotapi.types.business_connection.BusinessConnection.Enabled @@ -2107,6 +2134,15 @@ public inline fun BusinessConnection.enabledOrThrow(): BusinessConnection.Enable public inline fun BusinessConnection.ifEnabled(block: (BusinessConnection.Enabled) -> T): T? = enabledOrNull() ?.let(block) +public inline fun BusinessConnection.disabledOrNull(): BusinessConnection.Disabled? = this as? + dev.inmo.tgbotapi.types.business_connection.BusinessConnection.Disabled + +public inline fun BusinessConnection.disabledOrThrow(): BusinessConnection.Disabled = this as + dev.inmo.tgbotapi.types.business_connection.BusinessConnection.Disabled + +public inline fun BusinessConnection.ifDisabled(block: (BusinessConnection.Disabled) -> T): T? = + disabledOrNull() ?.let(block) + public inline fun InlineKeyboardButton.unknownInlineKeyboardButtonOrNull(): UnknownInlineKeyboardButton? = this as? dev.inmo.tgbotapi.types.buttons.InlineKeyboardButtons.UnknownInlineKeyboardButton @@ -2242,16 +2278,6 @@ public inline fun KeyboardButtonRequestUsers.ifAny(block: (KeyboardButtonRequestUsers.Any) -> T): T? = anyOrNull() ?.let(block) -public inline fun KeyboardButtonRequestUsers.botOrNull(): KeyboardButtonRequestUsers.Bot? = this as? - dev.inmo.tgbotapi.types.buttons.KeyboardButtonRequestUsers.Bot - -public inline fun KeyboardButtonRequestUsers.botOrThrow(): KeyboardButtonRequestUsers.Bot = this as - dev.inmo.tgbotapi.types.buttons.KeyboardButtonRequestUsers.Bot - -public inline fun - KeyboardButtonRequestUsers.ifBot(block: (KeyboardButtonRequestUsers.Bot) -> T): T? = botOrNull() - ?.let(block) - public inline fun KeyboardButtonRequestUsers.commonOrNull(): KeyboardButtonRequestUsers.Common? = this as? dev.inmo.tgbotapi.types.buttons.KeyboardButtonRequestUsers.Common @@ -2262,6 +2288,16 @@ public inline fun KeyboardButtonRequestUsers.ifCommon(block: (KeyboardButtonRequestUsers.Common) -> T): T? = commonOrNull() ?.let(block) +public inline fun KeyboardButtonRequestUsers.botOrNull(): KeyboardButtonRequestUsers.Bot? = this as? + dev.inmo.tgbotapi.types.buttons.KeyboardButtonRequestUsers.Bot + +public inline fun KeyboardButtonRequestUsers.botOrThrow(): KeyboardButtonRequestUsers.Bot = this as + dev.inmo.tgbotapi.types.buttons.KeyboardButtonRequestUsers.Bot + +public inline fun + KeyboardButtonRequestUsers.ifBot(block: (KeyboardButtonRequestUsers.Bot) -> T): T? = botOrNull() + ?.let(block) + public inline fun KeyboardMarkup.inlineKeyboardMarkupOrNull(): InlineKeyboardMarkup? = this as? dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup @@ -2650,16 +2686,6 @@ public inline fun Chat.unknownChatTypeOrThrow(): UnknownChatType = this as public inline fun Chat.ifUnknownChatType(block: (UnknownChatType) -> T): T? = unknownChatTypeOrNull() ?.let(block) -public inline fun ChatMessageReactionUpdated.byChatOrNull(): ChatMessageReactionUpdated.ByChat? = - this as? dev.inmo.tgbotapi.types.chat.ChatMessageReactionUpdated.ByChat - -public inline fun ChatMessageReactionUpdated.byChatOrThrow(): ChatMessageReactionUpdated.ByChat = - this as dev.inmo.tgbotapi.types.chat.ChatMessageReactionUpdated.ByChat - -public inline fun - ChatMessageReactionUpdated.ifByChat(block: (ChatMessageReactionUpdated.ByChat) -> T): T? = - byChatOrNull() ?.let(block) - public inline fun ChatMessageReactionUpdated.byUserOrNull(): ChatMessageReactionUpdated.ByUser? = this as? dev.inmo.tgbotapi.types.chat.ChatMessageReactionUpdated.ByUser @@ -2670,6 +2696,16 @@ public inline fun ChatMessageReactionUpdated.ifByUser(block: (ChatMessageReactionUpdated.ByUser) -> T): T? = byUserOrNull() ?.let(block) +public inline fun ChatMessageReactionUpdated.byChatOrNull(): ChatMessageReactionUpdated.ByChat? = + this as? dev.inmo.tgbotapi.types.chat.ChatMessageReactionUpdated.ByChat + +public inline fun ChatMessageReactionUpdated.byChatOrThrow(): ChatMessageReactionUpdated.ByChat = + this as dev.inmo.tgbotapi.types.chat.ChatMessageReactionUpdated.ByChat + +public inline fun + ChatMessageReactionUpdated.ifByChat(block: (ChatMessageReactionUpdated.ByChat) -> T): T? = + byChatOrNull() ?.let(block) + public inline fun ChatMessageReactionUpdated.unknownOrNull(): ChatMessageReactionUpdated.Unknown? = this as? dev.inmo.tgbotapi.types.chat.ChatMessageReactionUpdated.Unknown @@ -3312,6 +3348,94 @@ public inline fun ChatEvent.chatBackgroundOrThrow(): ChatBackground = this as public inline fun ChatEvent.ifChatBackground(block: (ChatBackground) -> T): T? = chatBackgroundOrNull() ?.let(block) +public inline fun ChatEvent.giftSentOrReceivedOrNull(): GiftSentOrReceived? = this as? + dev.inmo.tgbotapi.types.gifts.GiftSentOrReceived + +public inline fun ChatEvent.giftSentOrReceivedOrThrow(): GiftSentOrReceived = this as + dev.inmo.tgbotapi.types.gifts.GiftSentOrReceived + +public inline fun ChatEvent.ifGiftSentOrReceived(block: (GiftSentOrReceived) -> T): T? = + giftSentOrReceivedOrNull() ?.let(block) + +public inline fun ChatEvent.giftSentOrReceivedReceivedInBusinessAccountOrNull(): + GiftSentOrReceived.ReceivedInBusinessAccount? = this as? + dev.inmo.tgbotapi.types.gifts.GiftSentOrReceived.ReceivedInBusinessAccount + +public inline fun ChatEvent.giftSentOrReceivedReceivedInBusinessAccountOrThrow(): + GiftSentOrReceived.ReceivedInBusinessAccount = this as + dev.inmo.tgbotapi.types.gifts.GiftSentOrReceived.ReceivedInBusinessAccount + +public inline fun + ChatEvent.ifGiftSentOrReceivedReceivedInBusinessAccount(block: (GiftSentOrReceived.ReceivedInBusinessAccount) -> T): + T? = giftSentOrReceivedReceivedInBusinessAccountOrNull() ?.let(block) + +public inline fun ChatEvent.giftSentOrReceivedRegularOrNull(): GiftSentOrReceived.Regular? = this + as? dev.inmo.tgbotapi.types.gifts.GiftSentOrReceived.Regular + +public inline fun ChatEvent.giftSentOrReceivedRegularOrThrow(): GiftSentOrReceived.Regular = this as + dev.inmo.tgbotapi.types.gifts.GiftSentOrReceived.Regular + +public inline fun + ChatEvent.ifGiftSentOrReceivedRegular(block: (GiftSentOrReceived.Regular) -> T): T? = + giftSentOrReceivedRegularOrNull() ?.let(block) + +public inline fun ChatEvent.giftSentOrReceivedUniqueOrNull(): GiftSentOrReceived.Unique? = this as? + dev.inmo.tgbotapi.types.gifts.GiftSentOrReceived.Unique + +public inline fun ChatEvent.giftSentOrReceivedUniqueOrThrow(): GiftSentOrReceived.Unique = this as + dev.inmo.tgbotapi.types.gifts.GiftSentOrReceived.Unique + +public inline fun ChatEvent.ifGiftSentOrReceivedUnique(block: (GiftSentOrReceived.Unique) -> T): + T? = giftSentOrReceivedUniqueOrNull() ?.let(block) + +public inline fun ChatEvent.giftSentOrReceivedRegularCommonOrNull(): + GiftSentOrReceived.Regular.Common? = this as? + dev.inmo.tgbotapi.types.gifts.GiftSentOrReceived.Regular.Common + +public inline fun ChatEvent.giftSentOrReceivedRegularCommonOrThrow(): + GiftSentOrReceived.Regular.Common = this as + dev.inmo.tgbotapi.types.gifts.GiftSentOrReceived.Regular.Common + +public inline fun + ChatEvent.ifGiftSentOrReceivedRegularCommon(block: (GiftSentOrReceived.Regular.Common) -> T): T? + = giftSentOrReceivedRegularCommonOrNull() ?.let(block) + +public inline fun ChatEvent.giftSentOrReceivedRegularReceivedInBusinessAccountOrNull(): + GiftSentOrReceived.Regular.ReceivedInBusinessAccount? = this as? + dev.inmo.tgbotapi.types.gifts.GiftSentOrReceived.Regular.ReceivedInBusinessAccount + +public inline fun ChatEvent.giftSentOrReceivedRegularReceivedInBusinessAccountOrThrow(): + GiftSentOrReceived.Regular.ReceivedInBusinessAccount = this as + dev.inmo.tgbotapi.types.gifts.GiftSentOrReceived.Regular.ReceivedInBusinessAccount + +public inline fun + ChatEvent.ifGiftSentOrReceivedRegularReceivedInBusinessAccount(block: (GiftSentOrReceived.Regular.ReceivedInBusinessAccount) -> T): + T? = giftSentOrReceivedRegularReceivedInBusinessAccountOrNull() ?.let(block) + +public inline fun ChatEvent.giftSentOrReceivedUniqueCommonOrNull(): + GiftSentOrReceived.Unique.Common? = this as? + dev.inmo.tgbotapi.types.gifts.GiftSentOrReceived.Unique.Common + +public inline fun ChatEvent.giftSentOrReceivedUniqueCommonOrThrow(): + GiftSentOrReceived.Unique.Common = this as + dev.inmo.tgbotapi.types.gifts.GiftSentOrReceived.Unique.Common + +public inline fun + ChatEvent.ifGiftSentOrReceivedUniqueCommon(block: (GiftSentOrReceived.Unique.Common) -> T): T? = + giftSentOrReceivedUniqueCommonOrNull() ?.let(block) + +public inline fun ChatEvent.giftSentOrReceivedUniqueReceivedInBusinessAccountOrNull(): + GiftSentOrReceived.Unique.ReceivedInBusinessAccount? = this as? + dev.inmo.tgbotapi.types.gifts.GiftSentOrReceived.Unique.ReceivedInBusinessAccount + +public inline fun ChatEvent.giftSentOrReceivedUniqueReceivedInBusinessAccountOrThrow(): + GiftSentOrReceived.Unique.ReceivedInBusinessAccount = this as + dev.inmo.tgbotapi.types.gifts.GiftSentOrReceived.Unique.ReceivedInBusinessAccount + +public inline fun + ChatEvent.ifGiftSentOrReceivedUniqueReceivedInBusinessAccount(block: (GiftSentOrReceived.Unique.ReceivedInBusinessAccount) -> T): + T? = giftSentOrReceivedUniqueReceivedInBusinessAccountOrNull() ?.let(block) + public inline fun ChatEvent.giveawayCreatedOrNull(): GiveawayCreated? = this as? dev.inmo.tgbotapi.types.giveaway.GiveawayCreated @@ -3321,6 +3445,24 @@ public inline fun ChatEvent.giveawayCreatedOrThrow(): GiveawayCreated = this as public inline fun ChatEvent.ifGiveawayCreated(block: (GiveawayCreated) -> T): T? = giveawayCreatedOrNull() ?.let(block) +public inline fun ChatEvent.giveawayCreatedStarsOrNull(): GiveawayCreated.Stars? = this as? + dev.inmo.tgbotapi.types.giveaway.GiveawayCreated.Stars + +public inline fun ChatEvent.giveawayCreatedStarsOrThrow(): GiveawayCreated.Stars = this as + dev.inmo.tgbotapi.types.giveaway.GiveawayCreated.Stars + +public inline fun ChatEvent.ifGiveawayCreatedStars(block: (GiveawayCreated.Stars) -> T): T? = + giveawayCreatedStarsOrNull() ?.let(block) + +public inline fun ChatEvent.giveawayCreatedCompanionOrNull(): GiveawayCreated.Companion? = this as? + dev.inmo.tgbotapi.types.giveaway.GiveawayCreated.Companion + +public inline fun ChatEvent.giveawayCreatedCompanionOrThrow(): GiveawayCreated.Companion = this as + dev.inmo.tgbotapi.types.giveaway.GiveawayCreated.Companion + +public inline fun ChatEvent.ifGiveawayCreatedCompanion(block: (GiveawayCreated.Companion) -> T): + T? = giveawayCreatedCompanionOrNull() ?.let(block) + public inline fun ChatEvent.giveawayPrivateResultsOrNull(): GiveawayPrivateResults? = this as? dev.inmo.tgbotapi.types.giveaway.GiveawayPrivateResults @@ -3602,6 +3744,49 @@ public inline fun ChatEvent.writeAccessAllowedOrThrow(): WriteAccessAllowed = th public inline fun ChatEvent.ifWriteAccessAllowed(block: (WriteAccessAllowed) -> T): T? = writeAccessAllowedOrNull() ?.let(block) +public inline fun ChatEvent.writeAccessAllowedOtherOrNull(): WriteAccessAllowed.Other? = this as? + dev.inmo.tgbotapi.types.message.ChatEvents.forum.WriteAccessAllowed.Other + +public inline fun ChatEvent.writeAccessAllowedOtherOrThrow(): WriteAccessAllowed.Other = this as + dev.inmo.tgbotapi.types.message.ChatEvents.forum.WriteAccessAllowed.Other + +public inline fun ChatEvent.ifWriteAccessAllowedOther(block: (WriteAccessAllowed.Other) -> T): + T? = writeAccessAllowedOtherOrNull() ?.let(block) + +public inline fun ChatEvent.writeAccessAllowedFromWebAppLinkOrNull(): + WriteAccessAllowed.FromWebAppLink? = this as? + dev.inmo.tgbotapi.types.message.ChatEvents.forum.WriteAccessAllowed.FromWebAppLink + +public inline fun ChatEvent.writeAccessAllowedFromWebAppLinkOrThrow(): + WriteAccessAllowed.FromWebAppLink = this as + dev.inmo.tgbotapi.types.message.ChatEvents.forum.WriteAccessAllowed.FromWebAppLink + +public inline fun + ChatEvent.ifWriteAccessAllowedFromWebAppLink(block: (WriteAccessAllowed.FromWebAppLink) -> T): + T? = writeAccessAllowedFromWebAppLinkOrNull() ?.let(block) + +public inline fun ChatEvent.writeAccessAllowedFromRequestOrNull(): WriteAccessAllowed.FromRequest? = + this as? dev.inmo.tgbotapi.types.message.ChatEvents.forum.WriteAccessAllowed.FromRequest + +public inline fun ChatEvent.writeAccessAllowedFromRequestOrThrow(): WriteAccessAllowed.FromRequest = + this as dev.inmo.tgbotapi.types.message.ChatEvents.forum.WriteAccessAllowed.FromRequest + +public inline fun + ChatEvent.ifWriteAccessAllowedFromRequest(block: (WriteAccessAllowed.FromRequest) -> T): T? = + writeAccessAllowedFromRequestOrNull() ?.let(block) + +public inline fun ChatEvent.writeAccessAllowedFromAttachmentMenuOrNull(): + WriteAccessAllowed.FromAttachmentMenu? = this as? + dev.inmo.tgbotapi.types.message.ChatEvents.forum.WriteAccessAllowed.FromAttachmentMenu + +public inline fun ChatEvent.writeAccessAllowedFromAttachmentMenuOrThrow(): + WriteAccessAllowed.FromAttachmentMenu = this as + dev.inmo.tgbotapi.types.message.ChatEvents.forum.WriteAccessAllowed.FromAttachmentMenu + +public inline fun + ChatEvent.ifWriteAccessAllowedFromAttachmentMenu(block: (WriteAccessAllowed.FromAttachmentMenu) -> T): + T? = writeAccessAllowedFromAttachmentMenuOrNull() ?.let(block) + public inline fun ChatEvent.videoChatEndedOrNull(): VideoChatEnded? = this as? dev.inmo.tgbotapi.types.message.ChatEvents.voice.VideoChatEnded @@ -3702,14 +3887,24 @@ public inline fun ForwardInfo.byUserOrThrow(): ForwardInfo.ByUser = this as public inline fun ForwardInfo.ifByUser(block: (ForwardInfo.ByUser) -> T): T? = byUserOrNull() ?.let(block) -public inline fun ForwardInfo.publicChatOrNull(): ForwardInfo.PublicChat? = this as? +public inline fun ForwardInfo.OrNull(): ForwardInfo.PublicChat? = this as? dev.inmo.tgbotapi.types.message.ForwardInfo.PublicChat -public inline fun ForwardInfo.publicChatOrThrow(): ForwardInfo.PublicChat = this as +public inline fun ForwardInfo.OrThrow(): ForwardInfo.PublicChat = this as dev.inmo.tgbotapi.types.message.ForwardInfo.PublicChat -public inline fun ForwardInfo.ifPublicChat(block: (ForwardInfo.PublicChat) -> T): T? = - publicChatOrNull() ?.let(block) +public inline fun ForwardInfo.`if`(block: (ForwardInfo.PublicChat) -> T): T? = OrNull() + ?.let(block) + +public inline fun ForwardInfo.sentByChannelOrNull(): ForwardInfo.PublicChat.SentByChannel? = this + as? dev.inmo.tgbotapi.types.message.ForwardInfo.PublicChat.SentByChannel + +public inline fun ForwardInfo.sentByChannelOrThrow(): ForwardInfo.PublicChat.SentByChannel = this as + dev.inmo.tgbotapi.types.message.ForwardInfo.PublicChat.SentByChannel + +public inline fun + ForwardInfo.ifSentByChannel(block: (ForwardInfo.PublicChat.SentByChannel) -> T): T? = + sentByChannelOrNull() ?.let(block) public inline fun ForwardInfo.fromChannelOrNull(): ForwardInfo.PublicChat.FromChannel? = this as? dev.inmo.tgbotapi.types.message.ForwardInfo.PublicChat.FromChannel @@ -3730,16 +3925,6 @@ public inline fun ForwardInfo.ifFromSupergroup(block: (ForwardInfo.PublicChat.FromSupergroup) -> T): T? = fromSupergroupOrNull() ?.let(block) -public inline fun ForwardInfo.sentByChannelOrNull(): ForwardInfo.PublicChat.SentByChannel? = this - as? dev.inmo.tgbotapi.types.message.ForwardInfo.PublicChat.SentByChannel - -public inline fun ForwardInfo.sentByChannelOrThrow(): ForwardInfo.PublicChat.SentByChannel = this as - dev.inmo.tgbotapi.types.message.ForwardInfo.PublicChat.SentByChannel - -public inline fun - ForwardInfo.ifSentByChannel(block: (ForwardInfo.PublicChat.SentByChannel) -> T): T? = - sentByChannelOrNull() ?.let(block) - public inline fun Message.channelEventMessageOrNull(): ChannelEventMessage? = this as? dev.inmo.tgbotapi.types.message.ChannelEventMessage @@ -5306,15 +5491,6 @@ public inline fun EncryptedPassportElement.ifEncryptedPassportElementWithSelfie(block: (EncryptedPassportElementWithSelfie) -> T): T? = encryptedPassportElementWithSelfieOrNull() ?.let(block) -public inline fun RevenueWithdrawalState.failedOrNull(): RevenueWithdrawalState.Failed? = this as? - dev.inmo.tgbotapi.types.payments.stars.RevenueWithdrawalState.Failed - -public inline fun RevenueWithdrawalState.failedOrThrow(): RevenueWithdrawalState.Failed = this as - dev.inmo.tgbotapi.types.payments.stars.RevenueWithdrawalState.Failed - -public inline fun RevenueWithdrawalState.ifFailed(block: (RevenueWithdrawalState.Failed) -> T): - T? = failedOrNull() ?.let(block) - public inline fun RevenueWithdrawalState.pendingOrNull(): RevenueWithdrawalState.Pending? = this as? dev.inmo.tgbotapi.types.payments.stars.RevenueWithdrawalState.Pending @@ -5335,6 +5511,15 @@ public inline fun RevenueWithdrawalState.ifSucceeded(block: (RevenueWithdrawalState.Succeeded) -> T): T? = succeededOrNull() ?.let(block) +public inline fun RevenueWithdrawalState.failedOrNull(): RevenueWithdrawalState.Failed? = this as? + dev.inmo.tgbotapi.types.payments.stars.RevenueWithdrawalState.Failed + +public inline fun RevenueWithdrawalState.failedOrThrow(): RevenueWithdrawalState.Failed = this as + dev.inmo.tgbotapi.types.payments.stars.RevenueWithdrawalState.Failed + +public inline fun RevenueWithdrawalState.ifFailed(block: (RevenueWithdrawalState.Failed) -> T): + T? = failedOrNull() ?.let(block) + public inline fun RevenueWithdrawalState.unknownOrNull(): RevenueWithdrawalState.Unknown? = this as? dev.inmo.tgbotapi.types.payments.stars.RevenueWithdrawalState.Unknown @@ -5372,34 +5557,6 @@ public inline fun StarTransaction.unknownOrThrow(): StarTransaction.Unknown = th public inline fun StarTransaction.ifUnknown(block: (StarTransaction.Unknown) -> T): T? = unknownOrNull() ?.let(block) -public inline fun TransactionPartner.adsOrNull(): TransactionPartner.Ads? = this as? - dev.inmo.tgbotapi.types.payments.stars.TransactionPartner.Ads - -public inline fun TransactionPartner.adsOrThrow(): TransactionPartner.Ads = this as - dev.inmo.tgbotapi.types.payments.stars.TransactionPartner.Ads - -public inline fun TransactionPartner.ifAds(block: (TransactionPartner.Ads) -> T): T? = - adsOrNull() ?.let(block) - -public inline fun TransactionPartner.affiliateProgramOrNull(): TransactionPartner.AffiliateProgram? - = this as? dev.inmo.tgbotapi.types.payments.stars.TransactionPartner.AffiliateProgram - -public inline fun TransactionPartner.affiliateProgramOrThrow(): TransactionPartner.AffiliateProgram - = this as dev.inmo.tgbotapi.types.payments.stars.TransactionPartner.AffiliateProgram - -public inline fun - TransactionPartner.ifAffiliateProgram(block: (TransactionPartner.AffiliateProgram) -> T): T? = - affiliateProgramOrNull() ?.let(block) - -public inline fun TransactionPartner.chatOrNull(): TransactionPartner.Chat? = this as? - dev.inmo.tgbotapi.types.payments.stars.TransactionPartner.Chat - -public inline fun TransactionPartner.chatOrThrow(): TransactionPartner.Chat = this as - dev.inmo.tgbotapi.types.payments.stars.TransactionPartner.Chat - -public inline fun TransactionPartner.ifChat(block: (TransactionPartner.Chat) -> T): T? = - chatOrNull() ?.let(block) - public inline fun TransactionPartner.fragmentOrNull(): TransactionPartner.Fragment? = this as? dev.inmo.tgbotapi.types.payments.stars.TransactionPartner.Fragment @@ -5409,14 +5566,23 @@ public inline fun TransactionPartner.fragmentOrThrow(): TransactionPartner.Fragm public inline fun TransactionPartner.ifFragment(block: (TransactionPartner.Fragment) -> T): T? = fragmentOrNull() ?.let(block) -public inline fun TransactionPartner.otherOrNull(): TransactionPartner.Other? = this as? - dev.inmo.tgbotapi.types.payments.stars.TransactionPartner.Other +public inline fun TransactionPartner.userOrNull(): TransactionPartner.User? = this as? + dev.inmo.tgbotapi.types.payments.stars.TransactionPartner.User -public inline fun TransactionPartner.otherOrThrow(): TransactionPartner.Other = this as - dev.inmo.tgbotapi.types.payments.stars.TransactionPartner.Other +public inline fun TransactionPartner.userOrThrow(): TransactionPartner.User = this as + dev.inmo.tgbotapi.types.payments.stars.TransactionPartner.User -public inline fun TransactionPartner.ifOther(block: (TransactionPartner.Other) -> T): T? = - otherOrNull() ?.let(block) +public inline fun TransactionPartner.ifUser(block: (TransactionPartner.User) -> T): T? = + userOrNull() ?.let(block) + +public inline fun TransactionPartner.chatOrNull(): TransactionPartner.Chat? = this as? + dev.inmo.tgbotapi.types.payments.stars.TransactionPartner.Chat + +public inline fun TransactionPartner.chatOrThrow(): TransactionPartner.Chat = this as + dev.inmo.tgbotapi.types.payments.stars.TransactionPartner.Chat + +public inline fun TransactionPartner.ifChat(block: (TransactionPartner.Chat) -> T): T? = + chatOrNull() ?.let(block) public inline fun TransactionPartner.telegramAPIOrNull(): TransactionPartner.TelegramAPI? = this as? dev.inmo.tgbotapi.types.payments.stars.TransactionPartner.TelegramAPI @@ -5428,6 +5594,34 @@ public inline fun TransactionPartner.ifTelegramAPI(block: (TransactionPartner.TelegramAPI) -> T): T? = telegramAPIOrNull() ?.let(block) +public inline fun TransactionPartner.affiliateProgramOrNull(): TransactionPartner.AffiliateProgram? + = this as? dev.inmo.tgbotapi.types.payments.stars.TransactionPartner.AffiliateProgram + +public inline fun TransactionPartner.affiliateProgramOrThrow(): TransactionPartner.AffiliateProgram + = this as dev.inmo.tgbotapi.types.payments.stars.TransactionPartner.AffiliateProgram + +public inline fun + TransactionPartner.ifAffiliateProgram(block: (TransactionPartner.AffiliateProgram) -> T): T? = + affiliateProgramOrNull() ?.let(block) + +public inline fun TransactionPartner.adsOrNull(): TransactionPartner.Ads? = this as? + dev.inmo.tgbotapi.types.payments.stars.TransactionPartner.Ads + +public inline fun TransactionPartner.adsOrThrow(): TransactionPartner.Ads = this as + dev.inmo.tgbotapi.types.payments.stars.TransactionPartner.Ads + +public inline fun TransactionPartner.ifAds(block: (TransactionPartner.Ads) -> T): T? = + adsOrNull() ?.let(block) + +public inline fun TransactionPartner.otherOrNull(): TransactionPartner.Other? = this as? + dev.inmo.tgbotapi.types.payments.stars.TransactionPartner.Other + +public inline fun TransactionPartner.otherOrThrow(): TransactionPartner.Other = this as + dev.inmo.tgbotapi.types.payments.stars.TransactionPartner.Other + +public inline fun TransactionPartner.ifOther(block: (TransactionPartner.Other) -> T): T? = + otherOrNull() ?.let(block) + public inline fun TransactionPartner.unknownOrNull(): TransactionPartner.Unknown? = this as? dev.inmo.tgbotapi.types.payments.stars.TransactionPartner.Unknown @@ -5437,15 +5631,6 @@ public inline fun TransactionPartner.unknownOrThrow(): TransactionPartner.Unknow public inline fun TransactionPartner.ifUnknown(block: (TransactionPartner.Unknown) -> T): T? = unknownOrNull() ?.let(block) -public inline fun TransactionPartner.userOrNull(): TransactionPartner.User? = this as? - dev.inmo.tgbotapi.types.payments.stars.TransactionPartner.User - -public inline fun TransactionPartner.userOrThrow(): TransactionPartner.User = this as - dev.inmo.tgbotapi.types.payments.stars.TransactionPartner.User - -public inline fun TransactionPartner.ifUser(block: (TransactionPartner.User) -> T): T? = - userOrNull() ?.let(block) - public inline fun ScheduledCloseInfo.exactScheduledCloseInfoOrNull(): ExactScheduledCloseInfo? = this as? dev.inmo.tgbotapi.types.polls.ExactScheduledCloseInfo @@ -5501,15 +5686,6 @@ public inline fun Poll.quizPollOrThrow(): QuizPoll = this as dev.inmo.tgbotapi.t public inline fun Poll.ifQuizPoll(block: (QuizPoll) -> T): T? = quizPollOrNull() ?.let(block) -public inline fun Reaction.customEmojiOrNull(): Reaction.CustomEmoji? = this as? - dev.inmo.tgbotapi.types.reactions.Reaction.CustomEmoji - -public inline fun Reaction.customEmojiOrThrow(): Reaction.CustomEmoji = this as - dev.inmo.tgbotapi.types.reactions.Reaction.CustomEmoji - -public inline fun Reaction.ifCustomEmoji(block: (Reaction.CustomEmoji) -> T): T? = - customEmojiOrNull() ?.let(block) - public inline fun Reaction.emojiOrNull(): Reaction.Emoji? = this as? dev.inmo.tgbotapi.types.reactions.Reaction.Emoji @@ -5519,6 +5695,15 @@ public inline fun Reaction.emojiOrThrow(): Reaction.Emoji = this as public inline fun Reaction.ifEmoji(block: (Reaction.Emoji) -> T): T? = emojiOrNull() ?.let(block) +public inline fun Reaction.customEmojiOrNull(): Reaction.CustomEmoji? = this as? + dev.inmo.tgbotapi.types.reactions.Reaction.CustomEmoji + +public inline fun Reaction.customEmojiOrThrow(): Reaction.CustomEmoji = this as + dev.inmo.tgbotapi.types.reactions.Reaction.CustomEmoji + +public inline fun Reaction.ifCustomEmoji(block: (Reaction.CustomEmoji) -> T): T? = + customEmojiOrNull() ?.let(block) + public inline fun Reaction.paidOrNull(): Reaction.Paid? = this as? dev.inmo.tgbotapi.types.reactions.Reaction.Paid