1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-21 15:53:47 +00:00

jvmApiDump

This commit is contained in:
InsanusMokrassar 2024-10-21 18:07:09 +06:00
parent 1f6ddd97e3
commit 2953005e6d
4 changed files with 64 additions and 0 deletions

View File

@ -20087,6 +20087,57 @@ public final class dev/inmo/tgbotapi/types/message/PrivateEventMessage : dev/inm
public fun toString ()Ljava/lang/String; public fun toString ()Ljava/lang/String;
} }
public final class dev/inmo/tgbotapi/types/message/RawMessageEntity {
public static final field Companion Ldev/inmo/tgbotapi/types/message/RawMessageEntity$Companion;
public synthetic fun <init> (Ljava/lang/String;IILjava/lang/String;Ldev/inmo/tgbotapi/types/chat/User;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public synthetic fun <init> (Ljava/lang/String;IILjava/lang/String;Ldev/inmo/tgbotapi/types/chat/User;Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ljava/lang/String;
public final fun component2 ()I
public final fun component3 ()I
public final fun component4 ()Ljava/lang/String;
public final fun component5 ()Ldev/inmo/tgbotapi/types/chat/User;
public final fun component6 ()Ljava/lang/String;
public final fun component7-GbmMWyQ ()Ljava/lang/String;
public final fun copy-SbQeJ6M (Ljava/lang/String;IILjava/lang/String;Ldev/inmo/tgbotapi/types/chat/User;Ljava/lang/String;Ljava/lang/String;)Ldev/inmo/tgbotapi/types/message/RawMessageEntity;
public static synthetic fun copy-SbQeJ6M$default (Ldev/inmo/tgbotapi/types/message/RawMessageEntity;Ljava/lang/String;IILjava/lang/String;Ldev/inmo/tgbotapi/types/chat/User;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Ldev/inmo/tgbotapi/types/message/RawMessageEntity;
public fun equals (Ljava/lang/Object;)Z
public final fun getCustom_emoji_id-GbmMWyQ ()Ljava/lang/String;
public final fun getLanguage ()Ljava/lang/String;
public final fun getLength ()I
public final fun getOffset ()I
public final fun getPriority ()I
public final fun getType ()Ljava/lang/String;
public final fun getUrl ()Ljava/lang/String;
public final fun getUser ()Ldev/inmo/tgbotapi/types/chat/User;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}
public synthetic class dev/inmo/tgbotapi/types/message/RawMessageEntity$$serializer : kotlinx/serialization/internal/GeneratedSerializer {
public static final field INSTANCE Ldev/inmo/tgbotapi/types/message/RawMessageEntity$$serializer;
public final fun childSerializers ()[Lkotlinx/serialization/KSerializer;
public final fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ldev/inmo/tgbotapi/types/message/RawMessageEntity;
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/message/RawMessageEntity;)V
public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V
public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer;
}
public final class dev/inmo/tgbotapi/types/message/RawMessageEntity$Companion {
public final fun serializer ()Lkotlinx/serialization/KSerializer;
}
public final class dev/inmo/tgbotapi/types/message/RawMessageEntityKt {
public static final fun asTextSource (Ldev/inmo/tgbotapi/types/message/RawMessageEntity;Ljava/lang/String;Ljava/util/List;)Ldev/inmo/tgbotapi/types/message/textsources/TextSource;
public static final fun asTextSources (Ljava/util/List;Ljava/lang/String;)Ljava/util/List;
public static final fun toRawMessageEntities (Ldev/inmo/tgbotapi/types/message/textsources/TextSource;I)Ljava/util/List;
public static final fun toRawMessageEntities (Ljava/util/List;)Ljava/util/List;
public static final fun toRawMessageEntities (Ljava/util/List;I)Ljava/util/List;
public static synthetic fun toRawMessageEntities$default (Ldev/inmo/tgbotapi/types/message/textsources/TextSource;IILjava/lang/Object;)Ljava/util/List;
public static synthetic fun toRawMessageEntities$default (Ljava/util/List;IILjava/lang/Object;)Ljava/util/List;
}
public final class dev/inmo/tgbotapi/types/message/UnconnectedFromChannelGroupContentMessageImpl : dev/inmo/tgbotapi/types/message/abstracts/UnconnectedFromChannelGroupContentMessage { public final class dev/inmo/tgbotapi/types/message/UnconnectedFromChannelGroupContentMessageImpl : dev/inmo/tgbotapi/types/message/abstracts/UnconnectedFromChannelGroupContentMessage {
public synthetic fun <init> (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 <init> (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 <init> (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 <init> (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

View File

@ -1,5 +1,6 @@
package dev.inmo.tgbotapi.bot.ktor.middlewares package dev.inmo.tgbotapi.bot.ktor.middlewares
import dev.inmo.micro_utils.common.Warning
import dev.inmo.tgbotapi.bot.ktor.KtorCallFactory import dev.inmo.tgbotapi.bot.ktor.KtorCallFactory
import dev.inmo.tgbotapi.bot.ktor.TelegramBotPipelinesHandler import dev.inmo.tgbotapi.bot.ktor.TelegramBotPipelinesHandler
import dev.inmo.tgbotapi.requests.abstracts.Request import dev.inmo.tgbotapi.requests.abstracts.Request
@ -20,6 +21,7 @@ import dev.inmo.tgbotapi.requests.abstracts.Request
* @param onRequestReturnResult Latest lambda before result returning. Will be called after all previous stages. * @param onRequestReturnResult Latest lambda before result returning. Will be called after all previous stages.
* Non-null result of lambda will be used as the result of request handling * Non-null result of lambda will be used as the result of request handling
*/ */
@Warning("This API is experimental and subject of changes")
class TelegramBotMiddleware( class TelegramBotMiddleware(
internal val onRequestException: (suspend (request: Request<*>, t: Throwable?) -> Any?)? = null, internal val onRequestException: (suspend (request: Request<*>, t: Throwable?) -> Any?)? = null,
internal val onBeforeSearchCallFactory: (suspend (request: Request<*>, callsFactories: List<KtorCallFactory>) -> Unit)? = null, internal val onBeforeSearchCallFactory: (suspend (request: Request<*>, callsFactories: List<KtorCallFactory>) -> Unit)? = null,
@ -75,6 +77,7 @@ class TelegramBotMiddleware(
} }
companion object { companion object {
@Warning("This API is experimental and subject of changes")
fun build(block: TelegramBotMiddlewareBuilder.() -> Unit): TelegramBotMiddleware = TelegramBotMiddlewareBuilder().apply(block).build() fun build(block: TelegramBotMiddlewareBuilder.() -> Unit): TelegramBotMiddleware = TelegramBotMiddlewareBuilder().apply(block).build()
} }
} }

View File

@ -1,9 +1,11 @@
package dev.inmo.tgbotapi.bot.ktor.middlewares package dev.inmo.tgbotapi.bot.ktor.middlewares
import dev.inmo.micro_utils.common.Warning
import dev.inmo.tgbotapi.bot.ktor.KtorCallFactory import dev.inmo.tgbotapi.bot.ktor.KtorCallFactory
import dev.inmo.tgbotapi.bot.ktor.TelegramBotPipelinesHandler import dev.inmo.tgbotapi.bot.ktor.TelegramBotPipelinesHandler
import dev.inmo.tgbotapi.requests.abstracts.Request import dev.inmo.tgbotapi.requests.abstracts.Request
@Warning("This API is experimental and subject of changes")
class TelegramBotMiddlewareBuilder { class TelegramBotMiddlewareBuilder {
var onRequestException: (suspend (request: Request<*>, t: Throwable?) -> Any?)? = null var onRequestException: (suspend (request: Request<*>, t: Throwable?) -> Any?)? = null
var onBeforeSearchCallFactory: (suspend (request: Request<*>, callsFactories: List<KtorCallFactory>) -> Unit)? = null var onBeforeSearchCallFactory: (suspend (request: Request<*>, callsFactories: List<KtorCallFactory>) -> Unit)? = null
@ -56,6 +58,7 @@ class TelegramBotMiddlewareBuilder {
onRequestReturnResult = block onRequestReturnResult = block
} }
@Warning("This API is experimental and subject of changes")
fun build(): TelegramBotMiddleware { fun build(): TelegramBotMiddleware {
return TelegramBotMiddleware( return TelegramBotMiddleware(
onRequestException = onRequestException, onRequestException = onRequestException,
@ -69,6 +72,7 @@ class TelegramBotMiddlewareBuilder {
} }
companion object { companion object {
@Warning("This API is experimental and subject of changes")
fun from(middleware: TelegramBotMiddleware, additionalSetup: TelegramBotMiddlewareBuilder.() -> Unit): TelegramBotMiddleware { fun from(middleware: TelegramBotMiddleware, additionalSetup: TelegramBotMiddlewareBuilder.() -> Unit): TelegramBotMiddleware {
return TelegramBotMiddlewareBuilder().apply { return TelegramBotMiddlewareBuilder().apply {
onRequestException = middleware.onRequestException onRequestException = middleware.onRequestException

View File

@ -1,9 +1,11 @@
package dev.inmo.tgbotapi.bot.ktor.middlewares package dev.inmo.tgbotapi.bot.ktor.middlewares
import dev.inmo.micro_utils.common.Warning
import dev.inmo.tgbotapi.bot.ktor.KtorCallFactory import dev.inmo.tgbotapi.bot.ktor.KtorCallFactory
import dev.inmo.tgbotapi.bot.ktor.TelegramBotPipelinesHandler import dev.inmo.tgbotapi.bot.ktor.TelegramBotPipelinesHandler
import dev.inmo.tgbotapi.requests.abstracts.Request import dev.inmo.tgbotapi.requests.abstracts.Request
@Warning("This API is experimental and subject of changes")
class TelegramBotMiddlewaresPipelinesHandler( class TelegramBotMiddlewaresPipelinesHandler(
private val middlewares: List<TelegramBotMiddleware> private val middlewares: List<TelegramBotMiddleware>
) : TelegramBotPipelinesHandler { ) : TelegramBotPipelinesHandler {
@ -68,19 +70,23 @@ class TelegramBotMiddlewaresPipelinesHandler(
} ?: super.onRequestReturnResult(result, request, callsFactories) } ?: super.onRequestReturnResult(result, request, callsFactories)
} }
@Warning("This API is experimental and subject of changes")
class Builder { class Builder {
val middlewares = mutableListOf<TelegramBotMiddleware>() val middlewares = mutableListOf<TelegramBotMiddleware>()
@Warning("This API is experimental and subject of changes")
fun addMiddleware(block: TelegramBotMiddlewareBuilder.() -> Unit) = middlewares.add( fun addMiddleware(block: TelegramBotMiddlewareBuilder.() -> Unit) = middlewares.add(
TelegramBotMiddleware.build(block) TelegramBotMiddleware.build(block)
) )
@Warning("This API is experimental and subject of changes")
fun build(): TelegramBotMiddlewaresPipelinesHandler = TelegramBotMiddlewaresPipelinesHandler( fun build(): TelegramBotMiddlewaresPipelinesHandler = TelegramBotMiddlewaresPipelinesHandler(
middlewares.toList() middlewares.toList()
) )
} }
companion object { companion object {
@Warning("This API is experimental and subject of changes")
fun build(block: Builder.() -> Unit) = Builder().apply(block).build() fun build(block: Builder.() -> Unit) = Builder().apply(block).build()
} }
} }