From fb222cfdd55a223598d13ee653395b544d22c28c Mon Sep 17 00:00:00 2001 From: b Date: Mon, 10 Jun 2024 00:28:10 +0000 Subject: [PATCH] tdl-install-types: generate string instead of number|string for output int64 --- CHANGELOG.md | 7 + flow-typed/tdlib-types_vx.x.x.js | 170 +++++++++--------- packages/tdl-install-types/src/gen.js | 2 +- .../__snapshots__/flow-tdlib-1-8-0.js.shot | 70 ++++---- .../__snapshots__/ts-tdlib-1-8-0.js.shot | 70 ++++---- typings/tdlib-types.d.ts | 170 +++++++++--------- 6 files changed, 248 insertions(+), 241 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 975df6f..d4f9459 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ + + ## tdl@8.0.0 (2024-05-28) - The compatibility with `tdl-tdlib-addon` is removed. The `Client` constructor diff --git a/flow-typed/tdlib-types_vx.x.x.js b/flow-typed/tdlib-types_vx.x.x.js index dc1d25e..42ed0dc 100644 --- a/flow-typed/tdlib-types_vx.x.x.js +++ b/flow-typed/tdlib-types_vx.x.x.js @@ -904,7 +904,7 @@ declare module 'tdlib-types' { */ _: 'stickerFullTypeCustomEmoji', /** Identifier of the custom emoji */ - custom_emoji_id: number | string, + custom_emoji_id: string, /** * True, if the sticker must be repainted to a text color in messages, the color * of the Telegram Premium badge in emoji status, white color on chat photos, or @@ -1076,9 +1076,9 @@ declare module 'tdlib-types' { /** Describes a sticker */ _: 'sticker', /** Unique sticker identifier within the set; 0 if none */ - id: number | string, + id: string, /** Identifier of the sticker set to which the sticker belongs; 0 if none */ - set_id: number | string, + set_id: string, /** Sticker width; as defined by the sender */ width: number, /** Sticker height; as defined by the sender */ @@ -1298,7 +1298,7 @@ declare module 'tdlib-types' { */ _: 'game', /** Unique game identifier */ - id: number | string, + id: string, /** Game short name */ short_name: string, /** Game title */ @@ -1335,7 +1335,7 @@ declare module 'tdlib-types' { /** Describes a poll */ _: 'poll', /** Unique poll identifier */ - id: number | string, + id: string, /** Poll question; 1-300 characters. Only custom emoji entities are allowed */ question: formattedText, /** List of poll answer options */ @@ -1360,7 +1360,7 @@ declare module 'tdlib-types' { /** Describes a chat background */ _: 'background', /** Unique background identifier */ - id: number | string, + id: string, /** True, if this is one of default backgrounds */ is_default: boolean, /** True, if the background is dark and is recommended to be used with dark theme */ @@ -1402,7 +1402,7 @@ declare module 'tdlib-types' { * Photo identifier; 0 for an empty photo. Can be used to find a photo in a list * of user profile photos */ - id: number | string, + id: string, /** * A small (160x160) user profile photo. The file can be downloaded only before * the photo is changed @@ -1954,9 +1954,9 @@ declare module 'tdlib-types' { /** Information about the sticker, which was used to create the chat photo */ _: 'chatPhotoStickerTypeRegularOrMask', /** Sticker set identifier */ - sticker_set_id: number | string, + sticker_set_id: string, /** Identifier of the sticker in the set */ - sticker_id: number | string, + sticker_id: string, |} declare export type chatPhotoStickerTypeRegularOrMask$Input = {| @@ -1972,7 +1972,7 @@ declare module 'tdlib-types' { /** Information about the custom emoji, which was used to create the chat photo */ _: 'chatPhotoStickerTypeCustomEmoji', /** Identifier of the custom emoji */ - custom_emoji_id: number | string, + custom_emoji_id: string, |} declare export type chatPhotoStickerTypeCustomEmoji$Input = {| @@ -2027,7 +2027,7 @@ declare module 'tdlib-types' { /** Describes a chat or user profile photo */ _: 'chatPhoto', /** Unique photo identifier */ - id: number | string, + id: string, /** Point in time (Unix timestamp) when the photo has been added */ added_date: number, /** Photo minithumbnail; may be null */ @@ -2659,7 +2659,7 @@ declare module 'tdlib-types' { /** Describes a custom emoji to be shown instead of the Telegram Premium badge */ _: 'emojiStatus', /** Identifier of the custom emoji in stickerFormatTgs format */ - custom_emoji_id: number | string, + custom_emoji_id: string, /** Point in time (Unix timestamp) when the status will expire; 0 if never */ expiration_date: number, |} @@ -2677,7 +2677,7 @@ declare module 'tdlib-types' { /** Contains a list of custom emoji identifiers for emoji statuses */ _: 'emojiStatuses', /** The list of custom emoji identifiers */ - custom_emoji_ids: Array, + custom_emoji_ids: Array, |} declare export type usernames = {| @@ -2727,7 +2727,7 @@ declare module 'tdlib-types' { * Identifier of a custom emoji to be shown on the reply header and link preview * background; 0 if none. For Telegram Premium users only */ - background_custom_emoji_id: number | string, + background_custom_emoji_id: string, /** * Identifier of the accent color for the user's profile; -1 if none. For Telegram * Premium users only @@ -2737,7 +2737,7 @@ declare module 'tdlib-types' { * Identifier of a custom emoji to be shown on the background of the user's profile; * 0 if none. For Telegram Premium users only */ - profile_background_custom_emoji_id: number | string, + profile_background_custom_emoji_id: string, /** * Emoji status to be shown instead of the default Telegram Premium badge; may * be null. For Telegram Premium users only @@ -3670,12 +3670,12 @@ declare module 'tdlib-types' { * Identifier of the supergroup sticker set that must be shown before user sticker * sets; 0 if none */ - sticker_set_id: number | string, + sticker_set_id: string, /** * Identifier of the custom emoji sticker set that can be used in the supergroup * without Telegram Premium subscription; 0 if none */ - custom_emoji_sticker_set_id: number | string, + custom_emoji_sticker_set_id: string, /** Location to which the supergroup is connected; may be null if none */ location?: chatLocation, /** @@ -3927,7 +3927,7 @@ declare module 'tdlib-types' { /** A reaction with a custom emoji */ _: 'reactionTypeCustomEmoji', /** Unique identifier of the custom emoji */ - custom_emoji_id: number | string, + custom_emoji_id: string, |} declare export type reactionTypeCustomEmoji$Input = {| @@ -4064,7 +4064,7 @@ declare module 'tdlib-types' { /** Contains information about an effect added to a message */ _: 'messageEffect', /** Unique identifier of the effect */ - id: number | string, + id: string, /** Static icon for the effect in WEBP format; may be null if none */ static_icon?: sticker, /** Emoji corresponding to the effect that can be used if static icon isn't available */ @@ -4410,9 +4410,9 @@ declare module 'tdlib-types' { * Unique identifier of an album this message belongs to; 0 if none. Only audios, * documents, photos and videos can be grouped together in albums */ - media_album_id: number | string, + media_album_id: string, /** Unique identifier of the effect added to the message; 0 if none */ - effect_id: number | string, + effect_id: string, /** * If non-empty, contains a human-readable description of the reason why access * to this message must be restricted @@ -4605,7 +4605,7 @@ declare module 'tdlib-types' { /** Identifier of the accent color for title, button text and message background */ accent_color_id: number, /** Identifier of a custom emoji to be shown on the message background; 0 if none */ - background_custom_emoji_id: number | string, + background_custom_emoji_id: string, /** * If non-empty, additional information about the sponsored message to be shown * along with the message @@ -4776,7 +4776,7 @@ declare module 'tdlib-types' { * Identifier of the notification sound to be played for messages; 0 if sound is * disabled */ - sound_id: number | string, + sound_id: string, /** * If true, the value for the relevant type of chat or the forum chat is used instead * of show_preview @@ -4794,7 +4794,7 @@ declare module 'tdlib-types' { * Identifier of the notification sound to be played for stories; 0 if sound is * disabled */ - story_sound_id: number | string, + story_sound_id: string, /** If true, the value for the relevant type of chat is used instead of show_story_sender */ use_default_show_story_sender: boolean, /** True, if the sender of stories must be displayed in notifications */ @@ -4891,7 +4891,7 @@ declare module 'tdlib-types' { /** Time left before notifications will be unmuted, in seconds */ mute_for: number, /** Identifier of the notification sound to be played; 0 if sound is disabled */ - sound_id: number | string, + sound_id: string, /** True, if message content must be displayed in notifications */ show_preview: boolean, /** @@ -4905,7 +4905,7 @@ declare module 'tdlib-types' { * Identifier of the notification sound to be played for stories; 0 if sound is * disabled */ - story_sound_id: number | string, + story_sound_id: string, /** True, if the sender of stories must be displayed in notifications */ show_story_sender: boolean, /** @@ -4993,7 +4993,7 @@ declare module 'tdlib-types' { /** Source of story reactions for which notifications are shown */ story_reaction_source: ReactionNotificationSource, /** Identifier of the notification sound to be played; 0 if sound is disabled */ - sound_id: number | string, + sound_id: string, /** True, if reaction sender and emoji must be displayed in notifications */ show_preview: boolean, |} @@ -5405,7 +5405,7 @@ declare module 'tdlib-types' { * A parameter used to determine order of the chat in the chat list. Chats must * be sorted by the pair (order, chat.id) in descending order */ - order: number | string, + order: string, /** True, if the chat is pinned in the chat list */ is_pinned: boolean, /** Source of the chat in the chat list; may be null */ @@ -5515,14 +5515,14 @@ declare module 'tdlib-types' { * Identifier of a custom emoji to be shown on the reply header and link preview * background for messages sent by the chat; 0 if none */ - background_custom_emoji_id: number | string, + background_custom_emoji_id: string, /** Identifier of the profile accent color for the chat's profile; -1 if none */ profile_accent_color_id: number, /** * Identifier of a custom emoji to be shown on the background of the chat's profile; * 0 if none */ - profile_background_custom_emoji_id: number | string, + profile_background_custom_emoji_id: string, /** Actions that non-administrator chat members are allowed to take in the chat */ permissions: chatPermissions, /** Last message in the chat; may be null if none or unknown */ @@ -6391,7 +6391,7 @@ declare module 'tdlib-types' { /** Contains information about a Web App */ _: 'webAppInfo', /** Unique identifier for the Web App launch */ - launch_id: number | string, + launch_id: string, /** A Web App URL to open in a web view */ url: string, |} @@ -6449,7 +6449,7 @@ declare module 'tdlib-types' { * A parameter used to determine order of the topic in the topic list. Topics must * be sorted by the order in descending order */ - order: number | string, + order: string, /** Last message in the topic; may be null if none or unknown */ last_message?: message, /** A draft of a message in the topic; may be null if none */ @@ -6462,7 +6462,7 @@ declare module 'tdlib-types' { /** Color of the topic icon in RGB format */ color: number, /** Unique identifier of the custom emoji shown on the topic icon; 0 if none */ - custom_emoji_id: number | string, + custom_emoji_id: string, |} declare export type forumTopicIcon$Input = {| @@ -7297,7 +7297,7 @@ declare module 'tdlib-types' { /** Cryptocurrency used to pay for the item */ cryptocurrency: string, /** The paid amount, in the smallest units of the cryptocurrency */ - cryptocurrency_amount: number | string, + cryptocurrency_amount: string, /** Individual URL for the item on https://fragment.com */ url: string, |} @@ -7646,7 +7646,7 @@ declare module 'tdlib-types' { /** Contains information about an invoice payment form */ _: 'paymentForm', /** The payment form identifier */ - id: number | string, + id: string, /** Type of the payment form */ type: PaymentFormType, /** User identifier of the seller bot */ @@ -9071,7 +9071,7 @@ declare module 'tdlib-types' { * New unique identifier of the custom emoji shown on the topic icon; 0 if none. * Must be ignored if edit_icon_custom_emoji_id is false */ - icon_custom_emoji_id: number | string, + icon_custom_emoji_id: string, |} declare export type messageForumTopicIsClosedToggled = {| @@ -9114,7 +9114,7 @@ declare module 'tdlib-types' { * Identifier of the game; may be different from the games presented in the message * with the game */ - game_id: number | string, + game_id: string, /** New score */ score: number, |} @@ -9176,7 +9176,7 @@ declare module 'tdlib-types' { /** Cryptocurrency used to pay for the gift; may be empty if none */ cryptocurrency: string, /** The paid amount, in the smallest units of the cryptocurrency; 0 if none */ - cryptocurrency_amount: number | string, + cryptocurrency_amount: string, /** Number of months the Telegram Premium subscription will be active */ month_count: number, /** A sticker to be shown in the message; may be null if unknown */ @@ -9202,7 +9202,7 @@ declare module 'tdlib-types' { /** Cryptocurrency used to pay for the gift; may be empty if none or unknown */ cryptocurrency: string, /** The paid amount, in the smallest units of the cryptocurrency; 0 if unknown */ - cryptocurrency_amount: number | string, + cryptocurrency_amount: string, /** * Number of months the Telegram Premium subscription will be active after code * activation @@ -9614,7 +9614,7 @@ declare module 'tdlib-types' { */ _: 'textEntityTypeCustomEmoji', /** Unique identifier of the custom emoji */ - custom_emoji_id: number | string, + custom_emoji_id: string, |} declare export type textEntityTypeCustomEmoji$Input = {| @@ -10975,7 +10975,7 @@ declare module 'tdlib-types' { /** Represents a sticker set */ _: 'stickerSet', /** Identifier of the sticker set */ - id: number | string, + id: string, /** Title of the sticker set */ title: string, /** Name of the sticker set */ @@ -11029,7 +11029,7 @@ declare module 'tdlib-types' { /** Represents short information about a sticker set */ _: 'stickerSetInfo', /** Identifier of the sticker set */ - id: number | string, + id: string, /** Title of the sticker set */ title: string, /** Name of the sticker set */ @@ -11650,7 +11650,7 @@ declare module 'tdlib-types' { * Unique identifier of an album this message belongs to; 0 if none. Only audios, * documents, photos and videos can be grouped together in albums */ - media_album_id: number | string, + media_album_id: string, /** Content of the message */ content: MessageContent, /** Inline keyboard reply markup for the message; may be null if none */ @@ -11830,7 +11830,7 @@ declare module 'tdlib-types' { /** Describes a prepaid Telegram Premium giveaway */ _: 'prepaidPremiumGiveaway', /** Unique identifier of the prepaid giveaway */ - id: number | string, + id: string, /** Number of users which will receive Telegram Premium subscription gift codes */ winner_count: number, /** @@ -12033,7 +12033,7 @@ declare module 'tdlib-types' { /** Describes a server for relaying call data */ _: 'callServer', /** Server identifier */ - id: number | string, + id: string, /** Server IPv4 address */ ip_address: string, /** Server IPv6 address */ @@ -13290,7 +13290,7 @@ declare module 'tdlib-types' { */ _: 'inlineQueryResults', /** Unique identifier of the inline query */ - inline_query_id: number | string, + inline_query_id: string, /** Button to be shown above inline query results; may be null */ button?: inlineQueryResultsButton, /** Results of the query */ @@ -13579,18 +13579,18 @@ declare module 'tdlib-types' { /** The supergroup sticker set was changed */ _: 'chatEventStickerSetChanged', /** Previous identifier of the chat sticker set; 0 if none */ - old_sticker_set_id: number | string, + old_sticker_set_id: string, /** New identifier of the chat sticker set; 0 if none */ - new_sticker_set_id: number | string, + new_sticker_set_id: string, |} declare export type chatEventCustomEmojiStickerSetChanged = {| /** The supergroup sticker set with allowed custom emoji was changed */ _: 'chatEventCustomEmojiStickerSetChanged', /** Previous identifier of the chat sticker set; 0 if none */ - old_sticker_set_id: number | string, + old_sticker_set_id: string, /** New identifier of the chat sticker set; 0 if none */ - new_sticker_set_id: number | string, + new_sticker_set_id: string, |} declare export type chatEventTitleChanged = {| @@ -13626,11 +13626,11 @@ declare module 'tdlib-types' { /** Previous identifier of chat accent color */ old_accent_color_id: number, /** Previous identifier of the custom emoji; 0 if none */ - old_background_custom_emoji_id: number | string, + old_background_custom_emoji_id: string, /** New identifier of chat accent color */ new_accent_color_id: number, /** New identifier of the custom emoji; 0 if none */ - new_background_custom_emoji_id: number | string, + new_background_custom_emoji_id: string, |} declare export type chatEventProfileAccentColorChanged = {| @@ -13639,11 +13639,11 @@ declare module 'tdlib-types' { /** Previous identifier of chat's profile accent color; -1 if none */ old_profile_accent_color_id: number, /** Previous identifier of the custom emoji; 0 if none */ - old_profile_background_custom_emoji_id: number | string, + old_profile_background_custom_emoji_id: string, /** New identifier of chat's profile accent color; -1 if none */ new_profile_accent_color_id: number, /** New identifier of the custom emoji; 0 if none */ - new_profile_background_custom_emoji_id: number | string, + new_profile_background_custom_emoji_id: string, |} declare export type chatEventHasProtectedContentToggled = {| @@ -13806,7 +13806,7 @@ declare module 'tdlib-types' { /** Represents a chat event */ _: 'chatEvent', /** Chat event identifier */ - id: number | string, + id: string, /** Point in time (Unix timestamp) when the event happened */ date: number, /** Identifier of the user or chat who performed the action */ @@ -14974,7 +14974,7 @@ declare module 'tdlib-types' { */ _: 'pushReceiverId', /** The globally unique identifier of push notification subscription */ - id: number | string, + id: string, |} declare export type backgroundFillSolid = {| @@ -15739,7 +15739,7 @@ declare module 'tdlib-types' { /** Describes a notification sound in MP3 format */ _: 'notificationSound', /** Unique identifier of the notification sound */ - id: number | string, + id: string, /** Duration of the sound, in seconds */ duration: number, /** Point in time (Unix timestamp) when the sound was created */ @@ -15815,7 +15815,7 @@ declare module 'tdlib-types' { /** Represents an integer option */ _: 'optionValueInteger', /** The value of the option */ - value: number | string, + value: string, |} declare export type optionValueInteger$Input = {| @@ -16480,7 +16480,7 @@ declare module 'tdlib-types' { */ _: 'session', /** Session identifier */ - id: number | string, + id: string, /** True, if this session is the current session */ is_current: boolean, /** @@ -16554,7 +16554,7 @@ declare module 'tdlib-types' { /** Contains information about an unconfirmed session */ _: 'unconfirmedSession', /** Session identifier */ - id: number | string, + id: string, /** Point in time (Unix timestamp) when the user has logged in */ log_in_date: number, /** @@ -16573,7 +16573,7 @@ declare module 'tdlib-types' { /** Contains information about one website the current user is logged in with Telegram */ _: 'connectedWebsite', /** Website identifier */ - id: number | string, + id: string, /** The domain name of the website */ domain_name: string, /** User identifier of a bot linked with the website */ @@ -18506,7 +18506,7 @@ declare module 'tdlib-types' { /** A URL linking to a sticker set */ _: 'tMeUrlTypeStickerSet', /** Identifier of the sticker set */ - sticker_set_id: number | string, + sticker_set_id: string, |} declare export type tMeUrl = {| @@ -19064,17 +19064,17 @@ declare module 'tdlib-types' { /** Cryptocurrency in which revenue is calculated */ cryptocurrency: string, /** Total amount of the cryptocurrency earned, in the smallest units of the cryptocurrency */ - total_amount: number | string, + total_amount: string, /** * Amount of the cryptocurrency that isn't withdrawn yet, in the smallest units * of the cryptocurrency */ - balance_amount: number | string, + balance_amount: string, /** * Amount of the cryptocurrency available for withdrawal, in the smallest units * of the cryptocurrency */ - available_amount: number | string, + available_amount: string, |} declare export type chatRevenueStatistics = {| @@ -19165,7 +19165,7 @@ declare module 'tdlib-types' { /** Cryptocurrency in which revenue is calculated */ cryptocurrency: string, /** The withdrawn amount, in the smallest units of the cryptocurrency */ - cryptocurrency_amount: number | string, + cryptocurrency_amount: string, /** Type of the transaction */ type: ChatRevenueTransactionType, |} @@ -19475,14 +19475,14 @@ declare module 'tdlib-types' { * The new identifier of a custom emoji to be shown on the reply header and link * preview background; 0 if none */ - background_custom_emoji_id: number | string, + background_custom_emoji_id: string, /** The new chat profile accent color identifier; -1 if none */ profile_accent_color_id: number, /** * The new identifier of a custom emoji to be shown on the profile background; * 0 if none */ - profile_background_custom_emoji_id: number | string, + profile_background_custom_emoji_id: string, |} declare export type updateChatPermissions = {| @@ -19902,7 +19902,7 @@ declare module 'tdlib-types' { /** Chat identifier, which notification settings must be applied to the added notifications */ notification_settings_chat_id: number, /** Identifier of the notification sound to be played; 0 if sound is disabled */ - notification_sound_id: number | string, + notification_sound_id: string, /** * Total number of unread notifications in the group, can be bigger than number * of active notifications @@ -20075,7 +20075,7 @@ declare module 'tdlib-types' { /** The file generation process needs to be started by the application */ _: 'updateFileGenerationStart', /** Unique identifier for the generation process */ - generation_id: number | string, + generation_id: string, /** The path to a file from which a new file is generated; may be empty */ original_path: string, /** The path to a file that must be created and where the new file is generated */ @@ -20092,7 +20092,7 @@ declare module 'tdlib-types' { /** File generation is no longer needed */ _: 'updateFileGenerationStop', /** Unique identifier for the generation process */ - generation_id: number | string, + generation_id: string, |} declare export type updateFileDownloads = {| @@ -20334,7 +20334,7 @@ declare module 'tdlib-types' { /** Type of the affected stickers */ sticker_type: StickerType, /** The new list of installed ordinary sticker sets */ - sticker_set_ids: Array, + sticker_set_ids: Array, |} declare export type updateTrendingStickerSets = {| @@ -20382,7 +20382,7 @@ declare module 'tdlib-types' { */ _: 'updateSavedNotificationSounds', /** The new list of identifiers of saved notification sounds */ - notification_sound_ids: Array, + notification_sound_ids: Array, |} declare export type updateDefaultBackground = {| @@ -20492,7 +20492,7 @@ declare module 'tdlib-types' { /** A message was sent by an opened Web App, so the Web App needs to be closed */ _: 'updateWebAppMessageSent', /** Identifier of Web App launch */ - web_app_launch_id: number | string, + web_app_launch_id: string, |} declare export type updateActiveEmojiReactions = {| @@ -20506,9 +20506,9 @@ declare module 'tdlib-types' { /** The list of available message effects has changed */ _: 'updateAvailableMessageEffects', /** The new list of available message effects from emoji reactions */ - reaction_effect_ids: Array, + reaction_effect_ids: Array, /** The new list of available message effects from Premium stickers */ - sticker_effect_ids: Array, + sticker_effect_ids: Array, |} declare export type updateDefaultReactionType = {| @@ -20687,7 +20687,7 @@ declare module 'tdlib-types' { /** A new incoming inline query; for bots only */ _: 'updateNewInlineQuery', /** Unique query identifier */ - id: number | string, + id: string, /** Identifier of the user who sent the query */ sender_user_id: number, /** User location; may be null */ @@ -20719,7 +20719,7 @@ declare module 'tdlib-types' { /** A new incoming callback query; for bots only */ _: 'updateNewCallbackQuery', /** Unique query identifier */ - id: number | string, + id: string, /** Identifier of the user who sent the query */ sender_user_id: number, /** Identifier of the chat where the query was sent */ @@ -20727,7 +20727,7 @@ declare module 'tdlib-types' { /** Identifier of the message from which the query originated */ message_id: number, /** Identifier that uniquely corresponds to the chat to which the message was sent */ - chat_instance: number | string, + chat_instance: string, /** Query payload */ payload: CallbackQueryPayload, |} @@ -20736,13 +20736,13 @@ declare module 'tdlib-types' { /** A new incoming callback query from a message sent via a bot; for bots only */ _: 'updateNewInlineCallbackQuery', /** Unique query identifier */ - id: number | string, + id: string, /** Identifier of the user who sent the query */ sender_user_id: number, /** Identifier of the inline message from which the query originated */ inline_message_id: string, /** An identifier uniquely corresponding to the chat a message was sent to */ - chat_instance: number | string, + chat_instance: string, /** Query payload */ payload: CallbackQueryPayload, |} @@ -20754,7 +20754,7 @@ declare module 'tdlib-types' { */ _: 'updateNewShippingQuery', /** Unique query identifier */ - id: number | string, + id: string, /** Identifier of the user who sent the query */ sender_user_id: number, /** Invoice payload */ @@ -20770,7 +20770,7 @@ declare module 'tdlib-types' { */ _: 'updateNewPreCheckoutQuery', /** Unique query identifier */ - id: number | string, + id: string, /** Identifier of the user who sent the query */ sender_user_id: number, /** Currency for the product price */ @@ -20796,7 +20796,7 @@ declare module 'tdlib-types' { /** A new incoming query; for bots only */ _: 'updateNewCustomQuery', /** The query identifier */ - id: number | string, + id: string, /** JSON-serialized query data */ data: string, /** Query timeout */ @@ -20814,7 +20814,7 @@ declare module 'tdlib-types' { /** A user changed the answer to a poll; for bots only */ _: 'updatePollAnswer', /** Unique poll identifier */ - poll_id: number | string, + poll_id: string, /** Identifier of the message sender that changed the answer to the poll */ voter_id: MessageSender, /** 0-based identifiers of answer options, chosen by the user */ diff --git a/packages/tdl-install-types/src/gen.js b/packages/tdl-install-types/src/gen.js index 425302b..ca6d79a 100644 --- a/packages/tdl-install-types/src/gen.js +++ b/packages/tdl-install-types/src/gen.js @@ -58,7 +58,7 @@ function generate ( case 'string': return 'string' case 'int32': return 'number' case 'int53': return 'number' - case 'int64': return 'number | string' + case 'int64': return input ? 'number | string' : 'string' case 'Bool': return 'boolean' case 'bytes': return 'string /* base64 */' default: return input ? p.type + INPUT_SUFFIX : p.type diff --git a/packages/tdl-install-types/tests/__snapshots__/flow-tdlib-1-8-0.js.shot b/packages/tdl-install-types/tests/__snapshots__/flow-tdlib-1-8-0.js.shot index df7bb5b..21a5936 100644 --- a/packages/tdl-install-types/tests/__snapshots__/flow-tdlib-1-8-0.js.shot +++ b/packages/tdl-install-types/tests/__snapshots__/flow-tdlib-1-8-0.js.shot @@ -875,7 +875,7 @@ declare module 'tdlib-types' { /** Describes a sticker */ _: 'sticker', /** The identifier of the sticker set to which the sticker belongs; 0 if none */ - set_id: number | string, + set_id: string, /** Sticker width; as defined by the sender */ width: number, /** Sticker height; as defined by the sender */ @@ -1079,7 +1079,7 @@ declare module 'tdlib-types' { /** Describes a game */ _: 'game', /** Game ID */ - id: number | string, + id: string, /** Game short name. To share a game use the URL https://t.me/{bot_username}?game={game_short_name} */ short_name: string, /** Game title */ @@ -1098,7 +1098,7 @@ declare module 'tdlib-types' { /** Describes a poll */ _: 'poll', /** Unique poll identifier */ - id: number | string, + id: string, /** Poll question; 1-300 characters */ question: string, /** List of poll answer options */ @@ -1126,7 +1126,7 @@ declare module 'tdlib-types' { * Photo identifier; 0 for an empty photo. Can be used to find a photo in a list * of user profile photos */ - id: number | string, + id: string, /** * A small (160x160) user profile photo. The file can be downloaded only before * the photo is changed @@ -1268,7 +1268,7 @@ declare module 'tdlib-types' { /** Describes a chat or user profile photo */ _: 'chatPhoto', /** Unique photo identifier */ - id: number | string, + id: string, /** Point in time (Unix timestamp) when the photo has been added */ added_date: number, /** Photo minithumbnail; may be null */ @@ -2206,7 +2206,7 @@ declare module 'tdlib-types' { */ is_all_history_available: boolean, /** Identifier of the supergroup sticker set; 0 if none */ - sticker_set_id: number | string, + sticker_set_id: string, /** Location to which the supergroup is connected; may be null */ location?: chatLocation, /** @@ -2533,7 +2533,7 @@ declare module 'tdlib-types' { * Unique identifier of an album this message belongs to. Only audios, documents, * photos and videos can be grouped together in albums */ - media_album_id: number | string, + media_album_id: string, /** * If non-empty, contains a human-readable description of the reason why access * to this message must be restricted @@ -3051,7 +3051,7 @@ declare module 'tdlib-types' { * A parameter used to determine order of the chat in the chat list. Chats must * be sorted by the pair (order, chat.id) in descending order */ - order: number | string, + order: string, /** True, if the chat is pinned in the chat list */ is_pinned: boolean, /** Source of the chat in the chat list; may be null */ @@ -4573,7 +4573,7 @@ declare module 'tdlib-types' { /** Contains information about an invoice payment form */ _: 'paymentForm', /** The payment form identifier */ - id: number | string, + id: string, /** Full information of the invoice */ invoice: invoice, /** Payment form URL */ @@ -5785,7 +5785,7 @@ declare module 'tdlib-types' { * Identifier of the game; may be different from the games presented in the message * with the game */ - game_id: number | string, + game_id: string, /** New score */ score: number, |} @@ -7161,7 +7161,7 @@ declare module 'tdlib-types' { /** Represents a sticker set */ _: 'stickerSet', /** Identifier of the sticker set */ - id: number | string, + id: string, /** Title of the sticker set */ title: string, /** Name of the sticker set */ @@ -7205,7 +7205,7 @@ declare module 'tdlib-types' { /** Represents short information about a sticker set */ _: 'stickerSetInfo', /** Identifier of the sticker set */ - id: number | string, + id: string, /** Title of the sticker set */ title: string, /** Name of the sticker set */ @@ -7338,7 +7338,7 @@ declare module 'tdlib-types' { /** Describes a server for relaying call data */ _: 'callServer', /** Server identifier */ - id: number | string, + id: string, /** Server IPv4 address */ ip_address: string, /** Server IPv6 address */ @@ -8218,7 +8218,7 @@ declare module 'tdlib-types' { */ _: 'inlineQueryResults', /** Unique identifier of the inline query */ - inline_query_id: number | string, + inline_query_id: string, /** The offset for the next request. If empty, there are no more results */ next_offset: string, /** Results of the query */ @@ -8511,9 +8511,9 @@ declare module 'tdlib-types' { /** The supergroup sticker set was changed */ _: 'chatEventStickerSetChanged', /** Previous identifier of the chat sticker set; 0 if none */ - old_sticker_set_id: number | string, + old_sticker_set_id: string, /** New identifier of the chat sticker set; 0 if none */ - new_sticker_set_id: number | string, + new_sticker_set_id: string, |} declare export type chatEventLocationChanged = {| @@ -8604,7 +8604,7 @@ declare module 'tdlib-types' { /** Represents a chat event */ _: 'chatEvent', /** Chat event identifier */ - id: number | string, + id: string, /** Point in time (Unix timestamp) when the event happened */ date: number, /** Identifier of the user or chat who performed the action */ @@ -8940,7 +8940,7 @@ declare module 'tdlib-types' { */ _: 'pushReceiverId', /** The globally unique identifier of push notification subscription */ - id: number | string, + id: string, |} declare export type backgroundFillSolid = {| @@ -9079,7 +9079,7 @@ declare module 'tdlib-types' { /** Describes a chat background */ _: 'background', /** Unique background identifier */ - id: number | string, + id: string, /** True, if this is one of default backgrounds */ is_default: boolean, /** True, if the background is dark and is recommended to be used with dark theme */ @@ -9632,7 +9632,7 @@ declare module 'tdlib-types' { /** Represents an integer option */ _: 'optionValueInteger', /** The value of the option */ - value: number | string, + value: string, |} declare export type optionValueInteger$Input = {| @@ -10017,7 +10017,7 @@ declare module 'tdlib-types' { */ _: 'session', /** Session identifier */ - id: number | string, + id: string, /** True, if this session is the current session */ is_current: boolean, /** True, if a password is needed to complete authorization of the session */ @@ -10083,7 +10083,7 @@ declare module 'tdlib-types' { /** Contains information about one website the current user is logged in with Telegram */ _: 'connectedWebsite', /** Website identifier */ - id: number | string, + id: string, /** The domain name of the website */ domain_name: string, /** User identifier of a bot linked with the website */ @@ -10958,7 +10958,7 @@ declare module 'tdlib-types' { /** A URL linking to a sticker set */ _: 'tMeUrlTypeStickerSet', /** Identifier of the sticker set */ - sticker_set_id: number | string, + sticker_set_id: string, |} declare export type tMeUrl = {| @@ -12082,7 +12082,7 @@ declare module 'tdlib-types' { /** The file generation process needs to be started by the application */ _: 'updateFileGenerationStart', /** Unique identifier for the generation process */ - generation_id: number | string, + generation_id: string, /** The path to a file from which a new file is generated; may be empty */ original_path: string, /** The path to a file that must be created and where the new file is generated */ @@ -12099,7 +12099,7 @@ declare module 'tdlib-types' { /** File generation is no longer needed */ _: 'updateFileGenerationStop', /** Unique identifier for the generation process */ - generation_id: number | string, + generation_id: string, |} declare export type updateCall = {| @@ -12203,7 +12203,7 @@ declare module 'tdlib-types' { /** True, if the list of installed mask sticker sets was updated */ is_masks: boolean, /** The new list of installed ordinary sticker sets */ - sticker_set_ids: Array, + sticker_set_ids: Array, |} declare export type updateTrendingStickerSets = {| @@ -12349,7 +12349,7 @@ declare module 'tdlib-types' { /** A new incoming inline query; for bots only */ _: 'updateNewInlineQuery', /** Unique query identifier */ - id: number | string, + id: string, /** Identifier of the user who sent the query */ sender_user_id: number, /** User location; may be null */ @@ -12381,7 +12381,7 @@ declare module 'tdlib-types' { /** A new incoming callback query; for bots only */ _: 'updateNewCallbackQuery', /** Unique query identifier */ - id: number | string, + id: string, /** Identifier of the user who sent the query */ sender_user_id: number, /** Identifier of the chat where the query was sent */ @@ -12389,7 +12389,7 @@ declare module 'tdlib-types' { /** Identifier of the message, from which the query originated */ message_id: number, /** Identifier that uniquely corresponds to the chat to which the message was sent */ - chat_instance: number | string, + chat_instance: string, /** Query payload */ payload: CallbackQueryPayload, |} @@ -12398,13 +12398,13 @@ declare module 'tdlib-types' { /** A new incoming callback query from a message sent via a bot; for bots only */ _: 'updateNewInlineCallbackQuery', /** Unique query identifier */ - id: number | string, + id: string, /** Identifier of the user who sent the query */ sender_user_id: number, /** Identifier of the inline message, from which the query originated */ inline_message_id: string, /** An identifier uniquely corresponding to the chat a message was sent to */ - chat_instance: number | string, + chat_instance: string, /** Query payload */ payload: CallbackQueryPayload, |} @@ -12416,7 +12416,7 @@ declare module 'tdlib-types' { */ _: 'updateNewShippingQuery', /** Unique query identifier */ - id: number | string, + id: string, /** Identifier of the user who sent the query */ sender_user_id: number, /** Invoice payload */ @@ -12432,7 +12432,7 @@ declare module 'tdlib-types' { */ _: 'updateNewPreCheckoutQuery', /** Unique query identifier */ - id: number | string, + id: string, /** Identifier of the user who sent the query */ sender_user_id: number, /** Currency for the product price */ @@ -12458,7 +12458,7 @@ declare module 'tdlib-types' { /** A new incoming query; for bots only */ _: 'updateNewCustomQuery', /** The query identifier */ - id: number | string, + id: string, /** JSON-serialized query data */ data: string, /** Query timeout */ @@ -12476,7 +12476,7 @@ declare module 'tdlib-types' { /** A user changed the answer to a poll; for bots only */ _: 'updatePollAnswer', /** Unique poll identifier */ - poll_id: number | string, + poll_id: string, /** The user, who changed the answer to the poll */ user_id: number, /** 0-based identifiers of answer options, chosen by the user */ diff --git a/packages/tdl-install-types/tests/__snapshots__/ts-tdlib-1-8-0.js.shot b/packages/tdl-install-types/tests/__snapshots__/ts-tdlib-1-8-0.js.shot index 4139501..b4e1332 100644 --- a/packages/tdl-install-types/tests/__snapshots__/ts-tdlib-1-8-0.js.shot +++ b/packages/tdl-install-types/tests/__snapshots__/ts-tdlib-1-8-0.js.shot @@ -874,7 +874,7 @@ declare module 'tdlib-types' { /** Describes a sticker */ _: 'sticker', /** The identifier of the sticker set to which the sticker belongs; 0 if none */ - set_id: number | string, + set_id: string, /** Sticker width; as defined by the sender */ width: number, /** Sticker height; as defined by the sender */ @@ -1078,7 +1078,7 @@ declare module 'tdlib-types' { /** Describes a game */ _: 'game', /** Game ID */ - id: number | string, + id: string, /** Game short name. To share a game use the URL https://t.me/{bot_username}?game={game_short_name} */ short_name: string, /** Game title */ @@ -1097,7 +1097,7 @@ declare module 'tdlib-types' { /** Describes a poll */ _: 'poll', /** Unique poll identifier */ - id: number | string, + id: string, /** Poll question; 1-300 characters */ question: string, /** List of poll answer options */ @@ -1125,7 +1125,7 @@ declare module 'tdlib-types' { * Photo identifier; 0 for an empty photo. Can be used to find a photo in a list * of user profile photos */ - id: number | string, + id: string, /** * A small (160x160) user profile photo. The file can be downloaded only before * the photo is changed @@ -1267,7 +1267,7 @@ declare module 'tdlib-types' { /** Describes a chat or user profile photo */ _: 'chatPhoto', /** Unique photo identifier */ - id: number | string, + id: string, /** Point in time (Unix timestamp) when the photo has been added */ added_date: number, /** Photo minithumbnail; may be null */ @@ -2205,7 +2205,7 @@ declare module 'tdlib-types' { */ is_all_history_available: boolean, /** Identifier of the supergroup sticker set; 0 if none */ - sticker_set_id: number | string, + sticker_set_id: string, /** Location to which the supergroup is connected; may be null */ location?: chatLocation, /** @@ -2532,7 +2532,7 @@ declare module 'tdlib-types' { * Unique identifier of an album this message belongs to. Only audios, documents, * photos and videos can be grouped together in albums */ - media_album_id: number | string, + media_album_id: string, /** * If non-empty, contains a human-readable description of the reason why access * to this message must be restricted @@ -3050,7 +3050,7 @@ declare module 'tdlib-types' { * A parameter used to determine order of the chat in the chat list. Chats must * be sorted by the pair (order, chat.id) in descending order */ - order: number | string, + order: string, /** True, if the chat is pinned in the chat list */ is_pinned: boolean, /** Source of the chat in the chat list; may be null */ @@ -4572,7 +4572,7 @@ declare module 'tdlib-types' { /** Contains information about an invoice payment form */ _: 'paymentForm', /** The payment form identifier */ - id: number | string, + id: string, /** Full information of the invoice */ invoice: invoice, /** Payment form URL */ @@ -5784,7 +5784,7 @@ declare module 'tdlib-types' { * Identifier of the game; may be different from the games presented in the message * with the game */ - game_id: number | string, + game_id: string, /** New score */ score: number, } @@ -7160,7 +7160,7 @@ declare module 'tdlib-types' { /** Represents a sticker set */ _: 'stickerSet', /** Identifier of the sticker set */ - id: number | string, + id: string, /** Title of the sticker set */ title: string, /** Name of the sticker set */ @@ -7204,7 +7204,7 @@ declare module 'tdlib-types' { /** Represents short information about a sticker set */ _: 'stickerSetInfo', /** Identifier of the sticker set */ - id: number | string, + id: string, /** Title of the sticker set */ title: string, /** Name of the sticker set */ @@ -7337,7 +7337,7 @@ declare module 'tdlib-types' { /** Describes a server for relaying call data */ _: 'callServer', /** Server identifier */ - id: number | string, + id: string, /** Server IPv4 address */ ip_address: string, /** Server IPv6 address */ @@ -8217,7 +8217,7 @@ declare module 'tdlib-types' { */ _: 'inlineQueryResults', /** Unique identifier of the inline query */ - inline_query_id: number | string, + inline_query_id: string, /** The offset for the next request. If empty, there are no more results */ next_offset: string, /** Results of the query */ @@ -8510,9 +8510,9 @@ declare module 'tdlib-types' { /** The supergroup sticker set was changed */ _: 'chatEventStickerSetChanged', /** Previous identifier of the chat sticker set; 0 if none */ - old_sticker_set_id: number | string, + old_sticker_set_id: string, /** New identifier of the chat sticker set; 0 if none */ - new_sticker_set_id: number | string, + new_sticker_set_id: string, } export type chatEventLocationChanged = { @@ -8603,7 +8603,7 @@ declare module 'tdlib-types' { /** Represents a chat event */ _: 'chatEvent', /** Chat event identifier */ - id: number | string, + id: string, /** Point in time (Unix timestamp) when the event happened */ date: number, /** Identifier of the user or chat who performed the action */ @@ -8939,7 +8939,7 @@ declare module 'tdlib-types' { */ _: 'pushReceiverId', /** The globally unique identifier of push notification subscription */ - id: number | string, + id: string, } export type backgroundFillSolid = { @@ -9078,7 +9078,7 @@ declare module 'tdlib-types' { /** Describes a chat background */ _: 'background', /** Unique background identifier */ - id: number | string, + id: string, /** True, if this is one of default backgrounds */ is_default: boolean, /** True, if the background is dark and is recommended to be used with dark theme */ @@ -9631,7 +9631,7 @@ declare module 'tdlib-types' { /** Represents an integer option */ _: 'optionValueInteger', /** The value of the option */ - value: number | string, + value: string, } export type optionValueInteger$Input = { @@ -10016,7 +10016,7 @@ declare module 'tdlib-types' { */ _: 'session', /** Session identifier */ - id: number | string, + id: string, /** True, if this session is the current session */ is_current: boolean, /** True, if a password is needed to complete authorization of the session */ @@ -10082,7 +10082,7 @@ declare module 'tdlib-types' { /** Contains information about one website the current user is logged in with Telegram */ _: 'connectedWebsite', /** Website identifier */ - id: number | string, + id: string, /** The domain name of the website */ domain_name: string, /** User identifier of a bot linked with the website */ @@ -10957,7 +10957,7 @@ declare module 'tdlib-types' { /** A URL linking to a sticker set */ _: 'tMeUrlTypeStickerSet', /** Identifier of the sticker set */ - sticker_set_id: number | string, + sticker_set_id: string, } export type tMeUrl = { @@ -12081,7 +12081,7 @@ declare module 'tdlib-types' { /** The file generation process needs to be started by the application */ _: 'updateFileGenerationStart', /** Unique identifier for the generation process */ - generation_id: number | string, + generation_id: string, /** The path to a file from which a new file is generated; may be empty */ original_path: string, /** The path to a file that must be created and where the new file is generated */ @@ -12098,7 +12098,7 @@ declare module 'tdlib-types' { /** File generation is no longer needed */ _: 'updateFileGenerationStop', /** Unique identifier for the generation process */ - generation_id: number | string, + generation_id: string, } export type updateCall = { @@ -12202,7 +12202,7 @@ declare module 'tdlib-types' { /** True, if the list of installed mask sticker sets was updated */ is_masks: boolean, /** The new list of installed ordinary sticker sets */ - sticker_set_ids: Array, + sticker_set_ids: Array, } export type updateTrendingStickerSets = { @@ -12348,7 +12348,7 @@ declare module 'tdlib-types' { /** A new incoming inline query; for bots only */ _: 'updateNewInlineQuery', /** Unique query identifier */ - id: number | string, + id: string, /** Identifier of the user who sent the query */ sender_user_id: number, /** User location; may be null */ @@ -12380,7 +12380,7 @@ declare module 'tdlib-types' { /** A new incoming callback query; for bots only */ _: 'updateNewCallbackQuery', /** Unique query identifier */ - id: number | string, + id: string, /** Identifier of the user who sent the query */ sender_user_id: number, /** Identifier of the chat where the query was sent */ @@ -12388,7 +12388,7 @@ declare module 'tdlib-types' { /** Identifier of the message, from which the query originated */ message_id: number, /** Identifier that uniquely corresponds to the chat to which the message was sent */ - chat_instance: number | string, + chat_instance: string, /** Query payload */ payload: CallbackQueryPayload, } @@ -12397,13 +12397,13 @@ declare module 'tdlib-types' { /** A new incoming callback query from a message sent via a bot; for bots only */ _: 'updateNewInlineCallbackQuery', /** Unique query identifier */ - id: number | string, + id: string, /** Identifier of the user who sent the query */ sender_user_id: number, /** Identifier of the inline message, from which the query originated */ inline_message_id: string, /** An identifier uniquely corresponding to the chat a message was sent to */ - chat_instance: number | string, + chat_instance: string, /** Query payload */ payload: CallbackQueryPayload, } @@ -12415,7 +12415,7 @@ declare module 'tdlib-types' { */ _: 'updateNewShippingQuery', /** Unique query identifier */ - id: number | string, + id: string, /** Identifier of the user who sent the query */ sender_user_id: number, /** Invoice payload */ @@ -12431,7 +12431,7 @@ declare module 'tdlib-types' { */ _: 'updateNewPreCheckoutQuery', /** Unique query identifier */ - id: number | string, + id: string, /** Identifier of the user who sent the query */ sender_user_id: number, /** Currency for the product price */ @@ -12457,7 +12457,7 @@ declare module 'tdlib-types' { /** A new incoming query; for bots only */ _: 'updateNewCustomQuery', /** The query identifier */ - id: number | string, + id: string, /** JSON-serialized query data */ data: string, /** Query timeout */ @@ -12475,7 +12475,7 @@ declare module 'tdlib-types' { /** A user changed the answer to a poll; for bots only */ _: 'updatePollAnswer', /** Unique poll identifier */ - poll_id: number | string, + poll_id: string, /** The user, who changed the answer to the poll */ user_id: number, /** 0-based identifiers of answer options, chosen by the user */ diff --git a/typings/tdlib-types.d.ts b/typings/tdlib-types.d.ts index f7ff5d6..96f5777 100644 --- a/typings/tdlib-types.d.ts +++ b/typings/tdlib-types.d.ts @@ -903,7 +903,7 @@ declare module 'tdlib-types' { */ _: 'stickerFullTypeCustomEmoji', /** Identifier of the custom emoji */ - custom_emoji_id: number | string, + custom_emoji_id: string, /** * True, if the sticker must be repainted to a text color in messages, the color * of the Telegram Premium badge in emoji status, white color on chat photos, or @@ -1075,9 +1075,9 @@ declare module 'tdlib-types' { /** Describes a sticker */ _: 'sticker', /** Unique sticker identifier within the set; 0 if none */ - id: number | string, + id: string, /** Identifier of the sticker set to which the sticker belongs; 0 if none */ - set_id: number | string, + set_id: string, /** Sticker width; as defined by the sender */ width: number, /** Sticker height; as defined by the sender */ @@ -1297,7 +1297,7 @@ declare module 'tdlib-types' { */ _: 'game', /** Unique game identifier */ - id: number | string, + id: string, /** Game short name */ short_name: string, /** Game title */ @@ -1334,7 +1334,7 @@ declare module 'tdlib-types' { /** Describes a poll */ _: 'poll', /** Unique poll identifier */ - id: number | string, + id: string, /** Poll question; 1-300 characters. Only custom emoji entities are allowed */ question: formattedText, /** List of poll answer options */ @@ -1359,7 +1359,7 @@ declare module 'tdlib-types' { /** Describes a chat background */ _: 'background', /** Unique background identifier */ - id: number | string, + id: string, /** True, if this is one of default backgrounds */ is_default: boolean, /** True, if the background is dark and is recommended to be used with dark theme */ @@ -1401,7 +1401,7 @@ declare module 'tdlib-types' { * Photo identifier; 0 for an empty photo. Can be used to find a photo in a list * of user profile photos */ - id: number | string, + id: string, /** * A small (160x160) user profile photo. The file can be downloaded only before * the photo is changed @@ -1953,9 +1953,9 @@ declare module 'tdlib-types' { /** Information about the sticker, which was used to create the chat photo */ _: 'chatPhotoStickerTypeRegularOrMask', /** Sticker set identifier */ - sticker_set_id: number | string, + sticker_set_id: string, /** Identifier of the sticker in the set */ - sticker_id: number | string, + sticker_id: string, } export type chatPhotoStickerTypeRegularOrMask$Input = { @@ -1971,7 +1971,7 @@ declare module 'tdlib-types' { /** Information about the custom emoji, which was used to create the chat photo */ _: 'chatPhotoStickerTypeCustomEmoji', /** Identifier of the custom emoji */ - custom_emoji_id: number | string, + custom_emoji_id: string, } export type chatPhotoStickerTypeCustomEmoji$Input = { @@ -2026,7 +2026,7 @@ declare module 'tdlib-types' { /** Describes a chat or user profile photo */ _: 'chatPhoto', /** Unique photo identifier */ - id: number | string, + id: string, /** Point in time (Unix timestamp) when the photo has been added */ added_date: number, /** Photo minithumbnail; may be null */ @@ -2658,7 +2658,7 @@ declare module 'tdlib-types' { /** Describes a custom emoji to be shown instead of the Telegram Premium badge */ _: 'emojiStatus', /** Identifier of the custom emoji in stickerFormatTgs format */ - custom_emoji_id: number | string, + custom_emoji_id: string, /** Point in time (Unix timestamp) when the status will expire; 0 if never */ expiration_date: number, } @@ -2676,7 +2676,7 @@ declare module 'tdlib-types' { /** Contains a list of custom emoji identifiers for emoji statuses */ _: 'emojiStatuses', /** The list of custom emoji identifiers */ - custom_emoji_ids: Array, + custom_emoji_ids: Array, } export type usernames = { @@ -2726,7 +2726,7 @@ declare module 'tdlib-types' { * Identifier of a custom emoji to be shown on the reply header and link preview * background; 0 if none. For Telegram Premium users only */ - background_custom_emoji_id: number | string, + background_custom_emoji_id: string, /** * Identifier of the accent color for the user's profile; -1 if none. For Telegram * Premium users only @@ -2736,7 +2736,7 @@ declare module 'tdlib-types' { * Identifier of a custom emoji to be shown on the background of the user's profile; * 0 if none. For Telegram Premium users only */ - profile_background_custom_emoji_id: number | string, + profile_background_custom_emoji_id: string, /** * Emoji status to be shown instead of the default Telegram Premium badge; may * be null. For Telegram Premium users only @@ -3669,12 +3669,12 @@ declare module 'tdlib-types' { * Identifier of the supergroup sticker set that must be shown before user sticker * sets; 0 if none */ - sticker_set_id: number | string, + sticker_set_id: string, /** * Identifier of the custom emoji sticker set that can be used in the supergroup * without Telegram Premium subscription; 0 if none */ - custom_emoji_sticker_set_id: number | string, + custom_emoji_sticker_set_id: string, /** Location to which the supergroup is connected; may be null if none */ location?: chatLocation, /** @@ -3926,7 +3926,7 @@ declare module 'tdlib-types' { /** A reaction with a custom emoji */ _: 'reactionTypeCustomEmoji', /** Unique identifier of the custom emoji */ - custom_emoji_id: number | string, + custom_emoji_id: string, } export type reactionTypeCustomEmoji$Input = { @@ -4063,7 +4063,7 @@ declare module 'tdlib-types' { /** Contains information about an effect added to a message */ _: 'messageEffect', /** Unique identifier of the effect */ - id: number | string, + id: string, /** Static icon for the effect in WEBP format; may be null if none */ static_icon?: sticker, /** Emoji corresponding to the effect that can be used if static icon isn't available */ @@ -4409,9 +4409,9 @@ declare module 'tdlib-types' { * Unique identifier of an album this message belongs to; 0 if none. Only audios, * documents, photos and videos can be grouped together in albums */ - media_album_id: number | string, + media_album_id: string, /** Unique identifier of the effect added to the message; 0 if none */ - effect_id: number | string, + effect_id: string, /** * If non-empty, contains a human-readable description of the reason why access * to this message must be restricted @@ -4604,7 +4604,7 @@ declare module 'tdlib-types' { /** Identifier of the accent color for title, button text and message background */ accent_color_id: number, /** Identifier of a custom emoji to be shown on the message background; 0 if none */ - background_custom_emoji_id: number | string, + background_custom_emoji_id: string, /** * If non-empty, additional information about the sponsored message to be shown * along with the message @@ -4775,7 +4775,7 @@ declare module 'tdlib-types' { * Identifier of the notification sound to be played for messages; 0 if sound is * disabled */ - sound_id: number | string, + sound_id: string, /** * If true, the value for the relevant type of chat or the forum chat is used instead * of show_preview @@ -4793,7 +4793,7 @@ declare module 'tdlib-types' { * Identifier of the notification sound to be played for stories; 0 if sound is * disabled */ - story_sound_id: number | string, + story_sound_id: string, /** If true, the value for the relevant type of chat is used instead of show_story_sender */ use_default_show_story_sender: boolean, /** True, if the sender of stories must be displayed in notifications */ @@ -4890,7 +4890,7 @@ declare module 'tdlib-types' { /** Time left before notifications will be unmuted, in seconds */ mute_for: number, /** Identifier of the notification sound to be played; 0 if sound is disabled */ - sound_id: number | string, + sound_id: string, /** True, if message content must be displayed in notifications */ show_preview: boolean, /** @@ -4904,7 +4904,7 @@ declare module 'tdlib-types' { * Identifier of the notification sound to be played for stories; 0 if sound is * disabled */ - story_sound_id: number | string, + story_sound_id: string, /** True, if the sender of stories must be displayed in notifications */ show_story_sender: boolean, /** @@ -4992,7 +4992,7 @@ declare module 'tdlib-types' { /** Source of story reactions for which notifications are shown */ story_reaction_source: ReactionNotificationSource, /** Identifier of the notification sound to be played; 0 if sound is disabled */ - sound_id: number | string, + sound_id: string, /** True, if reaction sender and emoji must be displayed in notifications */ show_preview: boolean, } @@ -5404,7 +5404,7 @@ declare module 'tdlib-types' { * A parameter used to determine order of the chat in the chat list. Chats must * be sorted by the pair (order, chat.id) in descending order */ - order: number | string, + order: string, /** True, if the chat is pinned in the chat list */ is_pinned: boolean, /** Source of the chat in the chat list; may be null */ @@ -5514,14 +5514,14 @@ declare module 'tdlib-types' { * Identifier of a custom emoji to be shown on the reply header and link preview * background for messages sent by the chat; 0 if none */ - background_custom_emoji_id: number | string, + background_custom_emoji_id: string, /** Identifier of the profile accent color for the chat's profile; -1 if none */ profile_accent_color_id: number, /** * Identifier of a custom emoji to be shown on the background of the chat's profile; * 0 if none */ - profile_background_custom_emoji_id: number | string, + profile_background_custom_emoji_id: string, /** Actions that non-administrator chat members are allowed to take in the chat */ permissions: chatPermissions, /** Last message in the chat; may be null if none or unknown */ @@ -6390,7 +6390,7 @@ declare module 'tdlib-types' { /** Contains information about a Web App */ _: 'webAppInfo', /** Unique identifier for the Web App launch */ - launch_id: number | string, + launch_id: string, /** A Web App URL to open in a web view */ url: string, } @@ -6448,7 +6448,7 @@ declare module 'tdlib-types' { * A parameter used to determine order of the topic in the topic list. Topics must * be sorted by the order in descending order */ - order: number | string, + order: string, /** Last message in the topic; may be null if none or unknown */ last_message?: message, /** A draft of a message in the topic; may be null if none */ @@ -6461,7 +6461,7 @@ declare module 'tdlib-types' { /** Color of the topic icon in RGB format */ color: number, /** Unique identifier of the custom emoji shown on the topic icon; 0 if none */ - custom_emoji_id: number | string, + custom_emoji_id: string, } export type forumTopicIcon$Input = { @@ -7296,7 +7296,7 @@ declare module 'tdlib-types' { /** Cryptocurrency used to pay for the item */ cryptocurrency: string, /** The paid amount, in the smallest units of the cryptocurrency */ - cryptocurrency_amount: number | string, + cryptocurrency_amount: string, /** Individual URL for the item on https://fragment.com */ url: string, } @@ -7645,7 +7645,7 @@ declare module 'tdlib-types' { /** Contains information about an invoice payment form */ _: 'paymentForm', /** The payment form identifier */ - id: number | string, + id: string, /** Type of the payment form */ type: PaymentFormType, /** User identifier of the seller bot */ @@ -9070,7 +9070,7 @@ declare module 'tdlib-types' { * New unique identifier of the custom emoji shown on the topic icon; 0 if none. * Must be ignored if edit_icon_custom_emoji_id is false */ - icon_custom_emoji_id: number | string, + icon_custom_emoji_id: string, } export type messageForumTopicIsClosedToggled = { @@ -9113,7 +9113,7 @@ declare module 'tdlib-types' { * Identifier of the game; may be different from the games presented in the message * with the game */ - game_id: number | string, + game_id: string, /** New score */ score: number, } @@ -9175,7 +9175,7 @@ declare module 'tdlib-types' { /** Cryptocurrency used to pay for the gift; may be empty if none */ cryptocurrency: string, /** The paid amount, in the smallest units of the cryptocurrency; 0 if none */ - cryptocurrency_amount: number | string, + cryptocurrency_amount: string, /** Number of months the Telegram Premium subscription will be active */ month_count: number, /** A sticker to be shown in the message; may be null if unknown */ @@ -9201,7 +9201,7 @@ declare module 'tdlib-types' { /** Cryptocurrency used to pay for the gift; may be empty if none or unknown */ cryptocurrency: string, /** The paid amount, in the smallest units of the cryptocurrency; 0 if unknown */ - cryptocurrency_amount: number | string, + cryptocurrency_amount: string, /** * Number of months the Telegram Premium subscription will be active after code * activation @@ -9613,7 +9613,7 @@ declare module 'tdlib-types' { */ _: 'textEntityTypeCustomEmoji', /** Unique identifier of the custom emoji */ - custom_emoji_id: number | string, + custom_emoji_id: string, } export type textEntityTypeCustomEmoji$Input = { @@ -10974,7 +10974,7 @@ declare module 'tdlib-types' { /** Represents a sticker set */ _: 'stickerSet', /** Identifier of the sticker set */ - id: number | string, + id: string, /** Title of the sticker set */ title: string, /** Name of the sticker set */ @@ -11028,7 +11028,7 @@ declare module 'tdlib-types' { /** Represents short information about a sticker set */ _: 'stickerSetInfo', /** Identifier of the sticker set */ - id: number | string, + id: string, /** Title of the sticker set */ title: string, /** Name of the sticker set */ @@ -11649,7 +11649,7 @@ declare module 'tdlib-types' { * Unique identifier of an album this message belongs to; 0 if none. Only audios, * documents, photos and videos can be grouped together in albums */ - media_album_id: number | string, + media_album_id: string, /** Content of the message */ content: MessageContent, /** Inline keyboard reply markup for the message; may be null if none */ @@ -11829,7 +11829,7 @@ declare module 'tdlib-types' { /** Describes a prepaid Telegram Premium giveaway */ _: 'prepaidPremiumGiveaway', /** Unique identifier of the prepaid giveaway */ - id: number | string, + id: string, /** Number of users which will receive Telegram Premium subscription gift codes */ winner_count: number, /** @@ -12032,7 +12032,7 @@ declare module 'tdlib-types' { /** Describes a server for relaying call data */ _: 'callServer', /** Server identifier */ - id: number | string, + id: string, /** Server IPv4 address */ ip_address: string, /** Server IPv6 address */ @@ -13289,7 +13289,7 @@ declare module 'tdlib-types' { */ _: 'inlineQueryResults', /** Unique identifier of the inline query */ - inline_query_id: number | string, + inline_query_id: string, /** Button to be shown above inline query results; may be null */ button?: inlineQueryResultsButton, /** Results of the query */ @@ -13578,18 +13578,18 @@ declare module 'tdlib-types' { /** The supergroup sticker set was changed */ _: 'chatEventStickerSetChanged', /** Previous identifier of the chat sticker set; 0 if none */ - old_sticker_set_id: number | string, + old_sticker_set_id: string, /** New identifier of the chat sticker set; 0 if none */ - new_sticker_set_id: number | string, + new_sticker_set_id: string, } export type chatEventCustomEmojiStickerSetChanged = { /** The supergroup sticker set with allowed custom emoji was changed */ _: 'chatEventCustomEmojiStickerSetChanged', /** Previous identifier of the chat sticker set; 0 if none */ - old_sticker_set_id: number | string, + old_sticker_set_id: string, /** New identifier of the chat sticker set; 0 if none */ - new_sticker_set_id: number | string, + new_sticker_set_id: string, } export type chatEventTitleChanged = { @@ -13625,11 +13625,11 @@ declare module 'tdlib-types' { /** Previous identifier of chat accent color */ old_accent_color_id: number, /** Previous identifier of the custom emoji; 0 if none */ - old_background_custom_emoji_id: number | string, + old_background_custom_emoji_id: string, /** New identifier of chat accent color */ new_accent_color_id: number, /** New identifier of the custom emoji; 0 if none */ - new_background_custom_emoji_id: number | string, + new_background_custom_emoji_id: string, } export type chatEventProfileAccentColorChanged = { @@ -13638,11 +13638,11 @@ declare module 'tdlib-types' { /** Previous identifier of chat's profile accent color; -1 if none */ old_profile_accent_color_id: number, /** Previous identifier of the custom emoji; 0 if none */ - old_profile_background_custom_emoji_id: number | string, + old_profile_background_custom_emoji_id: string, /** New identifier of chat's profile accent color; -1 if none */ new_profile_accent_color_id: number, /** New identifier of the custom emoji; 0 if none */ - new_profile_background_custom_emoji_id: number | string, + new_profile_background_custom_emoji_id: string, } export type chatEventHasProtectedContentToggled = { @@ -13805,7 +13805,7 @@ declare module 'tdlib-types' { /** Represents a chat event */ _: 'chatEvent', /** Chat event identifier */ - id: number | string, + id: string, /** Point in time (Unix timestamp) when the event happened */ date: number, /** Identifier of the user or chat who performed the action */ @@ -14973,7 +14973,7 @@ declare module 'tdlib-types' { */ _: 'pushReceiverId', /** The globally unique identifier of push notification subscription */ - id: number | string, + id: string, } export type backgroundFillSolid = { @@ -15738,7 +15738,7 @@ declare module 'tdlib-types' { /** Describes a notification sound in MP3 format */ _: 'notificationSound', /** Unique identifier of the notification sound */ - id: number | string, + id: string, /** Duration of the sound, in seconds */ duration: number, /** Point in time (Unix timestamp) when the sound was created */ @@ -15814,7 +15814,7 @@ declare module 'tdlib-types' { /** Represents an integer option */ _: 'optionValueInteger', /** The value of the option */ - value: number | string, + value: string, } export type optionValueInteger$Input = { @@ -16479,7 +16479,7 @@ declare module 'tdlib-types' { */ _: 'session', /** Session identifier */ - id: number | string, + id: string, /** True, if this session is the current session */ is_current: boolean, /** @@ -16553,7 +16553,7 @@ declare module 'tdlib-types' { /** Contains information about an unconfirmed session */ _: 'unconfirmedSession', /** Session identifier */ - id: number | string, + id: string, /** Point in time (Unix timestamp) when the user has logged in */ log_in_date: number, /** @@ -16572,7 +16572,7 @@ declare module 'tdlib-types' { /** Contains information about one website the current user is logged in with Telegram */ _: 'connectedWebsite', /** Website identifier */ - id: number | string, + id: string, /** The domain name of the website */ domain_name: string, /** User identifier of a bot linked with the website */ @@ -18505,7 +18505,7 @@ declare module 'tdlib-types' { /** A URL linking to a sticker set */ _: 'tMeUrlTypeStickerSet', /** Identifier of the sticker set */ - sticker_set_id: number | string, + sticker_set_id: string, } export type tMeUrl = { @@ -19063,17 +19063,17 @@ declare module 'tdlib-types' { /** Cryptocurrency in which revenue is calculated */ cryptocurrency: string, /** Total amount of the cryptocurrency earned, in the smallest units of the cryptocurrency */ - total_amount: number | string, + total_amount: string, /** * Amount of the cryptocurrency that isn't withdrawn yet, in the smallest units * of the cryptocurrency */ - balance_amount: number | string, + balance_amount: string, /** * Amount of the cryptocurrency available for withdrawal, in the smallest units * of the cryptocurrency */ - available_amount: number | string, + available_amount: string, } export type chatRevenueStatistics = { @@ -19164,7 +19164,7 @@ declare module 'tdlib-types' { /** Cryptocurrency in which revenue is calculated */ cryptocurrency: string, /** The withdrawn amount, in the smallest units of the cryptocurrency */ - cryptocurrency_amount: number | string, + cryptocurrency_amount: string, /** Type of the transaction */ type: ChatRevenueTransactionType, } @@ -19474,14 +19474,14 @@ declare module 'tdlib-types' { * The new identifier of a custom emoji to be shown on the reply header and link * preview background; 0 if none */ - background_custom_emoji_id: number | string, + background_custom_emoji_id: string, /** The new chat profile accent color identifier; -1 if none */ profile_accent_color_id: number, /** * The new identifier of a custom emoji to be shown on the profile background; * 0 if none */ - profile_background_custom_emoji_id: number | string, + profile_background_custom_emoji_id: string, } export type updateChatPermissions = { @@ -19901,7 +19901,7 @@ declare module 'tdlib-types' { /** Chat identifier, which notification settings must be applied to the added notifications */ notification_settings_chat_id: number, /** Identifier of the notification sound to be played; 0 if sound is disabled */ - notification_sound_id: number | string, + notification_sound_id: string, /** * Total number of unread notifications in the group, can be bigger than number * of active notifications @@ -20074,7 +20074,7 @@ declare module 'tdlib-types' { /** The file generation process needs to be started by the application */ _: 'updateFileGenerationStart', /** Unique identifier for the generation process */ - generation_id: number | string, + generation_id: string, /** The path to a file from which a new file is generated; may be empty */ original_path: string, /** The path to a file that must be created and where the new file is generated */ @@ -20091,7 +20091,7 @@ declare module 'tdlib-types' { /** File generation is no longer needed */ _: 'updateFileGenerationStop', /** Unique identifier for the generation process */ - generation_id: number | string, + generation_id: string, } export type updateFileDownloads = { @@ -20333,7 +20333,7 @@ declare module 'tdlib-types' { /** Type of the affected stickers */ sticker_type: StickerType, /** The new list of installed ordinary sticker sets */ - sticker_set_ids: Array, + sticker_set_ids: Array, } export type updateTrendingStickerSets = { @@ -20381,7 +20381,7 @@ declare module 'tdlib-types' { */ _: 'updateSavedNotificationSounds', /** The new list of identifiers of saved notification sounds */ - notification_sound_ids: Array, + notification_sound_ids: Array, } export type updateDefaultBackground = { @@ -20491,7 +20491,7 @@ declare module 'tdlib-types' { /** A message was sent by an opened Web App, so the Web App needs to be closed */ _: 'updateWebAppMessageSent', /** Identifier of Web App launch */ - web_app_launch_id: number | string, + web_app_launch_id: string, } export type updateActiveEmojiReactions = { @@ -20505,9 +20505,9 @@ declare module 'tdlib-types' { /** The list of available message effects has changed */ _: 'updateAvailableMessageEffects', /** The new list of available message effects from emoji reactions */ - reaction_effect_ids: Array, + reaction_effect_ids: Array, /** The new list of available message effects from Premium stickers */ - sticker_effect_ids: Array, + sticker_effect_ids: Array, } export type updateDefaultReactionType = { @@ -20686,7 +20686,7 @@ declare module 'tdlib-types' { /** A new incoming inline query; for bots only */ _: 'updateNewInlineQuery', /** Unique query identifier */ - id: number | string, + id: string, /** Identifier of the user who sent the query */ sender_user_id: number, /** User location; may be null */ @@ -20718,7 +20718,7 @@ declare module 'tdlib-types' { /** A new incoming callback query; for bots only */ _: 'updateNewCallbackQuery', /** Unique query identifier */ - id: number | string, + id: string, /** Identifier of the user who sent the query */ sender_user_id: number, /** Identifier of the chat where the query was sent */ @@ -20726,7 +20726,7 @@ declare module 'tdlib-types' { /** Identifier of the message from which the query originated */ message_id: number, /** Identifier that uniquely corresponds to the chat to which the message was sent */ - chat_instance: number | string, + chat_instance: string, /** Query payload */ payload: CallbackQueryPayload, } @@ -20735,13 +20735,13 @@ declare module 'tdlib-types' { /** A new incoming callback query from a message sent via a bot; for bots only */ _: 'updateNewInlineCallbackQuery', /** Unique query identifier */ - id: number | string, + id: string, /** Identifier of the user who sent the query */ sender_user_id: number, /** Identifier of the inline message from which the query originated */ inline_message_id: string, /** An identifier uniquely corresponding to the chat a message was sent to */ - chat_instance: number | string, + chat_instance: string, /** Query payload */ payload: CallbackQueryPayload, } @@ -20753,7 +20753,7 @@ declare module 'tdlib-types' { */ _: 'updateNewShippingQuery', /** Unique query identifier */ - id: number | string, + id: string, /** Identifier of the user who sent the query */ sender_user_id: number, /** Invoice payload */ @@ -20769,7 +20769,7 @@ declare module 'tdlib-types' { */ _: 'updateNewPreCheckoutQuery', /** Unique query identifier */ - id: number | string, + id: string, /** Identifier of the user who sent the query */ sender_user_id: number, /** Currency for the product price */ @@ -20795,7 +20795,7 @@ declare module 'tdlib-types' { /** A new incoming query; for bots only */ _: 'updateNewCustomQuery', /** The query identifier */ - id: number | string, + id: string, /** JSON-serialized query data */ data: string, /** Query timeout */ @@ -20813,7 +20813,7 @@ declare module 'tdlib-types' { /** A user changed the answer to a poll; for bots only */ _: 'updatePollAnswer', /** Unique poll identifier */ - poll_id: number | string, + poll_id: string, /** Identifier of the message sender that changed the answer to the poll */ voter_id: MessageSender, /** 0-based identifiers of answer options, chosen by the user */