From 82e9b3272b1a26414a764310891b926d43a7a0b3 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Thu, 28 Jan 2021 22:19:56 +0600 Subject: [PATCH] update temporal --- tgbotapi.core/build.gradle | 1 + tgbotapi.core/src/jvmTest/kotlin/Temporal.kt | 92 +++++--------------- 2 files changed, 21 insertions(+), 72 deletions(-) diff --git a/tgbotapi.core/build.gradle b/tgbotapi.core/build.gradle index cc7a0cdbb3..99f8372858 100644 --- a/tgbotapi.core/build.gradle +++ b/tgbotapi.core/build.gradle @@ -105,6 +105,7 @@ kapt { arguments { arg( "com.github.matfax.klassindex.IndexSubclasses", + "dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValue", // "dev.inmo.tgbotapi.types.message.content.abstracts.ResendableContent", // "dev.inmo.tgbotapi.types.message.abstracts.Message", // "dev.inmo.tgbotapi.types.passport.encrypted_data.abstracts.EncryptedPassportElement", diff --git a/tgbotapi.core/src/jvmTest/kotlin/Temporal.kt b/tgbotapi.core/src/jvmTest/kotlin/Temporal.kt index efb9e72d0e..8bbe724a49 100644 --- a/tgbotapi.core/src/jvmTest/kotlin/Temporal.kt +++ b/tgbotapi.core/src/jvmTest/kotlin/Temporal.kt @@ -13,7 +13,7 @@ import dev.inmo.tgbotapi.types.files.abstracts.TelegramMediaFile import dev.inmo.tgbotapi.types.message.abstracts.Message import dev.inmo.tgbotapi.types.message.content.abstracts.ResendableContent import dev.inmo.tgbotapi.types.passport.PassportElementError -import dev.inmo.tgbotapi.types.passport.encrypted_data.abstracts.EncryptedPassportElement +import dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValue import dev.inmo.tgbotapi.types.polls.Poll import dev.inmo.tgbotapi.types.update.abstracts.Update import dev.inmo.tgbotapi.utils.PreviewFeature @@ -40,77 +40,25 @@ val result = mutableMapOf, Set>>() fun main() { - result[dev.inmo.tgbotapi.types.message.abstracts.Message::class] = - setOf(dev.inmo.tgbotapi.types.message.AnonymousGroupMessageImpl::class, - dev.inmo.tgbotapi.types.message.ChannelEventMessage::class, - dev.inmo.tgbotapi.types.message.ChannelMediaGroupMessage::class, - dev.inmo.tgbotapi.types.message.ChannelMessageImpl::class, - dev.inmo.tgbotapi.types.message.CommonGroupEventMessage::class, - dev.inmo.tgbotapi.types.message.CommonGroupMessageImpl::class, - dev.inmo.tgbotapi.types.message.CommonMediaGroupMessage::class, - dev.inmo.tgbotapi.types.message.CommonSupergroupEventMessage::class, - dev.inmo.tgbotapi.types.message.FromChannelGroupMessageImpl::class, - dev.inmo.tgbotapi.types.message.PassportMessage::class, - dev.inmo.tgbotapi.types.message.PrivateMessageImpl::class, - dev.inmo.tgbotapi.types.message.abstracts.AnonymousGroupMessage::class, - dev.inmo.tgbotapi.types.message.abstracts.ChannelMessage::class, - dev.inmo.tgbotapi.types.message.abstracts.ChatEventMessage::class, - dev.inmo.tgbotapi.types.message.abstracts.CommonGroupMessage::class, - dev.inmo.tgbotapi.types.message.abstracts.CommonMessage::class, - dev.inmo.tgbotapi.types.message.abstracts.ContentMessage::class, - dev.inmo.tgbotapi.types.message.abstracts.FromChannelGroupMessage::class, - dev.inmo.tgbotapi.types.message.abstracts.GroupEventMessage::class, - dev.inmo.tgbotapi.types.message.abstracts.GroupMessage::class, - dev.inmo.tgbotapi.types.message.abstracts.MediaGroupMessage::class, - dev.inmo.tgbotapi.types.message.abstracts.PossiblyEditedMessage::class, - dev.inmo.tgbotapi.types.message.abstracts.PossiblyForwardedMessage::class, - dev.inmo.tgbotapi.types.message.abstracts.PossiblyPaymentMessage::class, - dev.inmo.tgbotapi.types.message.abstracts.PrivateMessage::class, - dev.inmo.tgbotapi.types.message.abstracts.PublicMessage::class, - dev.inmo.tgbotapi.types.message.abstracts.SignedMessage::class, - dev.inmo.tgbotapi.types.message.abstracts.SupergroupEventMessage::class, - dev.inmo.tgbotapi.types.message.abstracts.UnknownMessageType::class, - dev.inmo.tgbotapi.types.message.content.abstracts.PossiblySentViaBotCommonMessage::class) - result[dev.inmo.tgbotapi.types.passport.PassportElementError::class] = - setOf(dev.inmo.tgbotapi.types.passport.PassportElementErrorDataField::class, - dev.inmo.tgbotapi.types.passport.PassportElementErrorFile::class, - dev.inmo.tgbotapi.types.passport.PassportElementErrorFiles::class, - dev.inmo.tgbotapi.types.passport.PassportElementErrorFrontSide::class, - dev.inmo.tgbotapi.types.passport.PassportElementErrorReverseSide::class, - dev.inmo.tgbotapi.types.passport.PassportElementErrorSelfie::class, - dev.inmo.tgbotapi.types.passport.PassportElementErrorTranslationFile::class, - dev.inmo.tgbotapi.types.passport.PassportElementErrorTranslationFiles::class, - dev.inmo.tgbotapi.types.passport.PassportElementErrorUnspecified::class, - dev.inmo.tgbotapi.types.passport.PassportElementFileError::class, - dev.inmo.tgbotapi.types.passport.PassportElementFilesError::class, - dev.inmo.tgbotapi.types.passport.PassportMultipleElementsError::class, - dev.inmo.tgbotapi.types.passport.PassportSingleElementError::class, - dev.inmo.tgbotapi.types.passport.UnknownPassportElementError::class) - result[dev.inmo.tgbotapi.types.passport.encrypted_data.abstracts.EncryptedPassportElement::class] = setOf(dev.inmo.tgbotapi.types.passport.encrypted_data.BankStatement::class, - dev.inmo.tgbotapi.types.passport.encrypted_data.CommonPassport::class, - dev.inmo.tgbotapi.types.passport.encrypted_data.DriverLicense::class, - dev.inmo.tgbotapi.types.passport.encrypted_data.Email::class, - dev.inmo.tgbotapi.types.passport.encrypted_data.EncryptedAddress::class, - dev.inmo.tgbotapi.types.passport.encrypted_data.EncryptedPersonalDetails::class, - dev.inmo.tgbotapi.types.passport.encrypted_data.IdentityCard::class, - dev.inmo.tgbotapi.types.passport.encrypted_data.InternalPassport::class, - dev.inmo.tgbotapi.types.passport.encrypted_data.Passport::class, - dev.inmo.tgbotapi.types.passport.encrypted_data.PassportRegistration::class, - dev.inmo.tgbotapi.types.passport.encrypted_data.PhoneNumber::class, - dev.inmo.tgbotapi.types.passport.encrypted_data.RentalAgreement::class, - dev.inmo.tgbotapi.types.passport.encrypted_data.TemporaryRegistration::class, - dev.inmo.tgbotapi.types.passport.encrypted_data.TranslatableFilesCollection::class, - dev.inmo.tgbotapi.types.passport.encrypted_data.TranslatableIDDocument::class, - dev.inmo.tgbotapi.types.passport.encrypted_data.UtilityBill::class, - dev.inmo.tgbotapi.types.passport.encrypted_data.abstracts.FilesCollection::class, - dev.inmo.tgbotapi.types.passport.encrypted_data.abstracts.Translatable::class, - dev.inmo.tgbotapi.types.passport.encrypted_data.abstracts.UnknownEncryptedPassportElement::class, - dev.inmo.tgbotapi.types.passport.encrypted_data.abstracts.WithData::class, - dev.inmo.tgbotapi.types.passport.encrypted_data.abstracts.WithEmail::class, - dev.inmo.tgbotapi.types.passport.encrypted_data.abstracts.WithFrontSide::class, - dev.inmo.tgbotapi.types.passport.encrypted_data.abstracts.WithPhoneNumber::class, - dev.inmo.tgbotapi.types.passport.encrypted_data.abstracts.WithReverseSide::class, - dev.inmo.tgbotapi.types.passport.encrypted_data.abstracts.WithSelfie::class) + result[SecureValue::class] = setOf(dev.inmo.tgbotapi.types.passport.decrypted.AddressSecureValue::class, + dev.inmo.tgbotapi.types.passport.decrypted.BankStatementSecureValue::class, + dev.inmo.tgbotapi.types.passport.decrypted.CommonPassportSecureValue::class, + dev.inmo.tgbotapi.types.passport.decrypted.DriverLicenseSecureValue::class, + dev.inmo.tgbotapi.types.passport.decrypted.IdentityCardSecureValue::class, + dev.inmo.tgbotapi.types.passport.decrypted.IdentityWithReverseSideSecureValue::class, + dev.inmo.tgbotapi.types.passport.decrypted.InternalPassportSecureValue::class, + dev.inmo.tgbotapi.types.passport.decrypted.OtherDocumentsSecureValue::class, + dev.inmo.tgbotapi.types.passport.decrypted.PassportRegistrationSecureValue::class, + dev.inmo.tgbotapi.types.passport.decrypted.PassportSecureValue::class, + dev.inmo.tgbotapi.types.passport.decrypted.PersonalDetailsSecureValue::class, + dev.inmo.tgbotapi.types.passport.decrypted.RentalAgreementSecureValue::class, + dev.inmo.tgbotapi.types.passport.decrypted.TemporalRegistrationSecureValue::class, + dev.inmo.tgbotapi.types.passport.decrypted.UtilityBillSecureValue::class, + dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValueIdentity::class, + dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValueWithData::class, + dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValueWithFiles::class, + dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValueWithReverseSide::class, + dev.inmo.tgbotapi.types.passport.decrypted.abstracts.SecureValueWithTranslations::class) println("import dev.inmo.tgbotapi.utils.PreviewFeature") val importsToFuns = result.keys.flatMap { println("import ${it.qualifiedName}")