mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Adding new code-generator (Butcher) (#1069)
* Re-generate types * Re-generate methods (only attributes) * Added enums * Base init generator * Added butcher configs * Fixed tests, bump butcher * Added changelog * Added enum docs * Added templates for docs index * Re-generate bot class, remove deprecated methods
This commit is contained in:
parent
c7779abc50
commit
d034c1ba9f
387 changed files with 32036 additions and 3144 deletions
179
.butcher/types/InputInvoiceMessageContent/entity.json
Normal file
179
.butcher/types/InputInvoiceMessageContent/entity.json
Normal file
|
|
@ -0,0 +1,179 @@
|
|||
{
|
||||
"meta": {
|
||||
"deprecated": false
|
||||
},
|
||||
"group": {
|
||||
"title": "Inline mode",
|
||||
"anchor": "inline-mode"
|
||||
},
|
||||
"object": {
|
||||
"anchor": "inputinvoicemessagecontent",
|
||||
"name": "InputInvoiceMessageContent",
|
||||
"description": "Represents the content of an invoice message to be sent as the result of an inline query.",
|
||||
"html_description": "<p>Represents the <a href=\"#inputmessagecontent\">content</a> of an invoice message to be sent as the result of an inline query.</p>",
|
||||
"rst_description": "Represents the `content <https://core.telegram.org/bots/api#inputmessagecontent>`_ of an invoice message to be sent as the result of an inline query.",
|
||||
"annotations": [
|
||||
{
|
||||
"type": "String",
|
||||
"description": "Product name, 1-32 characters",
|
||||
"html_description": "<td>Product name, 1-32 characters</td>",
|
||||
"rst_description": "Product name, 1-32 characters\n",
|
||||
"name": "title",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "String",
|
||||
"description": "Product description, 1-255 characters",
|
||||
"html_description": "<td>Product description, 1-255 characters</td>",
|
||||
"rst_description": "Product description, 1-255 characters\n",
|
||||
"name": "description",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "String",
|
||||
"description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.",
|
||||
"html_description": "<td>Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.</td>",
|
||||
"rst_description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.\n",
|
||||
"name": "payload",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "String",
|
||||
"description": "Payment provider token, obtained via @BotFather",
|
||||
"html_description": "<td>Payment provider token, obtained via <a href=\"https://t.me/botfather\">@BotFather</a></td>",
|
||||
"rst_description": "Payment provider token, obtained via `@BotFather <https://t.me/botfather>`_\n",
|
||||
"name": "provider_token",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "String",
|
||||
"description": "Three-letter ISO 4217 currency code, see more on currencies",
|
||||
"html_description": "<td>Three-letter ISO 4217 currency code, see <a href=\"/bots/payments#supported-currencies\">more on currencies</a></td>",
|
||||
"rst_description": "Three-letter ISO 4217 currency code, see `more on currencies <https://core.telegram.org/bots/payments#supported-currencies>`_\n",
|
||||
"name": "currency",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "Array of LabeledPrice",
|
||||
"description": "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)",
|
||||
"html_description": "<td>Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)</td>",
|
||||
"rst_description": "Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)\n",
|
||||
"name": "prices",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0",
|
||||
"html_description": "<td><em>Optional</em>. The maximum accepted amount for tips in the <em>smallest units</em> of the currency (integer, <strong>not</strong> float/double). For example, for a maximum tip of <code>US$ 1.45</code> pass <code>max_tip_amount = 145</code>. See the <em>exp</em> parameter in <a href=\"/bots/payments/currencies.json\">currencies.json</a>, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0</td>",
|
||||
"rst_description": "*Optional*. The maximum accepted amount for tips in the *smallest units* of the currency (integer, **not** float/double). For example, for a maximum tip of :code:`US$ 1.45` pass :code:`max_tip_amount = 145`. See the *exp* parameter in `currencies.json <https://core.telegram.org/bots/payments/currencies.json>`_, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0\n",
|
||||
"name": "max_tip_amount",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Array of Integer",
|
||||
"description": "A JSON-serialized array of suggested amounts of tip in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount.",
|
||||
"html_description": "<td><em>Optional</em>. A JSON-serialized array of suggested amounts of tip in the <em>smallest units</em> of the currency (integer, <strong>not</strong> float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed <em>max_tip_amount</em>.</td>",
|
||||
"rst_description": "*Optional*. A JSON-serialized array of suggested amounts of tip in the *smallest units* of the currency (integer, **not** float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed *max_tip_amount*.\n",
|
||||
"name": "suggested_tip_amounts",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "String",
|
||||
"description": "A JSON-serialized object for data about the invoice, which will be shared with the payment provider. A detailed description of the required fields should be provided by the payment provider.",
|
||||
"html_description": "<td><em>Optional</em>. A JSON-serialized object for data about the invoice, which will be shared with the payment provider. A detailed description of the required fields should be provided by the payment provider.</td>",
|
||||
"rst_description": "*Optional*. A JSON-serialized object for data about the invoice, which will be shared with the payment provider. A detailed description of the required fields should be provided by the payment provider.\n",
|
||||
"name": "provider_data",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "String",
|
||||
"description": "URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.",
|
||||
"html_description": "<td><em>Optional</em>. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.</td>",
|
||||
"rst_description": "*Optional*. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.\n",
|
||||
"name": "photo_url",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "Photo size in bytes",
|
||||
"html_description": "<td><em>Optional</em>. Photo size in bytes</td>",
|
||||
"rst_description": "*Optional*. Photo size in bytes\n",
|
||||
"name": "photo_size",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "Photo width",
|
||||
"html_description": "<td><em>Optional</em>. Photo width</td>",
|
||||
"rst_description": "*Optional*. Photo width\n",
|
||||
"name": "photo_width",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "Photo height",
|
||||
"html_description": "<td><em>Optional</em>. Photo height</td>",
|
||||
"rst_description": "*Optional*. Photo height\n",
|
||||
"name": "photo_height",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Boolean",
|
||||
"description": "Pass True if you require the user's full name to complete the order",
|
||||
"html_description": "<td><em>Optional</em>. Pass <em>True</em> if you require the user's full name to complete the order</td>",
|
||||
"rst_description": "*Optional*. Pass :code:`True` if you require the user's full name to complete the order\n",
|
||||
"name": "need_name",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Boolean",
|
||||
"description": "Pass True if you require the user's phone number to complete the order",
|
||||
"html_description": "<td><em>Optional</em>. Pass <em>True</em> if you require the user's phone number to complete the order</td>",
|
||||
"rst_description": "*Optional*. Pass :code:`True` if you require the user's phone number to complete the order\n",
|
||||
"name": "need_phone_number",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Boolean",
|
||||
"description": "Pass True if you require the user's email address to complete the order",
|
||||
"html_description": "<td><em>Optional</em>. Pass <em>True</em> if you require the user's email address to complete the order</td>",
|
||||
"rst_description": "*Optional*. Pass :code:`True` if you require the user's email address to complete the order\n",
|
||||
"name": "need_email",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Boolean",
|
||||
"description": "Pass True if you require the user's shipping address to complete the order",
|
||||
"html_description": "<td><em>Optional</em>. Pass <em>True</em> if you require the user's shipping address to complete the order</td>",
|
||||
"rst_description": "*Optional*. Pass :code:`True` if you require the user's shipping address to complete the order\n",
|
||||
"name": "need_shipping_address",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Boolean",
|
||||
"description": "Pass True if the user's phone number should be sent to provider",
|
||||
"html_description": "<td><em>Optional</em>. Pass <em>True</em> if the user's phone number should be sent to provider</td>",
|
||||
"rst_description": "*Optional*. Pass :code:`True` if the user's phone number should be sent to provider\n",
|
||||
"name": "send_phone_number_to_provider",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Boolean",
|
||||
"description": "Pass True if the user's email address should be sent to provider",
|
||||
"html_description": "<td><em>Optional</em>. Pass <em>True</em> if the user's email address should be sent to provider</td>",
|
||||
"rst_description": "*Optional*. Pass :code:`True` if the user's email address should be sent to provider\n",
|
||||
"name": "send_email_to_provider",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Boolean",
|
||||
"description": "Pass True if the final price depends on the shipping method",
|
||||
"html_description": "<td><em>Optional</em>. Pass <em>True</em> if the final price depends on the shipping method</td>",
|
||||
"rst_description": "*Optional*. Pass :code:`True` if the final price depends on the shipping method\n",
|
||||
"name": "is_flexible",
|
||||
"required": false
|
||||
}
|
||||
],
|
||||
"category": "types"
|
||||
}
|
||||
}
|
||||
2
.butcher/types/InputInvoiceMessageContent/replace.yml
Normal file
2
.butcher/types/InputInvoiceMessageContent/replace.yml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
bases:
|
||||
- InputMessageContent
|
||||
Loading…
Add table
Add a link
Reference in a new issue