mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Added full support of Bot API 8.1 (#1617)
* Added full support of Bot API 8.1 * Remove artifacts from types and methods (model_* methods)
This commit is contained in:
parent
6520b9fba2
commit
782796c217
25 changed files with 433 additions and 51 deletions
57
.butcher/types/AffiliateInfo/entity.json
Normal file
57
.butcher/types/AffiliateInfo/entity.json
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
"meta": {},
|
||||
"group": {
|
||||
"title": "Payments",
|
||||
"anchor": "payments"
|
||||
},
|
||||
"object": {
|
||||
"anchor": "affiliateinfo",
|
||||
"name": "AffiliateInfo",
|
||||
"description": "Contains information about the affiliate that received a commission via this transaction.",
|
||||
"html_description": "<p>Contains information about the affiliate that received a commission via this transaction.</p>",
|
||||
"rst_description": "Contains information about the affiliate that received a commission via this transaction.",
|
||||
"annotations": [
|
||||
{
|
||||
"type": "User",
|
||||
"description": "The bot or the user that received an affiliate commission if it was received by a bot or a user",
|
||||
"html_description": "<td><em>Optional</em>. The bot or the user that received an affiliate commission if it was received by a bot or a user</td>",
|
||||
"rst_description": "*Optional*. The bot or the user that received an affiliate commission if it was received by a bot or a user\n",
|
||||
"name": "affiliate_user",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Chat",
|
||||
"description": "The chat that received an affiliate commission if it was received by a chat",
|
||||
"html_description": "<td><em>Optional</em>. The chat that received an affiliate commission if it was received by a chat</td>",
|
||||
"rst_description": "*Optional*. The chat that received an affiliate commission if it was received by a chat\n",
|
||||
"name": "affiliate_chat",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the bot from referred users",
|
||||
"html_description": "<td>The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the bot from referred users</td>",
|
||||
"rst_description": "The number of Telegram Stars received by the affiliate for each 1000 Telegram Stars received by the bot from referred users\n",
|
||||
"name": "commission_per_mille",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "Integer amount of Telegram Stars received by the affiliate from the transaction, rounded to 0; can be negative for refunds",
|
||||
"html_description": "<td>Integer amount of Telegram Stars received by the affiliate from the transaction, rounded to 0; can be negative for refunds</td>",
|
||||
"rst_description": "Integer amount of Telegram Stars received by the affiliate from the transaction, rounded to 0; can be negative for refunds\n",
|
||||
"name": "amount",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "The number of 1/1000000000 shares of Telegram Stars received by the affiliate; from -999999999 to 999999999; can be negative for refunds",
|
||||
"html_description": "<td><em>Optional</em>. The number of 1/1000000000 shares of Telegram Stars received by the affiliate; from -999999999 to 999999999; can be negative for refunds</td>",
|
||||
"rst_description": "*Optional*. The number of 1/1000000000 shares of Telegram Stars received by the affiliate; from -999999999 to 999999999; can be negative for refunds\n",
|
||||
"name": "nanostar_amount",
|
||||
"required": false
|
||||
}
|
||||
],
|
||||
"category": "types"
|
||||
}
|
||||
}
|
||||
|
|
@ -21,12 +21,20 @@
|
|||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "Number of Telegram Stars transferred by the transaction",
|
||||
"html_description": "<td>Number of Telegram Stars transferred by the transaction</td>",
|
||||
"rst_description": "Number of Telegram Stars transferred by the transaction\n",
|
||||
"description": "Integer amount of Telegram Stars transferred by the transaction",
|
||||
"html_description": "<td>Integer amount of Telegram Stars transferred by the transaction</td>",
|
||||
"rst_description": "Integer amount of Telegram Stars transferred by the transaction\n",
|
||||
"name": "amount",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "The number of 1/1000000000 shares of Telegram Stars transferred by the transaction; from 0 to 999999999",
|
||||
"html_description": "<td><em>Optional</em>. The number of 1/1000000000 shares of Telegram Stars transferred by the transaction; from 0 to 999999999</td>",
|
||||
"rst_description": "*Optional*. The number of 1/1000000000 shares of Telegram Stars transferred by the transaction; from 0 to 999999999\n",
|
||||
"name": "nanostar_amount",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "Date the transaction was created in Unix time",
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@
|
|||
"object": {
|
||||
"anchor": "transactionpartner",
|
||||
"name": "TransactionPartner",
|
||||
"description": "This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of\n - TransactionPartnerUser\n - TransactionPartnerFragment\n - TransactionPartnerTelegramAds\n - TransactionPartnerTelegramApi\n - TransactionPartnerOther",
|
||||
"html_description": "<p>This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of</p><ul>\n<li><a href=\"#transactionpartneruser\">TransactionPartnerUser</a></li>\n<li><a href=\"#transactionpartnerfragment\">TransactionPartnerFragment</a></li>\n<li><a href=\"#transactionpartnertelegramads\">TransactionPartnerTelegramAds</a></li>\n<li><a href=\"#transactionpartnertelegramapi\">TransactionPartnerTelegramApi</a></li>\n<li><a href=\"#transactionpartnerother\">TransactionPartnerOther</a></li>\n</ul>",
|
||||
"rst_description": "This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of\n\n - :class:`aiogram.types.transaction_partner_user.TransactionPartnerUser`\n - :class:`aiogram.types.transaction_partner_fragment.TransactionPartnerFragment`\n - :class:`aiogram.types.transaction_partner_telegram_ads.TransactionPartnerTelegramAds`\n - :class:`aiogram.types.transaction_partner_telegram_api.TransactionPartnerTelegramApi`\n - :class:`aiogram.types.transaction_partner_other.TransactionPartnerOther`",
|
||||
"description": "This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of\n - TransactionPartnerUser\n - TransactionPartnerAffiliateProgram\n - TransactionPartnerFragment\n - TransactionPartnerTelegramAds\n - TransactionPartnerTelegramApi\n - TransactionPartnerOther",
|
||||
"html_description": "<p>This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of</p><ul>\n<li><a href=\"#transactionpartneruser\">TransactionPartnerUser</a></li>\n<li><a href=\"#transactionpartneraffiliateprogram\">TransactionPartnerAffiliateProgram</a></li>\n<li><a href=\"#transactionpartnerfragment\">TransactionPartnerFragment</a></li>\n<li><a href=\"#transactionpartnertelegramads\">TransactionPartnerTelegramAds</a></li>\n<li><a href=\"#transactionpartnertelegramapi\">TransactionPartnerTelegramApi</a></li>\n<li><a href=\"#transactionpartnerother\">TransactionPartnerOther</a></li>\n</ul>",
|
||||
"rst_description": "This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of\n\n - :class:`aiogram.types.transaction_partner_user.TransactionPartnerUser`\n - :class:`aiogram.types.transaction_partner_affiliate_program.TransactionPartnerAffiliateProgram`\n - :class:`aiogram.types.transaction_partner_fragment.TransactionPartnerFragment`\n - :class:`aiogram.types.transaction_partner_telegram_ads.TransactionPartnerTelegramAds`\n - :class:`aiogram.types.transaction_partner_telegram_api.TransactionPartnerTelegramApi`\n - :class:`aiogram.types.transaction_partner_other.TransactionPartnerOther`",
|
||||
"annotations": [],
|
||||
"category": "types"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"meta": {},
|
||||
"group": {
|
||||
"title": "Payments",
|
||||
"anchor": "payments"
|
||||
},
|
||||
"object": {
|
||||
"anchor": "transactionpartneraffiliateprogram",
|
||||
"name": "TransactionPartnerAffiliateProgram",
|
||||
"description": "Describes the affiliate program that issued the affiliate commission received via this transaction.",
|
||||
"html_description": "<p>Describes the affiliate program that issued the affiliate commission received via this transaction.</p>",
|
||||
"rst_description": "Describes the affiliate program that issued the affiliate commission received via this transaction.",
|
||||
"annotations": [
|
||||
{
|
||||
"type": "String",
|
||||
"description": "Type of the transaction partner, always 'affiliate_program'",
|
||||
"html_description": "<td>Type of the transaction partner, always “affiliate_program”</td>",
|
||||
"rst_description": "Type of the transaction partner, always 'affiliate_program'\n",
|
||||
"name": "type",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "User",
|
||||
"description": "Information about the bot that sponsored the affiliate program",
|
||||
"html_description": "<td><em>Optional</em>. Information about the bot that sponsored the affiliate program</td>",
|
||||
"rst_description": "*Optional*. Information about the bot that sponsored the affiliate program\n",
|
||||
"name": "sponsor_user",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "The number of Telegram Stars received by the bot for each 1000 Telegram Stars received by the affiliate program sponsor from referred users",
|
||||
"html_description": "<td>The number of Telegram Stars received by the bot for each 1000 Telegram Stars received by the affiliate program sponsor from referred users</td>",
|
||||
"rst_description": "The number of Telegram Stars received by the bot for each 1000 Telegram Stars received by the affiliate program sponsor from referred users\n",
|
||||
"name": "commission_per_mille",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"category": "types"
|
||||
}
|
||||
}
|
||||
|
|
@ -27,6 +27,14 @@
|
|||
"name": "user",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "AffiliateInfo",
|
||||
"description": "Information about the affiliate that received a commission via this transaction",
|
||||
"html_description": "<td><em>Optional</em>. Information about the affiliate that received a commission via this transaction</td>",
|
||||
"rst_description": "*Optional*. Information about the affiliate that received a commission via this transaction\n",
|
||||
"name": "affiliate",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "String",
|
||||
"description": "Bot-specified invoice payload",
|
||||
|
|
@ -60,7 +68,7 @@
|
|||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "String",
|
||||
"type": "Gift",
|
||||
"description": "The gift sent to the user by the bot",
|
||||
"html_description": "<td><em>Optional</em>. The gift sent to the user by the bot</td>",
|
||||
"rst_description": "*Optional*. The gift sent to the user by the bot\n",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue