Added full support of Bot API 7.5 (#1518)

* Added full support of Bot API 7.5

* Added changelog

* Update date type in RevenueWithdrawalStateSucceeded

* Added example
This commit is contained in:
Alex Root Junior 2024-06-19 00:54:22 +03:00 committed by GitHub
parent dcfc9632f3
commit 1f7bbeb355
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
72 changed files with 1629 additions and 51 deletions

View file

@ -29,9 +29,9 @@
},
{
"type": "String",
"description": "Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes. Not supported for messages sent on behalf of a Telegram Business account.",
"html_description": "<td><em>Optional</em>. Data to be sent in a <a href=\"#callbackquery\">callback query</a> to the bot when button is pressed, 1-64 bytes. Not supported for messages sent on behalf of a Telegram Business account.</td>",
"rst_description": "*Optional*. Data to be sent in a `callback query <https://core.telegram.org/bots/api#callbackquery>`_ to the bot when button is pressed, 1-64 bytes. Not supported for messages sent on behalf of a Telegram Business account.\n",
"description": "Data to be sent in a callback query to the bot when the button is pressed, 1-64 bytes",
"html_description": "<td><em>Optional</em>. Data to be sent in a <a href=\"#callbackquery\">callback query</a> to the bot when the button is pressed, 1-64 bytes</td>",
"rst_description": "*Optional*. Data to be sent in a `callback query <https://core.telegram.org/bots/api#callbackquery>`_ to the bot when the button is pressed, 1-64 bytes\n",
"name": "callback_data",
"required": false
},

View file

@ -0,0 +1,16 @@
{
"meta": {},
"group": {
"title": "Payments",
"anchor": "payments"
},
"object": {
"anchor": "revenuewithdrawalstate",
"name": "RevenueWithdrawalState",
"description": "This object describes the state of a revenue withdrawal operation. Currently, it can be one of\n - RevenueWithdrawalStatePending\n - RevenueWithdrawalStateSucceeded\n - RevenueWithdrawalStateFailed",
"html_description": "<p>This object describes the state of a revenue withdrawal operation. Currently, it can be one of</p><ul>\n<li><a href=\"#revenuewithdrawalstatepending\">RevenueWithdrawalStatePending</a></li>\n<li><a href=\"#revenuewithdrawalstatesucceeded\">RevenueWithdrawalStateSucceeded</a></li>\n<li><a href=\"#revenuewithdrawalstatefailed\">RevenueWithdrawalStateFailed</a></li>\n</ul>",
"rst_description": "This object describes the state of a revenue withdrawal operation. Currently, it can be one of\n\n - :class:`aiogram.types.revenue_withdrawal_state_pending.RevenueWithdrawalStatePending`\n - :class:`aiogram.types.revenue_withdrawal_state_succeeded.RevenueWithdrawalStateSucceeded`\n - :class:`aiogram.types.revenue_withdrawal_state_failed.RevenueWithdrawalStateFailed`",
"annotations": [],
"category": "types"
}
}

View file

@ -0,0 +1 @@
discriminator: "type"

View file

@ -0,0 +1,25 @@
{
"meta": {},
"group": {
"title": "Payments",
"anchor": "payments"
},
"object": {
"anchor": "revenuewithdrawalstatefailed",
"name": "RevenueWithdrawalStateFailed",
"description": "The withdrawal failed and the transaction was refunded.",
"html_description": "<p>The withdrawal failed and the transaction was refunded.</p>",
"rst_description": "The withdrawal failed and the transaction was refunded.",
"annotations": [
{
"type": "String",
"description": "Type of the state, always 'failed'",
"html_description": "<td>Type of the state, always &#8220;failed&#8221;</td>",
"rst_description": "Type of the state, always 'failed'\n",
"name": "type",
"required": true
}
],
"category": "types"
}
}

View file

@ -0,0 +1,25 @@
{
"meta": {},
"group": {
"title": "Payments",
"anchor": "payments"
},
"object": {
"anchor": "revenuewithdrawalstatepending",
"name": "RevenueWithdrawalStatePending",
"description": "The withdrawal is in progress.",
"html_description": "<p>The withdrawal is in progress.</p>",
"rst_description": "The withdrawal is in progress.",
"annotations": [
{
"type": "String",
"description": "Type of the state, always 'pending'",
"html_description": "<td>Type of the state, always &#8220;pending&#8221;</td>",
"rst_description": "Type of the state, always 'pending'\n",
"name": "type",
"required": true
}
],
"category": "types"
}
}

View file

@ -0,0 +1,41 @@
{
"meta": {},
"group": {
"title": "Payments",
"anchor": "payments"
},
"object": {
"anchor": "revenuewithdrawalstatesucceeded",
"name": "RevenueWithdrawalStateSucceeded",
"description": "The withdrawal succeeded.",
"html_description": "<p>The withdrawal succeeded.</p>",
"rst_description": "The withdrawal succeeded.",
"annotations": [
{
"type": "String",
"description": "Type of the state, always 'succeeded'",
"html_description": "<td>Type of the state, always &#8220;succeeded&#8221;</td>",
"rst_description": "Type of the state, always 'succeeded'\n",
"name": "type",
"required": true
},
{
"type": "Integer",
"description": "Date the withdrawal was completed in Unix time",
"html_description": "<td>Date the withdrawal was completed in Unix time</td>",
"rst_description": "Date the withdrawal was completed in Unix time\n",
"name": "date",
"required": true
},
{
"type": "String",
"description": "An HTTPS URL that can be used to see transaction details",
"html_description": "<td>An HTTPS URL that can be used to see transaction details</td>",
"rst_description": "An HTTPS URL that can be used to see transaction details\n",
"name": "url",
"required": true
}
],
"category": "types"
}
}

View file

@ -0,0 +1,5 @@
annotations:
date:
parsed_type:
type: std
name: DateTime

View file

@ -0,0 +1,57 @@
{
"meta": {},
"group": {
"title": "Payments",
"anchor": "payments"
},
"object": {
"anchor": "startransaction",
"name": "StarTransaction",
"description": "Describes a Telegram Star transaction.",
"html_description": "<p>Describes a Telegram Star transaction.</p>",
"rst_description": "Describes a Telegram Star transaction.",
"annotations": [
{
"type": "String",
"description": "Unique identifier of the transaction. Coincides with the identifer of the original transaction for refund transactions. Coincides with SuccessfulPayment.telegram_payment_charge_id for successful incoming payments from users.",
"html_description": "<td>Unique identifier of the transaction. Coincides with the identifer of the original transaction for refund transactions. Coincides with <em>SuccessfulPayment.telegram_payment_charge_id</em> for successful incoming payments from users.</td>",
"rst_description": "Unique identifier of the transaction. Coincides with the identifer of the original transaction for refund transactions. Coincides with *SuccessfulPayment.telegram_payment_charge_id* for successful incoming payments from users.\n",
"name": "id",
"required": true
},
{
"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",
"name": "amount",
"required": true
},
{
"type": "Integer",
"description": "Date the transaction was created in Unix time",
"html_description": "<td>Date the transaction was created in Unix time</td>",
"rst_description": "Date the transaction was created in Unix time\n",
"name": "date",
"required": true
},
{
"type": "TransactionPartner",
"description": "Source of an incoming transaction (e.g., a user purchasing goods or services, Fragment refunding a failed withdrawal). Only for incoming transactions",
"html_description": "<td><em>Optional</em>. Source of an incoming transaction (e.g., a user purchasing goods or services, Fragment refunding a failed withdrawal). Only for incoming transactions</td>",
"rst_description": "*Optional*. Source of an incoming transaction (e.g., a user purchasing goods or services, Fragment refunding a failed withdrawal). Only for incoming transactions\n",
"name": "source",
"required": false
},
{
"type": "TransactionPartner",
"description": "Receiver of an outgoing transaction (e.g., a user for a purchase refund, Fragment for a withdrawal). Only for outgoing transactions",
"html_description": "<td><em>Optional</em>. Receiver of an outgoing transaction (e.g., a user for a purchase refund, Fragment for a withdrawal). Only for outgoing transactions</td>",
"rst_description": "*Optional*. Receiver of an outgoing transaction (e.g., a user for a purchase refund, Fragment for a withdrawal). Only for outgoing transactions\n",
"name": "receiver",
"required": false
}
],
"category": "types"
}
}

View file

@ -0,0 +1,5 @@
annotations:
date:
parsed_type:
type: std
name: DateTime

View file

@ -0,0 +1,25 @@
{
"meta": {},
"group": {
"title": "Payments",
"anchor": "payments"
},
"object": {
"anchor": "startransactions",
"name": "StarTransactions",
"description": "Contains a list of Telegram Star transactions.",
"html_description": "<p>Contains a list of Telegram Star transactions.</p>",
"rst_description": "Contains a list of Telegram Star transactions.",
"annotations": [
{
"type": "Array of StarTransaction",
"description": "The list of transactions",
"html_description": "<td>The list of transactions</td>",
"rst_description": "The list of transactions\n",
"name": "transactions",
"required": true
}
],
"category": "types"
}
}

View file

@ -0,0 +1,16 @@
{
"meta": {},
"group": {
"title": "Payments",
"anchor": "payments"
},
"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 - TransactionPartnerFragment\n - TransactionPartnerUser\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=\"#transactionpartnerfragment\">TransactionPartnerFragment</a></li>\n<li><a href=\"#transactionpartneruser\">TransactionPartnerUser</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_fragment.TransactionPartnerFragment`\n - :class:`aiogram.types.transaction_partner_user.TransactionPartnerUser`\n - :class:`aiogram.types.transaction_partner_other.TransactionPartnerOther`",
"annotations": [],
"category": "types"
}
}

View file

@ -0,0 +1 @@
discriminator: "type"

View file

@ -0,0 +1,33 @@
{
"meta": {},
"group": {
"title": "Payments",
"anchor": "payments"
},
"object": {
"anchor": "transactionpartnerfragment",
"name": "TransactionPartnerFragment",
"description": "Describes a withdrawal transaction with Fragment.",
"html_description": "<p>Describes a withdrawal transaction with Fragment.</p>",
"rst_description": "Describes a withdrawal transaction with Fragment.",
"annotations": [
{
"type": "String",
"description": "Type of the transaction partner, always 'fragment'",
"html_description": "<td>Type of the transaction partner, always &#8220;fragment&#8221;</td>",
"rst_description": "Type of the transaction partner, always 'fragment'\n",
"name": "type",
"required": true
},
{
"type": "RevenueWithdrawalState",
"description": "State of the transaction if the transaction is outgoing",
"html_description": "<td><em>Optional</em>. State of the transaction if the transaction is outgoing</td>",
"rst_description": "*Optional*. State of the transaction if the transaction is outgoing\n",
"name": "withdrawal_state",
"required": false
}
],
"category": "types"
}
}

View file

@ -0,0 +1,25 @@
{
"meta": {},
"group": {
"title": "Payments",
"anchor": "payments"
},
"object": {
"anchor": "transactionpartnerother",
"name": "TransactionPartnerOther",
"description": "Describes a transaction with an unknown source or recipient.",
"html_description": "<p>Describes a transaction with an unknown source or recipient.</p>",
"rst_description": "Describes a transaction with an unknown source or recipient.",
"annotations": [
{
"type": "String",
"description": "Type of the transaction partner, always 'other'",
"html_description": "<td>Type of the transaction partner, always &#8220;other&#8221;</td>",
"rst_description": "Type of the transaction partner, always 'other'\n",
"name": "type",
"required": true
}
],
"category": "types"
}
}

View file

@ -0,0 +1,33 @@
{
"meta": {},
"group": {
"title": "Payments",
"anchor": "payments"
},
"object": {
"anchor": "transactionpartneruser",
"name": "TransactionPartnerUser",
"description": "Describes a transaction with a user.",
"html_description": "<p>Describes a transaction with a user.</p>",
"rst_description": "Describes a transaction with a user.",
"annotations": [
{
"type": "String",
"description": "Type of the transaction partner, always 'user'",
"html_description": "<td>Type of the transaction partner, always &#8220;user&#8221;</td>",
"rst_description": "Type of the transaction partner, always 'user'\n",
"name": "type",
"required": true
},
{
"type": "User",
"description": "Information about the user",
"html_description": "<td>Information about the user</td>",
"rst_description": "Information about the user\n",
"name": "user",
"required": true
}
],
"category": "types"
}
}