Skip to content

Commit

Permalink
Merge pull request #8 from alllex/botapi-7.4
Browse files Browse the repository at this point in the history
Bot API v7.4
  • Loading branch information
alllex authored May 31, 2024
2 parents f34dde8 + 7d20d26 commit 95d9536
Show file tree
Hide file tree
Showing 10 changed files with 1,588 additions and 844 deletions.
343 changes: 294 additions & 49 deletions api-spec/telegram-bot-api.html

Large diffs are not rendered by default.

1,102 changes: 603 additions & 499 deletions api/tbot-api.api

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ val valueTypes = listOf(
ValueType("MessageThreadId", "Long", "Opaque message thread identifier.") { _, field ->
field.serialName.endsWith("message_thread_id")
},
ValueType("MessageEffectId", "String", "Unique identifier of the message effect to be added to the message; for private chats only") { _, field ->
field.serialName.endsWith("effect_id")
},
ValueType("CallbackQueryId", "String", "Opaque [CallbackQuery] identifier.") { type, field ->
(type.value == "CallbackQuery" && field.serialName == "id") || field.serialName.endsWith("callback_query_id")
},
Expand Down Expand Up @@ -176,6 +179,9 @@ val valueTypes = listOf(
"file_date",
)
},
ValueType("TelegramPaymentChargeId", "String", "Telegram payment identifier") { _, field ->
field.serialName.endsWith("telegram_payment_charge_id")
},
)

private val unionMarkerValueInDescriptionRe = Regex("""(?:must be|always) ["“”]?([\w_]+)["“”]?""")
Expand Down
149 changes: 104 additions & 45 deletions src/main/generated-kotlin/me/alllex/tbot/api/model/Methods.kt

Large diffs are not rendered by default.

146 changes: 102 additions & 44 deletions src/main/generated-kotlin/me/alllex/tbot/api/model/RequestTypes.kt

Large diffs are not rendered by default.

148 changes: 103 additions & 45 deletions src/main/generated-kotlin/me/alllex/tbot/api/model/TryMethods.kt

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,12 @@ suspend fun TelegramBotApiClient.tryAnswerShippingQuery(requestBody: AnswerShipp
suspend fun TelegramBotApiClient.tryAnswerPreCheckoutQuery(requestBody: AnswerPreCheckoutQueryRequest): TelegramResponse<Boolean> =
telegramPost("answerPreCheckoutQuery", requestBody)

/**
* Refunds a successful payment in Telegram Stars. Returns True on success.
*/
suspend fun TelegramBotApiClient.tryRefundStarPayment(requestBody: RefundStarPaymentRequest): TelegramResponse<Boolean> =
telegramPost("refundStarPayment", requestBody)

/**
* Informs a user that some of the Telegram Passport elements they provided contains errors. The user will not be able to re-submit their Passport to you until the errors are fixed (the contents of the field for which you returned the error must change). Returns True on success.
*
Expand Down

Large diffs are not rendered by default.

110 changes: 77 additions & 33 deletions src/main/generated-kotlin/me/alllex/tbot/api/model/Types.kt

Large diffs are not rendered by default.

273 changes: 189 additions & 84 deletions src/main/generated-kotlin/me/alllex/tbot/api/model/WithContextMethods.kt

Large diffs are not rendered by default.

0 comments on commit 95d9536

Please sign in to comment.