mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-12-02 20:35:43 +00:00
ShippingQueryId is value class now
This commit is contained in:
@@ -13,7 +13,7 @@ import kotlinx.serialization.builtins.serializer
|
||||
@Serializable
|
||||
data class AnswerInlineQuery(
|
||||
@SerialName(inlineQueryIdField)
|
||||
val inlineQueryID: InlineQueryIdentifier,
|
||||
val inlineQueryID: InlineQueryId,
|
||||
@Serializable(InlineQueryAnswersResultsSerializer::class)
|
||||
@SerialName(resultsField)
|
||||
val results: List<InlineQueryResult> = emptyList(),
|
||||
@@ -27,7 +27,7 @@ data class AnswerInlineQuery(
|
||||
val button: InlineQueryResultsButton? = null,
|
||||
) : SimpleRequest<Boolean> {
|
||||
constructor(
|
||||
inlineQueryID: InlineQueryIdentifier,
|
||||
inlineQueryID: InlineQueryId,
|
||||
results: List<InlineQueryResult> = emptyList(),
|
||||
cachedTime: Int? = null,
|
||||
isPersonal: Boolean? = null,
|
||||
|
||||
@@ -11,7 +11,7 @@ import kotlinx.serialization.builtins.ListSerializer
|
||||
@Serializable
|
||||
data class AnswerShippingQueryOk(
|
||||
@SerialName(shippingQueryIdField)
|
||||
override val shippingQueryId: ShippingQueryIdentifier,
|
||||
override val shippingQueryId: ShippingQueryId,
|
||||
@Serializable(ShippingOptionsSerializer::class)
|
||||
@SerialName(shippingOptionsField)
|
||||
val shippingOptions: List<ShippingOption>
|
||||
@@ -30,7 +30,7 @@ object ShippingOptionsSerializer : KSerializer<List<ShippingOption>> by ListSeri
|
||||
@Serializable
|
||||
data class AnswerShippingQueryError(
|
||||
@SerialName(shippingQueryIdField)
|
||||
override val shippingQueryId: ShippingQueryIdentifier,
|
||||
override val shippingQueryId: ShippingQueryId,
|
||||
@SerialName(errorMessageField)
|
||||
val error: String
|
||||
) : AnswerShippingQuery {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package dev.inmo.tgbotapi.requests.answers.payments.abstracts
|
||||
|
||||
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
|
||||
import dev.inmo.tgbotapi.types.ShippingQueryIdentifier
|
||||
import dev.inmo.tgbotapi.types.ShippingQueryId
|
||||
import kotlinx.serialization.DeserializationStrategy
|
||||
import kotlinx.serialization.builtins.serializer
|
||||
|
||||
@@ -10,6 +10,6 @@ interface AnswerShippingQuery : SimpleRequest<Boolean> {
|
||||
override val resultDeserializer: DeserializationStrategy<Boolean>
|
||||
get() = Boolean.serializer()
|
||||
|
||||
val shippingQueryId: ShippingQueryIdentifier
|
||||
val shippingQueryId: ShippingQueryId
|
||||
val isOk: Boolean
|
||||
}
|
||||
@@ -14,7 +14,6 @@ typealias ForwardSignature = String
|
||||
typealias ForwardSenderName = String
|
||||
typealias AuthorSignature = ForwardSignature
|
||||
typealias PaymentQueryIdentifier = String
|
||||
typealias ShippingQueryIdentifier = String
|
||||
typealias InvoicePayload = String
|
||||
typealias ShippingOptionIdentifier = String
|
||||
typealias StartParameter = String
|
||||
|
||||
@@ -7,7 +7,7 @@ import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class BaseChosenInlineResult(
|
||||
override val resultId: InlineQueryIdentifier,
|
||||
override val resultId: InlineQueryId,
|
||||
@SerialName(fromField)
|
||||
override val from: User,
|
||||
override val inlineMessageId: InlineMessageId?,
|
||||
|
||||
@@ -2,10 +2,10 @@ package dev.inmo.tgbotapi.types.InlineQueries.ChosenInlineResult
|
||||
|
||||
import dev.inmo.tgbotapi.abstracts.FromUser
|
||||
import dev.inmo.tgbotapi.types.InlineMessageId
|
||||
import dev.inmo.tgbotapi.types.InlineQueryIdentifier
|
||||
import dev.inmo.tgbotapi.types.InlineQueryId
|
||||
|
||||
sealed interface ChosenInlineResult : FromUser {
|
||||
val resultId: InlineQueryIdentifier //chosen temporary, can be changed
|
||||
val resultId: InlineQueryId //chosen temporary, can be changed
|
||||
val inlineMessageId: InlineMessageId?
|
||||
val query: String
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class LocationChosenInlineResult(
|
||||
override val resultId: InlineQueryIdentifier,
|
||||
override val resultId: InlineQueryId,
|
||||
@SerialName(fromField)
|
||||
override val from: User,
|
||||
val location: StaticLocation,
|
||||
|
||||
@@ -9,7 +9,7 @@ import kotlinx.serialization.Serializable
|
||||
@Serializable
|
||||
internal data class RawChosenInlineResult(
|
||||
@SerialName(resultIdField)
|
||||
val resultId: InlineQueryIdentifier, //chosen temporary, can be changed
|
||||
val resultId: InlineQueryId, //chosen temporary, can be changed
|
||||
@SerialName(fromField)
|
||||
val user: User,
|
||||
@SerialName(queryField)
|
||||
|
||||
@@ -10,7 +10,7 @@ import kotlinx.serialization.Serializable
|
||||
@Serializable
|
||||
class InlineQueryResultArticle(
|
||||
@SerialName(idField)
|
||||
override val id: InlineQueryIdentifier,
|
||||
override val id: InlineQueryId,
|
||||
@SerialName(titleField)
|
||||
override val title: String,
|
||||
@SerialName(inputMessageContentField)
|
||||
|
||||
@@ -17,7 +17,7 @@ import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
fun InlineQueryResultAudioCachedImpl(
|
||||
id: InlineQueryIdentifier,
|
||||
id: InlineQueryId,
|
||||
fileId: FileId,
|
||||
text: String? = null,
|
||||
parseMode: ParseMode? = null,
|
||||
@@ -26,7 +26,7 @@ fun InlineQueryResultAudioCachedImpl(
|
||||
) = InlineQueryResultAudioCachedImpl(id, fileId, text, parseMode, null, replyMarkup, inputMessageContent)
|
||||
|
||||
fun InlineQueryResultAudioCachedImpl(
|
||||
id: InlineQueryIdentifier,
|
||||
id: InlineQueryId,
|
||||
fileId: FileId,
|
||||
entities: TextSourcesList,
|
||||
replyMarkup: InlineKeyboardMarkup? = null,
|
||||
@@ -44,7 +44,7 @@ fun InlineQueryResultAudioCachedImpl(
|
||||
@Serializable
|
||||
data class InlineQueryResultAudioCachedImpl internal constructor(
|
||||
@SerialName(idField)
|
||||
override val id: InlineQueryIdentifier,
|
||||
override val id: InlineQueryId,
|
||||
@SerialName(audioFileIdField)
|
||||
override val fileId: FileId,
|
||||
@SerialName(captionField)
|
||||
|
||||
@@ -16,7 +16,7 @@ import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
fun InlineQueryResultAudioImpl(
|
||||
id: InlineQueryIdentifier,
|
||||
id: InlineQueryId,
|
||||
url: String,
|
||||
title: String,
|
||||
performer: String? = null,
|
||||
@@ -28,7 +28,7 @@ fun InlineQueryResultAudioImpl(
|
||||
) = InlineQueryResultAudioImpl(id, url, title, performer, duration, text, parseMode, null, replyMarkup, inputMessageContent)
|
||||
|
||||
fun InlineQueryResultAudioImpl(
|
||||
id: InlineQueryIdentifier,
|
||||
id: InlineQueryId,
|
||||
url: String,
|
||||
title: String,
|
||||
performer: String? = null,
|
||||
@@ -52,7 +52,7 @@ fun InlineQueryResultAudioImpl(
|
||||
@Serializable
|
||||
data class InlineQueryResultAudioImpl internal constructor(
|
||||
@SerialName(idField)
|
||||
override val id: InlineQueryIdentifier,
|
||||
override val id: InlineQueryId,
|
||||
@SerialName(audioUrlField)
|
||||
override val url: String,
|
||||
@SerialName(titleField)
|
||||
|
||||
@@ -11,7 +11,7 @@ import kotlinx.serialization.Serializable
|
||||
@Serializable
|
||||
data class InlineQueryResultContact(
|
||||
@SerialName(idField)
|
||||
override val id: InlineQueryIdentifier,
|
||||
override val id: InlineQueryId,
|
||||
@SerialName(phoneNumberField)
|
||||
override val phoneNumber: String,
|
||||
@SerialName(firstNameField)
|
||||
|
||||
@@ -17,7 +17,7 @@ import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
fun InlineQueryResultDocumentCachedImpl(
|
||||
id: InlineQueryIdentifier,
|
||||
id: InlineQueryId,
|
||||
fileId: FileId,
|
||||
title: String,
|
||||
description: String? = null,
|
||||
@@ -28,7 +28,7 @@ fun InlineQueryResultDocumentCachedImpl(
|
||||
) = InlineQueryResultDocumentCachedImpl(id, fileId, title, description, text, parseMode, null, replyMarkup, inputMessageContent)
|
||||
|
||||
fun InlineQueryResultDocumentCachedImpl(
|
||||
id: InlineQueryIdentifier,
|
||||
id: InlineQueryId,
|
||||
fileId: FileId,
|
||||
title: String,
|
||||
description: String? = null,
|
||||
@@ -50,7 +50,7 @@ fun InlineQueryResultDocumentCachedImpl(
|
||||
@Serializable
|
||||
data class InlineQueryResultDocumentCachedImpl internal constructor(
|
||||
@SerialName(idField)
|
||||
override val id: InlineQueryIdentifier,
|
||||
override val id: InlineQueryId,
|
||||
@SerialName(documentFileIdField)
|
||||
override val fileId: FileId,
|
||||
@SerialName(titleField)
|
||||
|
||||
@@ -17,7 +17,7 @@ import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
fun InlineQueryResultDocumentImpl(
|
||||
id: InlineQueryIdentifier,
|
||||
id: InlineQueryId,
|
||||
url: String,
|
||||
title: String,
|
||||
mimeType: MimeType,
|
||||
@@ -32,7 +32,7 @@ fun InlineQueryResultDocumentImpl(
|
||||
) = InlineQueryResultDocumentImpl(id, url, title, mimeType, thumbnailUrl, thumbnailWidth, thumbnailHeight, description, text, parseMode, null, replyMarkup, inputMessageContent)
|
||||
|
||||
fun InlineQueryResultDocumentImpl(
|
||||
id: InlineQueryIdentifier,
|
||||
id: InlineQueryId,
|
||||
url: String,
|
||||
title: String,
|
||||
mimeType: MimeType,
|
||||
@@ -62,7 +62,7 @@ fun InlineQueryResultDocumentImpl(
|
||||
@Serializable
|
||||
data class InlineQueryResultDocumentImpl internal constructor(
|
||||
@SerialName(idField)
|
||||
override val id: InlineQueryIdentifier,
|
||||
override val id: InlineQueryId,
|
||||
@SerialName(documentUrlField)
|
||||
override val url: String,
|
||||
@SerialName(titleField)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult
|
||||
|
||||
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.InlineQueryResult
|
||||
import dev.inmo.tgbotapi.types.InlineQueryIdentifier
|
||||
import dev.inmo.tgbotapi.types.InlineQueryId
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.gameShortNameField
|
||||
import kotlinx.serialization.SerialName
|
||||
@@ -9,7 +9,7 @@ import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
class InlineQueryResultGame(
|
||||
override val id: InlineQueryIdentifier,
|
||||
override val id: InlineQueryId,
|
||||
@SerialName(gameShortNameField)
|
||||
val gameShortName: String,
|
||||
override val replyMarkup: InlineKeyboardMarkup? = null
|
||||
|
||||
@@ -17,7 +17,7 @@ import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
fun InlineQueryResultGifCachedImpl(
|
||||
id: InlineQueryIdentifier,
|
||||
id: InlineQueryId,
|
||||
fileId: FileId,
|
||||
title: String? = null,
|
||||
text: String? = null,
|
||||
@@ -27,7 +27,7 @@ fun InlineQueryResultGifCachedImpl(
|
||||
) = InlineQueryResultGifCachedImpl(id, fileId, title, text, parseMode, null, replyMarkup, inputMessageContent)
|
||||
|
||||
fun InlineQueryResultGifCachedImpl(
|
||||
id: InlineQueryIdentifier,
|
||||
id: InlineQueryId,
|
||||
fileId: FileId,
|
||||
title: String? = null,
|
||||
entities: TextSourcesList,
|
||||
@@ -47,7 +47,7 @@ fun InlineQueryResultGifCachedImpl(
|
||||
@Serializable
|
||||
data class InlineQueryResultGifCachedImpl internal constructor(
|
||||
@SerialName(idField)
|
||||
override val id: InlineQueryIdentifier,
|
||||
override val id: InlineQueryId,
|
||||
@SerialName(gifFileIdField)
|
||||
override val fileId: FileId,
|
||||
@SerialName(titleField)
|
||||
|
||||
@@ -18,7 +18,7 @@ import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
fun InlineQueryResultGifImpl(
|
||||
id: InlineQueryIdentifier,
|
||||
id: InlineQueryId,
|
||||
url: String,
|
||||
thumbnailUrl: String,
|
||||
thumbnailMimeType: MimeType? = null,
|
||||
@@ -33,7 +33,7 @@ fun InlineQueryResultGifImpl(
|
||||
) = InlineQueryResultGifImpl(id, url, thumbnailUrl, thumbnailMimeType, width, height, duration, title, text, parseMode, null, replyMarkup, inputMessageContent)
|
||||
|
||||
fun InlineQueryResultGifImpl(
|
||||
id: InlineQueryIdentifier,
|
||||
id: InlineQueryId,
|
||||
url: String,
|
||||
thumbnailUrl: String,
|
||||
thumbnailMimeType: MimeType? = null,
|
||||
@@ -61,7 +61,7 @@ fun InlineQueryResultGifImpl(
|
||||
)
|
||||
|
||||
fun InlineQueryResultGifImpl(
|
||||
id: InlineQueryIdentifier,
|
||||
id: InlineQueryId,
|
||||
gifFile: FileId,
|
||||
thumbnailUrl: String,
|
||||
thumbnailMimeType: MimeType? = null,
|
||||
@@ -76,7 +76,7 @@ fun InlineQueryResultGifImpl(
|
||||
) = InlineQueryResultGifImpl(id, gifFile.fileId, thumbnailUrl, thumbnailMimeType, width, height, duration, title, text, parseMode, replyMarkup, inputMessageContent)
|
||||
|
||||
fun InlineQueryResultGifImpl(
|
||||
id: InlineQueryIdentifier,
|
||||
id: InlineQueryId,
|
||||
gifFile: FileId,
|
||||
thumbnailUrl: String,
|
||||
thumbnailMimeType: MimeType? = null,
|
||||
@@ -94,7 +94,7 @@ fun InlineQueryResultGifImpl(
|
||||
@Serializable
|
||||
data class InlineQueryResultGifImpl internal constructor(
|
||||
@SerialName(idField)
|
||||
override val id: InlineQueryIdentifier,
|
||||
override val id: InlineQueryId,
|
||||
@SerialName(gifUrlField)
|
||||
override val url: String,
|
||||
@SerialName(thumbnailUrlField)
|
||||
|
||||
@@ -11,7 +11,7 @@ import kotlinx.serialization.Serializable
|
||||
@Serializable
|
||||
data class InlineQueryResultLocation(
|
||||
@SerialName(idField)
|
||||
override val id: InlineQueryIdentifier,
|
||||
override val id: InlineQueryId,
|
||||
@SerialName(latitudeField)
|
||||
override val latitude: Double,
|
||||
@SerialName(longitudeField)
|
||||
|
||||
@@ -17,7 +17,7 @@ import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
fun InlineQueryResultMpeg4GifCachedImpl(
|
||||
id: InlineQueryIdentifier,
|
||||
id: InlineQueryId,
|
||||
fileId: FileId,
|
||||
title: String? = null,
|
||||
text: String? = null,
|
||||
@@ -27,7 +27,7 @@ fun InlineQueryResultMpeg4GifCachedImpl(
|
||||
) = InlineQueryResultMpeg4GifCachedImpl(id, fileId, title, text, parseMode, null, replyMarkup, inputMessageContent)
|
||||
|
||||
fun InlineQueryResultMpeg4GifCachedImpl(
|
||||
id: InlineQueryIdentifier,
|
||||
id: InlineQueryId,
|
||||
fileId: FileId,
|
||||
title: String? = null,
|
||||
entities: TextSourcesList,
|
||||
@@ -47,7 +47,7 @@ fun InlineQueryResultMpeg4GifCachedImpl(
|
||||
@Serializable
|
||||
data class InlineQueryResultMpeg4GifCachedImpl internal constructor(
|
||||
@SerialName(idField)
|
||||
override val id: InlineQueryIdentifier,
|
||||
override val id: InlineQueryId,
|
||||
@SerialName(mpeg4GifFileIdField)
|
||||
override val fileId: FileId,
|
||||
@SerialName(titleField)
|
||||
|
||||
@@ -17,7 +17,7 @@ import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
fun InlineQueryResultMpeg4GifImpl(
|
||||
id: InlineQueryIdentifier,
|
||||
id: InlineQueryId,
|
||||
url: String,
|
||||
thumbnailUrl: String,
|
||||
thumbnailMimeType: MimeType? = null,
|
||||
@@ -32,7 +32,7 @@ fun InlineQueryResultMpeg4GifImpl(
|
||||
) = InlineQueryResultMpeg4GifImpl(id, url, thumbnailUrl, thumbnailMimeType, width, height, duration, title, text, parseMode, null, replyMarkup, inputMessageContent)
|
||||
|
||||
fun InlineQueryResultMpeg4GifImpl(
|
||||
id: InlineQueryIdentifier,
|
||||
id: InlineQueryId,
|
||||
url: String,
|
||||
thumbnailUrl: String,
|
||||
thumbnailMimeType: MimeType? = null,
|
||||
@@ -62,7 +62,7 @@ fun InlineQueryResultMpeg4GifImpl(
|
||||
@Serializable
|
||||
data class InlineQueryResultMpeg4GifImpl internal constructor(
|
||||
@SerialName(idField)
|
||||
override val id: InlineQueryIdentifier,
|
||||
override val id: InlineQueryId,
|
||||
@SerialName(mpeg4GifUrlField)
|
||||
override val url: String,
|
||||
@SerialName(thumbnailUrlField)
|
||||
|
||||
@@ -17,7 +17,7 @@ import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
fun InlineQueryResultPhotoCachedImpl(
|
||||
id: InlineQueryIdentifier,
|
||||
id: InlineQueryId,
|
||||
fileId: FileId,
|
||||
title: String? = null,
|
||||
description: String? = null,
|
||||
@@ -28,7 +28,7 @@ fun InlineQueryResultPhotoCachedImpl(
|
||||
) = InlineQueryResultPhotoCachedImpl(id, fileId, title, description, text, parseMode, null, replyMarkup, inputMessageContent)
|
||||
|
||||
fun InlineQueryResultPhotoCachedImpl(
|
||||
id: InlineQueryIdentifier,
|
||||
id: InlineQueryId,
|
||||
fileId: FileId,
|
||||
title: String? = null,
|
||||
description: String? = null,
|
||||
@@ -50,7 +50,7 @@ fun InlineQueryResultPhotoCachedImpl(
|
||||
@Serializable
|
||||
data class InlineQueryResultPhotoCachedImpl internal constructor(
|
||||
@SerialName(idField)
|
||||
override val id: InlineQueryIdentifier,
|
||||
override val id: InlineQueryId,
|
||||
@SerialName(photoFileIdField)
|
||||
override val fileId: FileId,
|
||||
@SerialName(titleField)
|
||||
|
||||
@@ -16,7 +16,7 @@ import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
fun InlineQueryResultPhotoImpl(
|
||||
id: InlineQueryIdentifier,
|
||||
id: InlineQueryId,
|
||||
url: String,
|
||||
thumbnailUrl: String,
|
||||
width: Int? = null,
|
||||
@@ -30,7 +30,7 @@ fun InlineQueryResultPhotoImpl(
|
||||
) = InlineQueryResultPhotoImpl(id, url, thumbnailUrl, width, height, title, description, text, parseMode, null, replyMarkup, inputMessageContent)
|
||||
|
||||
fun InlineQueryResultPhotoImpl(
|
||||
id: InlineQueryIdentifier,
|
||||
id: InlineQueryId,
|
||||
url: String,
|
||||
thumbnailUrl: String,
|
||||
width: Int? = null,
|
||||
@@ -58,7 +58,7 @@ fun InlineQueryResultPhotoImpl(
|
||||
@Serializable
|
||||
data class InlineQueryResultPhotoImpl internal constructor(
|
||||
@SerialName(idField)
|
||||
override val id: InlineQueryIdentifier,
|
||||
override val id: InlineQueryId,
|
||||
@SerialName(photoUrlField)
|
||||
override val url: String,
|
||||
@SerialName(thumbnailUrlField)
|
||||
|
||||
@@ -11,7 +11,7 @@ import kotlinx.serialization.Serializable
|
||||
@Serializable
|
||||
data class InlineQueryResultStickerCached(
|
||||
@SerialName(idField)
|
||||
override val id: InlineQueryIdentifier,
|
||||
override val id: InlineQueryId,
|
||||
@SerialName(stickerFileIdField)
|
||||
override val fileId: FileId,
|
||||
@SerialName(replyMarkupField)
|
||||
|
||||
@@ -12,7 +12,7 @@ import kotlinx.serialization.Serializable
|
||||
@Serializable
|
||||
data class InlineQueryResultVenue(
|
||||
@SerialName(idField)
|
||||
override val id: InlineQueryIdentifier,
|
||||
override val id: InlineQueryId,
|
||||
@SerialName(latitudeField)
|
||||
override val latitude: Double,
|
||||
@SerialName(longitudeField)
|
||||
|
||||
@@ -17,7 +17,7 @@ import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
fun InlineQueryResultVideoCachedImpl(
|
||||
id: InlineQueryIdentifier,
|
||||
id: InlineQueryId,
|
||||
fileId: FileId,
|
||||
title: String,
|
||||
description: String? = null,
|
||||
@@ -28,7 +28,7 @@ fun InlineQueryResultVideoCachedImpl(
|
||||
) = InlineQueryResultVideoCachedImpl(id, fileId, title, description, text, parseMode, null, replyMarkup, inputMessageContent)
|
||||
|
||||
fun InlineQueryResultVideoCachedImpl(
|
||||
id: InlineQueryIdentifier,
|
||||
id: InlineQueryId,
|
||||
fileId: FileId,
|
||||
title: String,
|
||||
description: String? = null,
|
||||
@@ -50,7 +50,7 @@ fun InlineQueryResultVideoCachedImpl(
|
||||
@Serializable
|
||||
data class InlineQueryResultVideoCachedImpl internal constructor(
|
||||
@SerialName(idField)
|
||||
override val id: InlineQueryIdentifier,
|
||||
override val id: InlineQueryId,
|
||||
@SerialName(videoFileIdField)
|
||||
override val fileId: FileId,
|
||||
@SerialName(titleField)
|
||||
|
||||
@@ -17,7 +17,7 @@ import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
fun InlineQueryResultVideoImpl(
|
||||
id: InlineQueryIdentifier,
|
||||
id: InlineQueryId,
|
||||
url: String,
|
||||
thumbnailUrl: String,
|
||||
mimeType: MimeType,
|
||||
@@ -33,7 +33,7 @@ fun InlineQueryResultVideoImpl(
|
||||
) = InlineQueryResultVideoImpl(id, url, thumbnailUrl, mimeType, title, width, height, duration, description, text, parseMode, null, replyMarkup, inputMessageContent)
|
||||
|
||||
fun InlineQueryResultVideoImpl(
|
||||
id: InlineQueryIdentifier,
|
||||
id: InlineQueryId,
|
||||
url: String,
|
||||
thumbnailUrl: String,
|
||||
mimeType: MimeType,
|
||||
@@ -65,7 +65,7 @@ fun InlineQueryResultVideoImpl(
|
||||
@Serializable
|
||||
data class InlineQueryResultVideoImpl internal constructor(
|
||||
@SerialName(idField)
|
||||
override val id: InlineQueryIdentifier,
|
||||
override val id: InlineQueryId,
|
||||
@SerialName(videoUrlField)
|
||||
override val url: String,
|
||||
@SerialName(thumbnailUrlField)
|
||||
|
||||
@@ -17,7 +17,7 @@ import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
fun InlineQueryResultVoiceCachedImpl(
|
||||
id: InlineQueryIdentifier,
|
||||
id: InlineQueryId,
|
||||
fileId: FileId,
|
||||
title: String,
|
||||
text: String? = null,
|
||||
@@ -27,7 +27,7 @@ fun InlineQueryResultVoiceCachedImpl(
|
||||
) = InlineQueryResultVoiceCachedImpl(id, fileId, title, text, parseMode, null, replyMarkup, inputMessageContent)
|
||||
|
||||
fun InlineQueryResultVoiceCachedImpl(
|
||||
id: InlineQueryIdentifier,
|
||||
id: InlineQueryId,
|
||||
fileId: FileId,
|
||||
title: String,
|
||||
entities: TextSourcesList,
|
||||
@@ -47,7 +47,7 @@ fun InlineQueryResultVoiceCachedImpl(
|
||||
@Serializable
|
||||
data class InlineQueryResultVoiceCachedImpl internal constructor(
|
||||
@SerialName(idField)
|
||||
override val id: InlineQueryIdentifier,
|
||||
override val id: InlineQueryId,
|
||||
@SerialName(voiceFileIdField)
|
||||
override val fileId: FileId,
|
||||
@SerialName(titleField)
|
||||
|
||||
@@ -16,7 +16,7 @@ import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
fun InlineQueryResultVoiceImpl(
|
||||
id: InlineQueryIdentifier,
|
||||
id: InlineQueryId,
|
||||
url: String,
|
||||
title: String,
|
||||
duration: Int? = null,
|
||||
@@ -37,7 +37,7 @@ fun InlineQueryResultVoiceImpl(
|
||||
)
|
||||
|
||||
fun InlineQueryResultVoiceImpl(
|
||||
id: InlineQueryIdentifier,
|
||||
id: InlineQueryId,
|
||||
url: String,
|
||||
title: String,
|
||||
duration: Int? = null,
|
||||
@@ -59,7 +59,7 @@ fun InlineQueryResultVoiceImpl(
|
||||
@Serializable
|
||||
data class InlineQueryResultVoiceImpl internal constructor(
|
||||
@SerialName(idField)
|
||||
override val id: InlineQueryIdentifier,
|
||||
override val id: InlineQueryId,
|
||||
@SerialName(voiceUrlField)
|
||||
override val url: String,
|
||||
@SerialName(titleField)
|
||||
|
||||
@@ -2,7 +2,7 @@ package dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts
|
||||
|
||||
import dev.inmo.tgbotapi.utils.internal.ClassCastsIncluded
|
||||
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.serializers.InlineQueryResultSerializer
|
||||
import dev.inmo.tgbotapi.types.InlineQueryIdentifier
|
||||
import dev.inmo.tgbotapi.types.InlineQueryId
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@@ -10,6 +10,6 @@ import kotlinx.serialization.Serializable
|
||||
@ClassCastsIncluded(excludeRegex = ".*Impl")
|
||||
interface InlineQueryResult {
|
||||
val type: String
|
||||
val id: InlineQueryIdentifier
|
||||
val id: InlineQueryId
|
||||
val replyMarkup: InlineKeyboardMarkup?
|
||||
}
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
package dev.inmo.tgbotapi.types.InlineQueries.query
|
||||
|
||||
import dev.inmo.tgbotapi.types.InlineQueryIdentifier
|
||||
import dev.inmo.tgbotapi.types.chat.User
|
||||
import dev.inmo.tgbotapi.types.InlineQueryId
|
||||
import dev.inmo.tgbotapi.types.chat.ChatType
|
||||
import dev.inmo.tgbotapi.types.chat.CommonUser
|
||||
|
||||
data class BaseInlineQuery(
|
||||
override val id: InlineQueryIdentifier,
|
||||
override val id: InlineQueryId,
|
||||
override val from: CommonUser,
|
||||
override val query: String,
|
||||
override val offset: String,
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
package dev.inmo.tgbotapi.types.InlineQueries.query
|
||||
|
||||
import dev.inmo.tgbotapi.abstracts.FromUser
|
||||
import dev.inmo.tgbotapi.types.InlineQueryIdentifier
|
||||
import dev.inmo.tgbotapi.types.InlineQueryId
|
||||
import dev.inmo.tgbotapi.types.chat.ChatType
|
||||
import dev.inmo.tgbotapi.types.chat.CommonUser
|
||||
import dev.inmo.tgbotapi.types.chat.User
|
||||
|
||||
sealed interface InlineQuery : FromUser {
|
||||
val id: InlineQueryIdentifier
|
||||
val id: InlineQueryId
|
||||
val query: String
|
||||
val offset: String
|
||||
val chatType: ChatType?
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
package dev.inmo.tgbotapi.types.InlineQueries.query
|
||||
|
||||
import dev.inmo.tgbotapi.types.InlineQueryIdentifier
|
||||
import dev.inmo.tgbotapi.types.chat.User
|
||||
import dev.inmo.tgbotapi.types.InlineQueryId
|
||||
import dev.inmo.tgbotapi.types.chat.ChatType
|
||||
import dev.inmo.tgbotapi.types.chat.CommonUser
|
||||
import dev.inmo.tgbotapi.types.location.Location
|
||||
|
||||
data class LocationInlineQuery(
|
||||
override val id: InlineQueryIdentifier,
|
||||
override val id: InlineQueryId,
|
||||
override val from: CommonUser,
|
||||
override val query: String,
|
||||
override val offset: String,
|
||||
|
||||
@@ -2,7 +2,6 @@ package dev.inmo.tgbotapi.types.InlineQueries.query
|
||||
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.chat.*
|
||||
import dev.inmo.tgbotapi.types.chat.User
|
||||
import dev.inmo.tgbotapi.types.location.Location
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
@@ -10,7 +9,7 @@ import kotlinx.serialization.Serializable
|
||||
@Serializable
|
||||
internal data class RawInlineQuery(
|
||||
@SerialName(idField)
|
||||
val id: InlineQueryIdentifier,
|
||||
val id: InlineQueryId,
|
||||
@SerialName(fromField)
|
||||
val from: CommonUser,
|
||||
@SerialName(queryField)
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package dev.inmo.tgbotapi.types
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlin.jvm.JvmInline
|
||||
|
||||
@Serializable
|
||||
@JvmInline
|
||||
value class InlineQueryId(
|
||||
val string: String
|
||||
)
|
||||
|
||||
@Deprecated("Renamed", ReplaceWith("InlineQueryId", "dev.inmo.tgbotapi.types.InlineQueryId"))
|
||||
typealias InlineQueryIdentifier = InlineQueryId
|
||||
@@ -1,10 +0,0 @@
|
||||
package dev.inmo.tgbotapi.types
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlin.jvm.JvmInline
|
||||
|
||||
@Serializable
|
||||
@JvmInline
|
||||
value class InlineQueryIdentifier(
|
||||
val string: String
|
||||
)
|
||||
@@ -0,0 +1,13 @@
|
||||
package dev.inmo.tgbotapi.types
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlin.jvm.JvmInline
|
||||
|
||||
@Serializable
|
||||
@JvmInline
|
||||
value class ShippingQueryId(
|
||||
val string: String
|
||||
)
|
||||
|
||||
@Deprecated("Renamed", ReplaceWith("ShippingQueryId", "dev.inmo.tgbotapi.types.ShippingQueryId"))
|
||||
typealias ShippingQueryIdentifier = ShippingQueryId
|
||||
@@ -9,7 +9,7 @@ import kotlinx.serialization.Serializable
|
||||
@Serializable
|
||||
data class ShippingQuery(
|
||||
@SerialName(idField)
|
||||
val id: ShippingQueryIdentifier,
|
||||
val id: ShippingQueryId,
|
||||
@SerialName(fromField)
|
||||
override val from: User,
|
||||
@SerialName(invoicePayloadField)
|
||||
|
||||
Reference in New Issue
Block a user