tdlib-schema 1.7.0.1 → 1.7.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (466) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/bin/parser +6 -6
  4. data/lib/tdlib/client_methods.rb +171 -168
  5. data/lib/tdlib/types/account_ttl.rb +1 -1
  6. data/lib/tdlib/types/address.rb +6 -6
  7. data/lib/tdlib/types/animated_chat_photo.rb +2 -2
  8. data/lib/tdlib/types/animation.rb +5 -5
  9. data/lib/tdlib/types/audio.rb +5 -5
  10. data/lib/tdlib/types/authentication_code_info.rb +2 -2
  11. data/lib/tdlib/types/authentication_code_type/call.rb +1 -1
  12. data/lib/tdlib/types/authentication_code_type/flash_call.rb +1 -1
  13. data/lib/tdlib/types/authentication_code_type/sms.rb +1 -1
  14. data/lib/tdlib/types/authentication_code_type/telegram_message.rb +1 -1
  15. data/lib/tdlib/types/authorization_state/wait_other_device_confirmation.rb +1 -1
  16. data/lib/tdlib/types/authorization_state/wait_password.rb +3 -3
  17. data/lib/tdlib/types/auto_download_settings.rb +4 -4
  18. data/lib/tdlib/types/background.rb +2 -2
  19. data/lib/tdlib/types/background_fill/gradient.rb +3 -3
  20. data/lib/tdlib/types/background_fill/solid.rb +1 -1
  21. data/lib/tdlib/types/background_type/pattern.rb +1 -1
  22. data/lib/tdlib/types/bank_card_action_open_url.rb +2 -2
  23. data/lib/tdlib/types/bank_card_info.rb +1 -1
  24. data/lib/tdlib/types/basic_group.rb +3 -3
  25. data/lib/tdlib/types/basic_group_full_info.rb +2 -2
  26. data/lib/tdlib/types/bot_command.rb +2 -2
  27. data/lib/tdlib/types/bot_info.rb +1 -1
  28. data/lib/tdlib/types/call.rb +2 -2
  29. data/lib/tdlib/types/call_id.rb +1 -1
  30. data/lib/tdlib/types/call_protocol.rb +3 -3
  31. data/lib/tdlib/types/call_server.rb +4 -4
  32. data/lib/tdlib/types/call_server_type/telegram_reflector.rb +1 -1
  33. data/lib/tdlib/types/call_server_type/webrtc.rb +2 -2
  34. data/lib/tdlib/types/call_state/ready.rb +3 -3
  35. data/lib/tdlib/types/callback_query_answer.rb +2 -2
  36. data/lib/tdlib/types/callback_query_payload/data.rb +1 -1
  37. data/lib/tdlib/types/callback_query_payload/data_with_password.rb +2 -2
  38. data/lib/tdlib/types/callback_query_payload/game.rb +1 -1
  39. data/lib/tdlib/types/can_transfer_ownership_result/password_too_fresh.rb +1 -1
  40. data/lib/tdlib/types/can_transfer_ownership_result/session_too_fresh.rb +1 -1
  41. data/lib/tdlib/types/chat.rb +9 -9
  42. data/lib/tdlib/types/chat_action/uploading_document.rb +1 -1
  43. data/lib/tdlib/types/chat_action/uploading_photo.rb +1 -1
  44. data/lib/tdlib/types/chat_action/uploading_video.rb +1 -1
  45. data/lib/tdlib/types/chat_action/uploading_video_note.rb +1 -1
  46. data/lib/tdlib/types/chat_action/uploading_voice_note.rb +1 -1
  47. data/lib/tdlib/types/chat_action_bar/report_add_block.rb +1 -1
  48. data/lib/tdlib/types/chat_administrator.rb +2 -2
  49. data/lib/tdlib/types/chat_event.rb +3 -3
  50. data/lib/tdlib/types/chat_event_action/description_changed.rb +2 -2
  51. data/lib/tdlib/types/chat_event_action/linked_chat_changed.rb +2 -2
  52. data/lib/tdlib/types/chat_event_action/member_invited.rb +1 -1
  53. data/lib/tdlib/types/chat_event_action/member_promoted.rb +1 -1
  54. data/lib/tdlib/types/chat_event_action/message_ttl_setting_changed.rb +2 -2
  55. data/lib/tdlib/types/chat_event_action/slow_mode_delay_changed.rb +2 -2
  56. data/lib/tdlib/types/chat_event_action/sticker_set_changed.rb +2 -2
  57. data/lib/tdlib/types/chat_event_action/title_changed.rb +2 -2
  58. data/lib/tdlib/types/chat_event_action/username_changed.rb +2 -2
  59. data/lib/tdlib/types/chat_event_action/voice_chat_created.rb +1 -1
  60. data/lib/tdlib/types/chat_event_action/voice_chat_discarded.rb +1 -1
  61. data/lib/tdlib/types/chat_event_action/voice_chat_participant_volume_level_changed.rb +1 -1
  62. data/lib/tdlib/types/chat_filter.rb +5 -5
  63. data/lib/tdlib/types/chat_filter_info.rb +3 -3
  64. data/lib/tdlib/types/chat_invite_link.rb +7 -7
  65. data/lib/tdlib/types/chat_invite_link_count.rb +3 -3
  66. data/lib/tdlib/types/chat_invite_link_info.rb +5 -5
  67. data/lib/tdlib/types/chat_invite_link_member.rb +2 -2
  68. data/lib/tdlib/types/chat_invite_link_members.rb +1 -1
  69. data/lib/tdlib/types/chat_invite_links.rb +1 -1
  70. data/lib/tdlib/types/chat_list/filter.rb +1 -1
  71. data/lib/tdlib/types/chat_location.rb +1 -1
  72. data/lib/tdlib/types/chat_member.rb +2 -2
  73. data/lib/tdlib/types/chat_member_status/administrator.rb +2 -2
  74. data/lib/tdlib/types/chat_member_status/banned.rb +1 -1
  75. data/lib/tdlib/types/chat_member_status/creator.rb +2 -2
  76. data/lib/tdlib/types/chat_member_status/restricted.rb +1 -1
  77. data/lib/tdlib/types/chat_members.rb +1 -1
  78. data/lib/tdlib/types/chat_members_filter/mention.rb +1 -1
  79. data/lib/tdlib/types/chat_nearby.rb +2 -2
  80. data/lib/tdlib/types/chat_notification_settings.rb +2 -2
  81. data/lib/tdlib/types/chat_photo.rb +2 -2
  82. data/lib/tdlib/types/chat_photos.rb +1 -1
  83. data/lib/tdlib/types/chat_position.rb +1 -1
  84. data/lib/tdlib/types/chat_source/public_service_announcement.rb +2 -2
  85. data/lib/tdlib/types/chat_statistics/channel.rb +1 -1
  86. data/lib/tdlib/types/chat_statistics_administrator_actions_info.rb +4 -4
  87. data/lib/tdlib/types/chat_statistics_inviter_info.rb +2 -2
  88. data/lib/tdlib/types/chat_statistics_message_interaction_info.rb +3 -3
  89. data/lib/tdlib/types/chat_statistics_message_sender_info.rb +3 -3
  90. data/lib/tdlib/types/chat_type/basic_group.rb +1 -1
  91. data/lib/tdlib/types/chat_type/private.rb +1 -1
  92. data/lib/tdlib/types/chat_type/secret.rb +2 -2
  93. data/lib/tdlib/types/chat_type/supergroup.rb +1 -1
  94. data/lib/tdlib/types/chats.rb +2 -2
  95. data/lib/tdlib/types/connected_website.rb +10 -10
  96. data/lib/tdlib/types/contact.rb +5 -5
  97. data/lib/tdlib/types/count.rb +1 -1
  98. data/lib/tdlib/types/country_info.rb +4 -4
  99. data/lib/tdlib/types/custom_request_result.rb +1 -1
  100. data/lib/tdlib/types/database_statistics.rb +1 -1
  101. data/lib/tdlib/types/date.rb +3 -3
  102. data/lib/tdlib/types/date_range.rb +2 -2
  103. data/lib/tdlib/types/dated_file.rb +1 -1
  104. data/lib/tdlib/types/device_token/apple_push.rb +1 -1
  105. data/lib/tdlib/types/device_token/apple_push_vo_ip.rb +1 -1
  106. data/lib/tdlib/types/device_token/black_berry_push.rb +1 -1
  107. data/lib/tdlib/types/device_token/firebase_cloud_messaging.rb +1 -1
  108. data/lib/tdlib/types/device_token/microsoft_push.rb +1 -1
  109. data/lib/tdlib/types/device_token/microsoft_push_vo_ip.rb +1 -1
  110. data/lib/tdlib/types/device_token/simple_push.rb +2 -2
  111. data/lib/tdlib/types/device_token/tizen_push.rb +1 -1
  112. data/lib/tdlib/types/device_token/ubuntu_push.rb +1 -1
  113. data/lib/tdlib/types/device_token/web_push.rb +4 -4
  114. data/lib/tdlib/types/device_token/windows_push.rb +2 -2
  115. data/lib/tdlib/types/document.rb +2 -2
  116. data/lib/tdlib/types/draft_message.rb +2 -2
  117. data/lib/tdlib/types/email_address_authentication_code_info.rb +3 -2
  118. data/lib/tdlib/types/emojis.rb +1 -1
  119. data/lib/tdlib/types/encrypted_credentials.rb +3 -3
  120. data/lib/tdlib/types/encrypted_passport_element.rb +3 -3
  121. data/lib/tdlib/types/error.rb +2 -2
  122. data/lib/tdlib/types/file.rb +3 -3
  123. data/lib/tdlib/types/file_part.rb +1 -1
  124. data/lib/tdlib/types/formatted_text.rb +1 -1
  125. data/lib/tdlib/types/found_messages.rb +2 -2
  126. data/lib/tdlib/types/game.rb +4 -4
  127. data/lib/tdlib/types/game_high_score.rb +3 -3
  128. data/lib/tdlib/types/group_call.rb +6 -6
  129. data/lib/tdlib/types/group_call_id.rb +1 -1
  130. data/lib/tdlib/types/group_call_join_response_candidate.rb +13 -13
  131. data/lib/tdlib/types/group_call_participant.rb +4 -4
  132. data/lib/tdlib/types/group_call_payload.rb +2 -2
  133. data/lib/tdlib/types/group_call_payload_fingerprint.rb +3 -3
  134. data/lib/tdlib/types/hashtags.rb +1 -1
  135. data/lib/tdlib/types/http_url.rb +1 -1
  136. data/lib/tdlib/types/identity_document.rb +1 -1
  137. data/lib/tdlib/types/imported_contacts.rb +2 -2
  138. data/lib/tdlib/types/inline_keyboard_button.rb +1 -1
  139. data/lib/tdlib/types/inline_keyboard_button_type/callback.rb +1 -1
  140. data/lib/tdlib/types/inline_keyboard_button_type/callback_with_password.rb +1 -1
  141. data/lib/tdlib/types/inline_keyboard_button_type/login_url.rb +3 -3
  142. data/lib/tdlib/types/inline_keyboard_button_type/switch_inline.rb +1 -1
  143. data/lib/tdlib/types/inline_keyboard_button_type/url.rb +1 -1
  144. data/lib/tdlib/types/inline_query_result/animation.rb +2 -2
  145. data/lib/tdlib/types/inline_query_result/article.rb +4 -4
  146. data/lib/tdlib/types/inline_query_result/audio.rb +1 -1
  147. data/lib/tdlib/types/inline_query_result/contact.rb +1 -1
  148. data/lib/tdlib/types/inline_query_result/document.rb +3 -3
  149. data/lib/tdlib/types/inline_query_result/game.rb +1 -1
  150. data/lib/tdlib/types/inline_query_result/location.rb +2 -2
  151. data/lib/tdlib/types/inline_query_result/photo.rb +3 -3
  152. data/lib/tdlib/types/inline_query_result/sticker.rb +1 -1
  153. data/lib/tdlib/types/inline_query_result/venue.rb +1 -1
  154. data/lib/tdlib/types/inline_query_result/video.rb +3 -3
  155. data/lib/tdlib/types/inline_query_result/voice_note.rb +2 -2
  156. data/lib/tdlib/types/inline_query_results.rb +5 -5
  157. data/lib/tdlib/types/input_background/remote.rb +1 -1
  158. data/lib/tdlib/types/input_chat_photo/animation.rb +1 -1
  159. data/lib/tdlib/types/input_chat_photo/previous.rb +1 -1
  160. data/lib/tdlib/types/input_credentials/apple_pay.rb +1 -1
  161. data/lib/tdlib/types/input_credentials/google_pay.rb +1 -1
  162. data/lib/tdlib/types/input_credentials/new.rb +1 -1
  163. data/lib/tdlib/types/input_credentials/saved.rb +1 -1
  164. data/lib/tdlib/types/input_file/generated.rb +5 -5
  165. data/lib/tdlib/types/input_file/id.rb +1 -1
  166. data/lib/tdlib/types/input_file/local.rb +1 -1
  167. data/lib/tdlib/types/input_file/remote.rb +1 -1
  168. data/lib/tdlib/types/input_identity_document.rb +1 -1
  169. data/lib/tdlib/types/input_inline_query_result/animation.rb +9 -9
  170. data/lib/tdlib/types/input_inline_query_result/article.rb +7 -7
  171. data/lib/tdlib/types/input_inline_query_result/audio.rb +5 -5
  172. data/lib/tdlib/types/input_inline_query_result/contact.rb +4 -4
  173. data/lib/tdlib/types/input_inline_query_result/document.rb +9 -9
  174. data/lib/tdlib/types/input_inline_query_result/game.rb +2 -2
  175. data/lib/tdlib/types/input_inline_query_result/location.rb +6 -6
  176. data/lib/tdlib/types/input_inline_query_result/photo.rb +7 -7
  177. data/lib/tdlib/types/input_inline_query_result/sticker.rb +5 -5
  178. data/lib/tdlib/types/input_inline_query_result/venue.rb +4 -4
  179. data/lib/tdlib/types/input_inline_query_result/video.rb +10 -10
  180. data/lib/tdlib/types/input_inline_query_result/voice_note.rb +4 -4
  181. data/lib/tdlib/types/input_message_content/animation.rb +4 -4
  182. data/lib/tdlib/types/input_message_content/audio.rb +3 -3
  183. data/lib/tdlib/types/input_message_content/dice.rb +1 -1
  184. data/lib/tdlib/types/input_message_content/forwarded.rb +2 -2
  185. data/lib/tdlib/types/input_message_content/game.rb +2 -2
  186. data/lib/tdlib/types/input_message_content/invoice.rb +12 -10
  187. data/lib/tdlib/types/input_message_content/location.rb +3 -3
  188. data/lib/tdlib/types/input_message_content/photo.rb +4 -4
  189. data/lib/tdlib/types/input_message_content/poll.rb +4 -4
  190. data/lib/tdlib/types/input_message_content/sticker.rb +3 -3
  191. data/lib/tdlib/types/input_message_content/video.rb +5 -5
  192. data/lib/tdlib/types/input_message_content/video_note.rb +2 -2
  193. data/lib/tdlib/types/input_message_content/voice_note.rb +2 -2
  194. data/lib/tdlib/types/input_passport_element/email_address.rb +1 -1
  195. data/lib/tdlib/types/input_passport_element/phone_number.rb +1 -1
  196. data/lib/tdlib/types/input_passport_element_error.rb +1 -1
  197. data/lib/tdlib/types/input_passport_element_error_source/data_field.rb +2 -2
  198. data/lib/tdlib/types/input_passport_element_error_source/file.rb +1 -1
  199. data/lib/tdlib/types/input_passport_element_error_source/files.rb +1 -1
  200. data/lib/tdlib/types/input_passport_element_error_source/front_side.rb +1 -1
  201. data/lib/tdlib/types/input_passport_element_error_source/reverse_side.rb +1 -1
  202. data/lib/tdlib/types/input_passport_element_error_source/selfie.rb +1 -1
  203. data/lib/tdlib/types/input_passport_element_error_source/translation_file.rb +1 -1
  204. data/lib/tdlib/types/input_passport_element_error_source/translation_files.rb +1 -1
  205. data/lib/tdlib/types/input_passport_element_error_source/unspecified.rb +1 -1
  206. data/lib/tdlib/types/input_sticker/animated.rb +1 -1
  207. data/lib/tdlib/types/input_sticker/static.rb +1 -1
  208. data/lib/tdlib/types/input_thumbnail.rb +2 -2
  209. data/lib/tdlib/types/invoice.rb +3 -3
  210. data/lib/tdlib/types/json_object_member.rb +1 -1
  211. data/lib/tdlib/types/json_value/number.rb +1 -1
  212. data/lib/tdlib/types/json_value/string.rb +1 -1
  213. data/lib/tdlib/types/keyboard_button.rb +1 -1
  214. data/lib/tdlib/types/labeled_price_part.rb +2 -2
  215. data/lib/tdlib/types/language_pack_info.rb +10 -9
  216. data/lib/tdlib/types/language_pack_string.rb +1 -1
  217. data/lib/tdlib/types/language_pack_string_value/ordinary.rb +1 -1
  218. data/lib/tdlib/types/language_pack_string_value/pluralized.rb +6 -6
  219. data/lib/tdlib/types/local_file.rb +4 -4
  220. data/lib/tdlib/types/location.rb +3 -3
  221. data/lib/tdlib/types/log_stream/file.rb +2 -2
  222. data/lib/tdlib/types/log_tags.rb +1 -1
  223. data/lib/tdlib/types/log_verbosity_level.rb +1 -1
  224. data/lib/tdlib/types/login_url_info/open.rb +1 -1
  225. data/lib/tdlib/types/login_url_info/request_confirmation.rb +3 -3
  226. data/lib/tdlib/types/mask_position.rb +3 -3
  227. data/lib/tdlib/types/message.rb +15 -14
  228. data/lib/tdlib/types/message_content/basic_group_chat_create.rb +2 -2
  229. data/lib/tdlib/types/message_content/call.rb +1 -1
  230. data/lib/tdlib/types/message_content/chat_add_members.rb +1 -1
  231. data/lib/tdlib/types/message_content/chat_change_title.rb +1 -1
  232. data/lib/tdlib/types/message_content/chat_delete_member.rb +1 -1
  233. data/lib/tdlib/types/message_content/chat_set_ttl.rb +1 -1
  234. data/lib/tdlib/types/message_content/chat_upgrade_from.rb +2 -2
  235. data/lib/tdlib/types/message_content/chat_upgrade_to.rb +1 -1
  236. data/lib/tdlib/types/message_content/custom_service_action.rb +1 -1
  237. data/lib/tdlib/types/message_content/dice.rb +3 -3
  238. data/lib/tdlib/types/message_content/game_score.rb +3 -3
  239. data/lib/tdlib/types/message_content/invite_voice_chat_participants.rb +2 -2
  240. data/lib/tdlib/types/message_content/invoice.rb +6 -6
  241. data/lib/tdlib/types/message_content/location.rb +4 -4
  242. data/lib/tdlib/types/message_content/payment_successful.rb +4 -4
  243. data/lib/tdlib/types/message_content/payment_successful_bot.rb +7 -7
  244. data/lib/tdlib/types/message_content/pin_message.rb +1 -1
  245. data/lib/tdlib/types/message_content/proximity_alert_triggered.rb +1 -1
  246. data/lib/tdlib/types/message_content/supergroup_chat_create.rb +1 -1
  247. data/lib/tdlib/types/message_content/voice_chat_ended.rb +1 -1
  248. data/lib/tdlib/types/message_content/voice_chat_scheduled.rb +2 -2
  249. data/lib/tdlib/types/message_content/voice_chat_started.rb +1 -1
  250. data/lib/tdlib/types/message_content/website_connected.rb +1 -1
  251. data/lib/tdlib/types/message_file_type/group.rb +1 -1
  252. data/lib/tdlib/types/message_file_type/private.rb +1 -1
  253. data/lib/tdlib/types/message_forward_info.rb +5 -5
  254. data/lib/tdlib/types/message_forward_origin/channel.rb +3 -3
  255. data/lib/tdlib/types/message_forward_origin/chat.rb +2 -2
  256. data/lib/tdlib/types/message_forward_origin/hidden_user.rb +1 -1
  257. data/lib/tdlib/types/message_forward_origin/message_import.rb +1 -1
  258. data/lib/tdlib/types/message_forward_origin/user.rb +1 -1
  259. data/lib/tdlib/types/message_interaction_info.rb +2 -2
  260. data/lib/tdlib/types/message_link.rb +1 -1
  261. data/lib/tdlib/types/message_link_info.rb +1 -1
  262. data/lib/tdlib/types/message_reply_info.rb +4 -4
  263. data/lib/tdlib/types/message_scheduling_state/send_at_date.rb +1 -1
  264. data/lib/tdlib/types/message_sender/chat.rb +1 -1
  265. data/lib/tdlib/types/message_sender/user.rb +1 -1
  266. data/lib/tdlib/types/message_senders.rb +1 -1
  267. data/lib/tdlib/types/message_sending_state/failed.rb +3 -3
  268. data/lib/tdlib/types/message_thread_info.rb +2 -2
  269. data/lib/tdlib/types/messages.rb +1 -1
  270. data/lib/tdlib/types/minithumbnail.rb +3 -3
  271. data/lib/tdlib/types/network_statistics.rb +1 -1
  272. data/lib/tdlib/types/network_statistics_entry/call.rb +3 -3
  273. data/lib/tdlib/types/network_statistics_entry/file.rb +2 -2
  274. data/lib/tdlib/types/notification.rb +2 -2
  275. data/lib/tdlib/types/notification_group.rb +3 -3
  276. data/lib/tdlib/types/notification_type/new_call.rb +1 -1
  277. data/lib/tdlib/types/notification_type/new_push_message.rb +2 -2
  278. data/lib/tdlib/types/option_value/integer.rb +1 -1
  279. data/lib/tdlib/types/option_value/string.rb +1 -1
  280. data/lib/tdlib/types/order_info.rb +3 -3
  281. data/lib/tdlib/types/page_block/anchor.rb +1 -1
  282. data/lib/tdlib/types/page_block/author_date.rb +1 -1
  283. data/lib/tdlib/types/page_block/chat_link.rb +2 -2
  284. data/lib/tdlib/types/page_block/embedded.rb +4 -4
  285. data/lib/tdlib/types/page_block/embedded_post.rb +3 -3
  286. data/lib/tdlib/types/page_block/map.rb +3 -3
  287. data/lib/tdlib/types/page_block/photo.rb +1 -1
  288. data/lib/tdlib/types/page_block/preformatted.rb +1 -1
  289. data/lib/tdlib/types/page_block_list_item.rb +1 -1
  290. data/lib/tdlib/types/page_block_related_article.rb +5 -5
  291. data/lib/tdlib/types/page_block_table_cell.rb +2 -2
  292. data/lib/tdlib/types/passport_authorization_form.rb +2 -2
  293. data/lib/tdlib/types/passport_element/email_address.rb +1 -1
  294. data/lib/tdlib/types/passport_element/phone_number.rb +1 -1
  295. data/lib/tdlib/types/passport_element_error.rb +1 -1
  296. data/lib/tdlib/types/passport_element_error_source/data_field.rb +1 -1
  297. data/lib/tdlib/types/passport_element_error_source/file.rb +1 -1
  298. data/lib/tdlib/types/passport_element_error_source/translation_file.rb +1 -1
  299. data/lib/tdlib/types/password_state.rb +1 -1
  300. data/lib/tdlib/types/payment_form.rb +4 -4
  301. data/lib/tdlib/types/payment_form_theme.rb +6 -6
  302. data/lib/tdlib/types/payment_receipt.rb +7 -7
  303. data/lib/tdlib/types/payment_result.rb +1 -1
  304. data/lib/tdlib/types/payments_provider_stripe.rb +1 -1
  305. data/lib/tdlib/types/personal_details.rb +10 -9
  306. data/lib/tdlib/types/phone_number_info.rb +4 -3
  307. data/lib/tdlib/types/photo_size.rb +4 -4
  308. data/lib/tdlib/types/point.rb +2 -2
  309. data/lib/tdlib/types/poll.rb +6 -6
  310. data/lib/tdlib/types/poll_option.rb +3 -3
  311. data/lib/tdlib/types/poll_type/quiz.rb +1 -1
  312. data/lib/tdlib/types/profile_photo.rb +1 -1
  313. data/lib/tdlib/types/proxy.rb +4 -4
  314. data/lib/tdlib/types/proxy_type/http.rb +2 -2
  315. data/lib/tdlib/types/proxy_type/mtproto.rb +1 -1
  316. data/lib/tdlib/types/proxy_type/socks5.rb +2 -2
  317. data/lib/tdlib/types/push_message_content/animation.rb +1 -1
  318. data/lib/tdlib/types/push_message_content/chat_add_members.rb +1 -1
  319. data/lib/tdlib/types/push_message_content/chat_change_title.rb +1 -1
  320. data/lib/tdlib/types/push_message_content/chat_delete_member.rb +1 -1
  321. data/lib/tdlib/types/push_message_content/contact.rb +1 -1
  322. data/lib/tdlib/types/push_message_content/game.rb +1 -1
  323. data/lib/tdlib/types/push_message_content/game_score.rb +2 -2
  324. data/lib/tdlib/types/push_message_content/invoice.rb +1 -1
  325. data/lib/tdlib/types/push_message_content/media_album.rb +1 -1
  326. data/lib/tdlib/types/push_message_content/message_forwards.rb +1 -1
  327. data/lib/tdlib/types/push_message_content/photo.rb +1 -1
  328. data/lib/tdlib/types/push_message_content/poll.rb +1 -1
  329. data/lib/tdlib/types/push_message_content/sticker.rb +1 -1
  330. data/lib/tdlib/types/push_message_content/text.rb +1 -1
  331. data/lib/tdlib/types/push_message_content/video.rb +1 -1
  332. data/lib/tdlib/types/push_receiver_id.rb +1 -1
  333. data/lib/tdlib/types/recommended_chat_filter.rb +1 -1
  334. data/lib/tdlib/types/recovery_email_address.rb +1 -1
  335. data/lib/tdlib/types/remote_file.rb +3 -3
  336. data/lib/tdlib/types/rich_text/anchor.rb +1 -1
  337. data/lib/tdlib/types/rich_text/anchor_link.rb +2 -2
  338. data/lib/tdlib/types/rich_text/email_address.rb +1 -1
  339. data/lib/tdlib/types/rich_text/icon.rb +2 -2
  340. data/lib/tdlib/types/rich_text/phone_number.rb +1 -1
  341. data/lib/tdlib/types/rich_text/plain.rb +1 -1
  342. data/lib/tdlib/types/rich_text/reference.rb +3 -3
  343. data/lib/tdlib/types/rich_text/url.rb +1 -1
  344. data/lib/tdlib/types/saved_credentials.rb +2 -2
  345. data/lib/tdlib/types/scope_notification_settings.rb +2 -2
  346. data/lib/tdlib/types/seconds.rb +1 -1
  347. data/lib/tdlib/types/secret_chat.rb +4 -4
  348. data/lib/tdlib/types/session.rb +15 -15
  349. data/lib/tdlib/types/shipping_option.rb +2 -2
  350. data/lib/tdlib/types/statistical_graph/async.rb +1 -1
  351. data/lib/tdlib/types/statistical_graph/data.rb +2 -2
  352. data/lib/tdlib/types/statistical_graph/error.rb +1 -1
  353. data/lib/tdlib/types/statistical_value.rb +3 -3
  354. data/lib/tdlib/types/sticker.rb +4 -4
  355. data/lib/tdlib/types/sticker_set.rb +3 -3
  356. data/lib/tdlib/types/sticker_set_info.rb +4 -4
  357. data/lib/tdlib/types/sticker_sets.rb +1 -1
  358. data/lib/tdlib/types/storage_statistics.rb +2 -2
  359. data/lib/tdlib/types/storage_statistics_by_chat.rb +3 -3
  360. data/lib/tdlib/types/storage_statistics_by_file_type.rb +2 -2
  361. data/lib/tdlib/types/storage_statistics_fast.rb +5 -5
  362. data/lib/tdlib/types/suggested_action/convert_to_broadcast_group.rb +1 -1
  363. data/lib/tdlib/types/supergroup.rb +7 -6
  364. data/lib/tdlib/types/supergroup_full_info.rb +11 -11
  365. data/lib/tdlib/types/supergroup_members_filter/banned.rb +1 -1
  366. data/lib/tdlib/types/supergroup_members_filter/contacts.rb +1 -1
  367. data/lib/tdlib/types/supergroup_members_filter/mention.rb +2 -2
  368. data/lib/tdlib/types/supergroup_members_filter/restricted.rb +1 -1
  369. data/lib/tdlib/types/supergroup_members_filter/search.rb +1 -1
  370. data/lib/tdlib/types/t_me_url.rb +1 -1
  371. data/lib/tdlib/types/t_me_url_type/sticker_set.rb +1 -1
  372. data/lib/tdlib/types/t_me_url_type/supergroup.rb +1 -1
  373. data/lib/tdlib/types/t_me_url_type/user.rb +1 -1
  374. data/lib/tdlib/types/tdlib_parameters.rb +12 -11
  375. data/lib/tdlib/types/temporary_password_state.rb +1 -1
  376. data/lib/tdlib/types/terms_of_service.rb +1 -1
  377. data/lib/tdlib/types/text.rb +1 -1
  378. data/lib/tdlib/types/text_entity.rb +2 -2
  379. data/lib/tdlib/types/text_entity_type/mention_name.rb +1 -1
  380. data/lib/tdlib/types/text_entity_type/pre_code.rb +1 -1
  381. data/lib/tdlib/types/text_entity_type/text_url.rb +1 -1
  382. data/lib/tdlib/types/text_parse_mode/markdown.rb +1 -1
  383. data/lib/tdlib/types/thumbnail.rb +2 -2
  384. data/lib/tdlib/types/update/animation_search_parameters.rb +2 -2
  385. data/lib/tdlib/types/update/basic_group_full_info.rb +1 -1
  386. data/lib/tdlib/types/update/chat_action_bar.rb +1 -1
  387. data/lib/tdlib/types/update/chat_default_disable_notification.rb +1 -1
  388. data/lib/tdlib/types/update/chat_draft_message.rb +1 -1
  389. data/lib/tdlib/types/update/chat_has_scheduled_messages.rb +1 -1
  390. data/lib/tdlib/types/update/chat_is_blocked.rb +1 -1
  391. data/lib/tdlib/types/update/chat_is_marked_as_unread.rb +1 -1
  392. data/lib/tdlib/types/update/chat_last_message.rb +1 -1
  393. data/lib/tdlib/types/update/chat_member.rb +3 -3
  394. data/lib/tdlib/types/update/chat_message_ttl_setting.rb +2 -2
  395. data/lib/tdlib/types/update/chat_notification_settings.rb +1 -1
  396. data/lib/tdlib/types/update/chat_online_member_count.rb +2 -2
  397. data/lib/tdlib/types/update/chat_permissions.rb +1 -1
  398. data/lib/tdlib/types/update/chat_photo.rb +1 -1
  399. data/lib/tdlib/types/update/chat_position.rb +1 -1
  400. data/lib/tdlib/types/update/chat_read_inbox.rb +3 -3
  401. data/lib/tdlib/types/update/chat_read_outbox.rb +2 -2
  402. data/lib/tdlib/types/update/chat_reply_markup.rb +2 -2
  403. data/lib/tdlib/types/update/chat_title.rb +2 -2
  404. data/lib/tdlib/types/update/chat_unread_mention_count.rb +2 -2
  405. data/lib/tdlib/types/update/chat_voice_chat.rb +1 -1
  406. data/lib/tdlib/types/update/delete_messages.rb +2 -2
  407. data/lib/tdlib/types/update/dice_emojis.rb +1 -1
  408. data/lib/tdlib/types/update/favorite_stickers.rb +1 -1
  409. data/lib/tdlib/types/update/file_generation_start.rb +5 -5
  410. data/lib/tdlib/types/update/file_generation_stop.rb +1 -1
  411. data/lib/tdlib/types/update/group_call_participant.rb +1 -1
  412. data/lib/tdlib/types/update/installed_sticker_sets.rb +1 -1
  413. data/lib/tdlib/types/update/language_pack_strings.rb +2 -2
  414. data/lib/tdlib/types/update/message_content.rb +2 -2
  415. data/lib/tdlib/types/update/message_content_opened.rb +2 -2
  416. data/lib/tdlib/types/update/message_edited.rb +3 -3
  417. data/lib/tdlib/types/update/message_interaction_info.rb +2 -2
  418. data/lib/tdlib/types/update/message_is_pinned.rb +2 -2
  419. data/lib/tdlib/types/update/message_live_location_viewed.rb +2 -2
  420. data/lib/tdlib/types/update/message_mention_read.rb +3 -3
  421. data/lib/tdlib/types/update/message_send_acknowledged.rb +2 -2
  422. data/lib/tdlib/types/update/message_send_failed.rb +3 -3
  423. data/lib/tdlib/types/update/message_send_succeeded.rb +1 -1
  424. data/lib/tdlib/types/update/new_call_signaling_data.rb +2 -2
  425. data/lib/tdlib/types/update/new_callback_query.rb +5 -5
  426. data/lib/tdlib/types/update/new_chosen_inline_result.rb +4 -4
  427. data/lib/tdlib/types/update/new_custom_event.rb +1 -1
  428. data/lib/tdlib/types/update/new_custom_query.rb +3 -3
  429. data/lib/tdlib/types/update/new_inline_callback_query.rb +4 -4
  430. data/lib/tdlib/types/update/new_inline_query.rb +4 -4
  431. data/lib/tdlib/types/update/new_pre_checkout_query.rb +7 -7
  432. data/lib/tdlib/types/update/new_shipping_query.rb +3 -3
  433. data/lib/tdlib/types/update/notification.rb +1 -1
  434. data/lib/tdlib/types/update/notification_group.rb +5 -5
  435. data/lib/tdlib/types/update/option.rb +1 -1
  436. data/lib/tdlib/types/update/poll_answer.rb +3 -3
  437. data/lib/tdlib/types/update/recent_stickers.rb +1 -1
  438. data/lib/tdlib/types/update/saved_animations.rb +1 -1
  439. data/lib/tdlib/types/update/service_notification.rb +1 -1
  440. data/lib/tdlib/types/update/supergroup_full_info.rb +1 -1
  441. data/lib/tdlib/types/update/terms_of_service.rb +1 -1
  442. data/lib/tdlib/types/update/unread_chat_count.rb +5 -5
  443. data/lib/tdlib/types/update/unread_message_count.rb +2 -2
  444. data/lib/tdlib/types/update/user_chat_action.rb +3 -3
  445. data/lib/tdlib/types/update/user_full_info.rb +1 -1
  446. data/lib/tdlib/types/update/user_status.rb +1 -1
  447. data/lib/tdlib/types/user.rb +8 -8
  448. data/lib/tdlib/types/user_full_info.rb +3 -3
  449. data/lib/tdlib/types/user_privacy_setting_rule/allow_chat_members.rb +1 -1
  450. data/lib/tdlib/types/user_privacy_setting_rule/allow_users.rb +1 -1
  451. data/lib/tdlib/types/user_privacy_setting_rule/restrict_chat_members.rb +1 -1
  452. data/lib/tdlib/types/user_privacy_setting_rule/restrict_users.rb +1 -1
  453. data/lib/tdlib/types/user_status/offline.rb +1 -1
  454. data/lib/tdlib/types/user_status/online.rb +1 -1
  455. data/lib/tdlib/types/user_type/bot.rb +2 -1
  456. data/lib/tdlib/types/users.rb +2 -2
  457. data/lib/tdlib/types/validated_order_info.rb +1 -1
  458. data/lib/tdlib/types/venue.rb +5 -5
  459. data/lib/tdlib/types/video.rb +5 -5
  460. data/lib/tdlib/types/video_note.rb +2 -2
  461. data/lib/tdlib/types/voice_chat.rb +1 -1
  462. data/lib/tdlib/types/voice_note.rb +3 -3
  463. data/lib/tdlib/types/web_page.rb +12 -12
  464. data/lib/tdlib/types/web_page_instant_view.rb +2 -2
  465. data/tdlib-schema.gemspec +1 -1
  466. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '06833bb7bbf75ca157e2187c2de7eda3dd13e21c1d1340f76f2529ed330d2baa'
4
- data.tar.gz: 4c590aea530ac559bf5d0d957468caa4fde2552ad0096ad1bb91adac9b479a0c
3
+ metadata.gz: 691a931e650d64b73bfa8bfd024a999a5baf735233256e7174392a9b2feb3420
4
+ data.tar.gz: 0b187827046254185e492cd5ff7dba3f5efdc4d8454d1f08b37d9651d3a5ff4a
5
5
  SHA512:
6
- metadata.gz: 4273d6f45daa827cd8da621a5b064eadba30b9f5a955453c693e15beed610ca82f6c56ba882c04f4fdf24a777908a65a8b241ec9d522f1cf515ebc688a6e1e0b
7
- data.tar.gz: 4a1a0955bda57d7e1441de30406929136ead9bc19b4b1def816e626c02cd0c174ff3606ecf4aa2237ea6dd995df6ea2586647843ee0b21229124c5f0fbbdb807
6
+ metadata.gz: b709b5aa11b6948a393bde58d0b66f4a437709102b4bd2fd9c93b81c4dc0fecc5e43030b17e9c740ad1a9a5bf9d6194e1423589e3c470495f10444fa959f30d0
7
+ data.tar.gz: 70049cdc666212566af6516217bfd1024636b8823226995a72af77f98fc9b3a519482719be4f0be7e4eff49a3e8326f78a71f79199f5b6dec8291f2b036de82b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [1.7.0.2] - 2021-06-28
4
+
5
+ - Make types coercible
6
+
3
7
  ## [1.7.0.1] - 2021-06-25
4
8
 
5
9
  - Initial release
data/bin/parser CHANGED
@@ -8,11 +8,11 @@ def parse_tl_type(type)
8
8
  if (vector = type.scan(/[vV]ector<(.*)>/)).length > 0
9
9
  "TD::Types::Array.of(#{parse_tl_type(vector[0][0])})"
10
10
  elsif type.match?(/[iI]nt\d\d/)
11
- 'TD::Types::Integer'
11
+ 'TD::Types::Coercible::Integer'
12
12
  elsif type.match?(/[dD]ouble/)
13
- 'TD::Types::Float'
13
+ 'TD::Types::Coercible::Float'
14
14
  elsif type.match?(/[bB]ytes/)
15
- 'TD::Types::String'
15
+ 'TD::Types::Coercible::String'
16
16
  else
17
17
  "TD::Types::#{type.camelcase}"
18
18
  end
@@ -186,9 +186,9 @@ end
186
186
 
187
187
  def type_to_comment_type(type)
188
188
  type.gsub('TD::Types::Array.of(', 'Array<').gsub(')', '>').
189
- gsub('TD::Types::Integer', 'Integer').
190
- gsub('TD::Types::Float', 'Float').
191
- gsub('TD::Types::String', 'String').
189
+ gsub('TD::Types::Coercible::Integer', 'Integer').
190
+ gsub('TD::Types::Coercible::Float', 'Float').
191
+ gsub('TD::Types::Coercible::String', 'String').
192
192
  gsub('TD::Types::Bool', 'Boolean')
193
193
  end
194
194
 
@@ -14,7 +14,7 @@ module TD::ClientMethods
14
14
 
15
15
  # Accepts Telegram terms of services.
16
16
  #
17
- # @param terms_of_service_id [String] Terms of service identifier.
17
+ # @param terms_of_service_id [TD::Types::String] Terms of service identifier.
18
18
  # @return [TD::Types::Ok]
19
19
  def accept_terms_of_service(terms_of_service_id:)
20
20
  broadcast('@type' => 'acceptTermsOfService',
@@ -85,8 +85,8 @@ module TD::ClientMethods
85
85
  # Adds a custom server language pack to the list of installed language packs in current localization target.
86
86
  # Can be called before authorization.
87
87
  #
88
- # @param language_pack_id [String] Identifier of a language pack to be added; may be different from a name that is
89
- # used in an "https://t.me/setlanguage/" link.
88
+ # @param language_pack_id [TD::Types::String] Identifier of a language pack to be added; may be different from a name
89
+ # that is used in an "https://t.me/setlanguage/" link.
90
90
  # @return [TD::Types::Ok]
91
91
  def add_custom_server_language_pack(language_pack_id:)
92
92
  broadcast('@type' => 'addCustomServerLanguagePack',
@@ -128,7 +128,7 @@ module TD::ClientMethods
128
128
  # Can be called synchronously.
129
129
  #
130
130
  # @param verbosity_level [Integer] The minimum verbosity level needed for the message to be logged; 0-1023.
131
- # @param text [String] Text of a message to log.
131
+ # @param text [TD::Types::String] Text of a message to log.
132
132
  # @return [TD::Types::Ok]
133
133
  def add_log_message(verbosity_level:, text:)
134
134
  broadcast('@type' => 'addLogMessage',
@@ -150,7 +150,7 @@ module TD::ClientMethods
150
150
  # Adds a proxy server for network requests.
151
151
  # Can be called before authorization.
152
152
  #
153
- # @param server [String] Proxy server IP address.
153
+ # @param server [TD::Types::String] Proxy server IP address.
154
154
  # @param port [Integer] Proxy server port.
155
155
  # @param enable [Boolean] True, if the proxy should be enabled.
156
156
  # @param type [TD::Types::ProxyType] Proxy type.
@@ -207,7 +207,7 @@ module TD::ClientMethods
207
207
  # Returns the sticker set.
208
208
  #
209
209
  # @param user_id [Integer] Sticker set owner.
210
- # @param name [String] Sticker set name.
210
+ # @param name [TD::Types::String] Sticker set name.
211
211
  # @param sticker [TD::Types::InputSticker] Sticker to add to the set.
212
212
  # @return [TD::Types::StickerSet]
213
213
  def add_sticker_to_set(user_id:, name:, sticker:)
@@ -220,9 +220,9 @@ module TD::ClientMethods
220
220
  # Sets the result of a callback query; for bots only.
221
221
  #
222
222
  # @param callback_query_id [Integer] Identifier of the callback query.
223
- # @param text [String] Text of the answer.
223
+ # @param text [TD::Types::String] Text of the answer.
224
224
  # @param show_alert [Boolean] If true, an alert should be shown to the user instead of a toast notification.
225
- # @param url [String] URL to be opened.
225
+ # @param url [TD::Types::String] URL to be opened.
226
226
  # @param cache_time [Integer] Time during which the result of the query can be cached, in seconds.
227
227
  # @return [TD::Types::Ok]
228
228
  def answer_callback_query(callback_query_id:, text:, show_alert:, url:, cache_time:)
@@ -237,7 +237,7 @@ module TD::ClientMethods
237
237
  # Answers a custom query; for bots only.
238
238
  #
239
239
  # @param custom_query_id [Integer] Identifier of a custom query.
240
- # @param data [String] JSON-serialized answer to the query.
240
+ # @param data [TD::Types::String] JSON-serialized answer to the query.
241
241
  # @return [TD::Types::Ok]
242
242
  def answer_custom_query(custom_query_id:, data:)
243
243
  broadcast('@type' => 'answerCustomQuery',
@@ -251,10 +251,11 @@ module TD::ClientMethods
251
251
  # @param is_personal [Boolean] True, if the result of the query can be cached for the specified user.
252
252
  # @param results [Array<TD::Types::InputInlineQueryResult>] The results of the query.
253
253
  # @param cache_time [Integer] Allowed time to cache the results of the query, in seconds.
254
- # @param next_offset [String] Offset for the next inline query; pass an empty string if there are no more results.
255
- # @param switch_pm_text [String] If non-empty, this text should be shown on the button that opens a private chat with
256
- # the bot and sends a start message to the bot with the parameter switch_pm_parameter.
257
- # @param switch_pm_parameter [String] The parameter for the bot start message.
254
+ # @param next_offset [TD::Types::String] Offset for the next inline query; pass an empty string if there are no more
255
+ # results.
256
+ # @param switch_pm_text [TD::Types::String] If non-empty, this text should be shown on the button that opens a
257
+ # private chat with the bot and sends a start message to the bot with the parameter switch_pm_parameter.
258
+ # @param switch_pm_parameter [TD::Types::String] The parameter for the bot start message.
258
259
  # @return [TD::Types::Ok]
259
260
  def answer_inline_query(inline_query_id:, is_personal:, results:, cache_time:, next_offset:, switch_pm_text:,
260
261
  switch_pm_parameter:)
@@ -271,7 +272,7 @@ module TD::ClientMethods
271
272
  # Sets the result of a pre-checkout query; for bots only.
272
273
  #
273
274
  # @param pre_checkout_query_id [Integer] Identifier of the pre-checkout query.
274
- # @param error_message [String] An error message, empty on success.
275
+ # @param error_message [TD::Types::String] An error message, empty on success.
275
276
  # @return [TD::Types::Ok]
276
277
  def answer_pre_checkout_query(pre_checkout_query_id:, error_message:)
277
278
  broadcast('@type' => 'answerPreCheckoutQuery',
@@ -283,7 +284,7 @@ module TD::ClientMethods
283
284
  #
284
285
  # @param shipping_query_id [Integer] Identifier of the shipping query.
285
286
  # @param shipping_options [Array<TD::Types::ShippingOption>] Available shipping options.
286
- # @param error_message [String] An error message, empty on success.
287
+ # @param error_message [TD::Types::String] An error message, empty on success.
287
288
  # @return [TD::Types::Ok]
288
289
  def answer_shipping_query(shipping_query_id:, shipping_options:, error_message:)
289
290
  broadcast('@type' => 'answerShippingQuery',
@@ -375,7 +376,7 @@ module TD::ClientMethods
375
376
  # Changes the phone number of the user and sends an authentication code to the user's new phone number.
376
377
  # On success, returns information about the sent code.
377
378
  #
378
- # @param phone_number [String] The new phone number of the user in international format.
379
+ # @param phone_number [TD::Types::String] The new phone number of the user in international format.
379
380
  # @param settings [TD::Types::PhoneNumberAuthenticationSettings] Settings for the authentication of the user's phone
380
381
  # number.
381
382
  # @return [TD::Types::AuthenticationCodeInfo]
@@ -403,7 +404,7 @@ module TD::ClientMethods
403
404
  # Works only when the current authorization state is authorizationStateWaitPhoneNumber.
404
405
  # Can be used instead of setAuthenticationPhoneNumber and checkAuthenticationCode to log in.
405
406
  #
406
- # @param token [String] The bot token.
407
+ # @param token [TD::Types::String] The bot token.
407
408
  # @return [TD::Types::Ok]
408
409
  def check_authentication_bot_token(token:)
409
410
  broadcast('@type' => 'checkAuthenticationBotToken',
@@ -413,7 +414,8 @@ module TD::ClientMethods
413
414
  # Checks the authentication code.
414
415
  # Works only when the current authorization state is authorizationStateWaitCode.
415
416
  #
416
- # @param code [String] The verification code received via SMS, Telegram message, phone call, or flash call.
417
+ # @param code [TD::Types::String] The verification code received via SMS, Telegram message, phone call, or flash
418
+ # call.
417
419
  # @return [TD::Types::Ok]
418
420
  def check_authentication_code(code:)
419
421
  broadcast('@type' => 'checkAuthenticationCode',
@@ -423,7 +425,7 @@ module TD::ClientMethods
423
425
  # Checks the authentication password for correctness.
424
426
  # Works only when the current authorization state is authorizationStateWaitPassword.
425
427
  #
426
- # @param password [String] The password to check.
428
+ # @param password [TD::Types::String] The password to check.
427
429
  # @return [TD::Types::Ok]
428
430
  def check_authentication_password(password:)
429
431
  broadcast('@type' => 'checkAuthenticationPassword',
@@ -432,7 +434,7 @@ module TD::ClientMethods
432
434
 
433
435
  # Checks the authentication code sent to confirm a new phone number of the user.
434
436
  #
435
- # @param code [String] Verification code received by SMS, phone call or flash call.
437
+ # @param code [TD::Types::String] Verification code received by SMS, phone call or flash call.
436
438
  # @return [TD::Types::Ok]
437
439
  def check_change_phone_number_code(code:)
438
440
  broadcast('@type' => 'checkChangePhoneNumberCode',
@@ -441,8 +443,8 @@ module TD::ClientMethods
441
443
 
442
444
  # Checks the validity of an invite link for a chat and returns information about the corresponding chat.
443
445
  #
444
- # @param invite_link [String] Invite link to be checked; must have URL "t.me", "telegram.me", or "telegram.dog" and
445
- # query beginning with "/joinchat/" or "/+".
446
+ # @param invite_link [TD::Types::String] Invite link to be checked; must have URL "t.me", "telegram.me", or
447
+ # "telegram.dog" and query beginning with "/joinchat/" or "/+".
446
448
  # @return [TD::Types::ChatInviteLinkInfo]
447
449
  def check_chat_invite_link(invite_link:)
448
450
  broadcast('@type' => 'checkChatInviteLink',
@@ -453,7 +455,7 @@ module TD::ClientMethods
453
455
  #
454
456
  # @param chat_id [Integer] Chat identifier; should be identifier of a supergroup chat, or a channel chat, or a
455
457
  # private chat with self, or zero if chat is being created.
456
- # @param username [String] Username to be checked.
458
+ # @param username [TD::Types::String] Username to be checked.
457
459
  # @return [TD::Types::CheckChatUsernameResult]
458
460
  def check_chat_username(chat_id:, username:)
459
461
  broadcast('@type' => 'checkChatUsername',
@@ -483,7 +485,7 @@ module TD::ClientMethods
483
485
 
484
486
  # Checks the email address verification code for Telegram Passport.
485
487
  #
486
- # @param code [String] Verification code.
488
+ # @param code [TD::Types::String] Verification code.
487
489
  # @return [TD::Types::Ok]
488
490
  def check_email_address_verification_code(code:)
489
491
  broadcast('@type' => 'checkEmailAddressVerificationCode',
@@ -492,7 +494,7 @@ module TD::ClientMethods
492
494
 
493
495
  # Checks phone number confirmation code.
494
496
  #
495
- # @param code [String] The phone number confirmation code.
497
+ # @param code [TD::Types::String] The phone number confirmation code.
496
498
  # @return [TD::Types::Ok]
497
499
  def check_phone_number_confirmation_code(code:)
498
500
  broadcast('@type' => 'checkPhoneNumberConfirmationCode',
@@ -501,7 +503,7 @@ module TD::ClientMethods
501
503
 
502
504
  # Checks the phone number verification code for Telegram Passport.
503
505
  #
504
- # @param code [String] Verification code.
506
+ # @param code [TD::Types::String] Verification code.
505
507
  # @return [TD::Types::Ok]
506
508
  def check_phone_number_verification_code(code:)
507
509
  broadcast('@type' => 'checkPhoneNumberVerificationCode',
@@ -510,7 +512,7 @@ module TD::ClientMethods
510
512
 
511
513
  # Checks the 2-step verification recovery email address verification code.
512
514
  #
513
- # @param code [String] Verification code.
515
+ # @param code [TD::Types::String] Verification code.
514
516
  # @return [TD::Types::PasswordState]
515
517
  def check_recovery_email_address_code(code:)
516
518
  broadcast('@type' => 'checkRecoveryEmailAddressCode',
@@ -522,7 +524,7 @@ module TD::ClientMethods
522
524
  # Returns an empty string on failure.
523
525
  # Can be called synchronously.
524
526
  #
525
- # @param file_name [String] File name or path to the file.
527
+ # @param file_name [TD::Types::String] File name or path to the file.
526
528
  # @return [TD::Types::Text]
527
529
  def clean_file_name(file_name:)
528
530
  broadcast('@type' => 'cleanFileName',
@@ -594,7 +596,7 @@ module TD::ClientMethods
594
596
  # Confirms QR code authentication on another device.
595
597
  # Returns created session on success.
596
598
  #
597
- # @param link [String] A link from a QR code.
599
+ # @param link [TD::Types::String] A link from a QR code.
598
600
  # The link must be scanned by the in-app camera.
599
601
  # @return [TD::Types::Session]
600
602
  def confirm_qr_code_authentication(link:)
@@ -657,7 +659,7 @@ module TD::ClientMethods
657
659
  # Returns the newly created chat.
658
660
  #
659
661
  # @param user_ids [Array<Integer>] Identifiers of users to be added to the basic group.
660
- # @param title [String] Title of the new basic group; 1-128 characters.
662
+ # @param title [TD::Types::String] Title of the new basic group; 1-128 characters.
661
663
  # @return [TD::Types::Chat]
662
664
  def create_new_basic_group_chat(user_ids:, title:)
663
665
  broadcast('@type' => 'createNewBasicGroupChat',
@@ -679,8 +681,8 @@ module TD::ClientMethods
679
681
  # Returns the newly created sticker set.
680
682
  #
681
683
  # @param user_id [Integer, nil] Sticker set owner.
682
- # @param title [String, nil] Sticker set title; 1-64 characters.
683
- # @param name [String, nil] Sticker set name.
684
+ # @param title [TD::Types::String, nil] Sticker set title; 1-64 characters.
685
+ # @param name [TD::Types::String, nil] Sticker set name.
684
686
  # Can contain only English letters, digits and underscores.
685
687
  # Must end with *"_by_<bot username>"* (*<bot_username>* is case insensitive); 1-64 characters.
686
688
  # @param is_masks [Boolean, nil] True, if stickers are masks.
@@ -700,9 +702,9 @@ module TD::ClientMethods
700
702
  # Creates a new supergroup or channel and sends a corresponding messageSupergroupChatCreate.
701
703
  # Returns the newly created chat.
702
704
  #
703
- # @param title [String] Title of the new chat; 1-128 characters.
705
+ # @param title [TD::Types::String] Title of the new chat; 1-128 characters.
704
706
  # @param is_channel [Boolean] True, if a channel chat needs to be created.
705
- # @param description [String] Chat description; 0-255 characters.
707
+ # @param description [TD::Types::String] Chat description; 0-255 characters.
706
708
  # @param location [TD::Types::ChatLocation] Chat location if a location-based supergroup is being created.
707
709
  # @param for_import [Boolean] True, if the supergroup is created for importing messages using importMessage.
708
710
  # @return [TD::Types::Chat]
@@ -750,7 +752,7 @@ module TD::ClientMethods
750
752
 
751
753
  # Creates a new temporary password for processing payments.
752
754
  #
753
- # @param password [String] Persistent user password.
755
+ # @param password [TD::Types::String] Persistent user password.
754
756
  # @param valid_for [Integer] Time during which the temporary password will be valid, in seconds; should be between 60
755
757
  # and 86400.
756
758
  # @return [TD::Types::TemporaryPasswordState]
@@ -764,7 +766,7 @@ module TD::ClientMethods
764
766
  # Available only for basic groups, supergroups and channels; requires can_manage_voice_chats rights.
765
767
  #
766
768
  # @param chat_id [Integer] Chat identifier, in which the voice chat will be created.
767
- # @param title [String, nil] Group call title; if empty, chat title will be used.
769
+ # @param title [TD::Types::String, nil] Group call title; if empty, chat title will be used.
768
770
  # @param start_date [Integer] Point in time (Unix timestamp) when the group call is supposed to be started by an
769
771
  # administrator; 0 to start the voice chat immediately.
770
772
  # The date must be at least 10 seconds and at most 8 days in the future.
@@ -780,7 +782,7 @@ module TD::ClientMethods
780
782
  # The phone number of the account can be used to create a new account.
781
783
  # Can be called before authorization when the current authorization state is authorizationStateWaitPassword.
782
784
  #
783
- # @param reason [String, nil] The reason why the account was deleted; optional.
785
+ # @param reason [TD::Types::String, nil] The reason why the account was deleted; optional.
784
786
  # @return [TD::Types::Ok]
785
787
  def delete_account(reason: nil)
786
788
  broadcast('@type' => 'deleteAccount',
@@ -884,7 +886,7 @@ module TD::ClientMethods
884
886
  # deleted.
885
887
  # Can be called before authorization.
886
888
  #
887
- # @param language_pack_id [String] Identifier of the language pack to delete.
889
+ # @param language_pack_id [TD::Types::String] Identifier of the language pack to delete.
888
890
  # @return [TD::Types::Ok]
889
891
  def delete_language_pack(language_pack_id:)
890
892
  broadcast('@type' => 'deleteLanguagePack',
@@ -928,7 +930,7 @@ module TD::ClientMethods
928
930
  # other links.
929
931
  #
930
932
  # @param chat_id [Integer] Chat identifier.
931
- # @param invite_link [String] Invite link to revoke.
933
+ # @param invite_link [TD::Types::String] Invite link to revoke.
932
934
  # @return [TD::Types::Ok]
933
935
  def delete_revoked_chat_invite_link(chat_id:, invite_link:)
934
936
  broadcast('@type' => 'deleteRevokedChatInviteLink',
@@ -1054,7 +1056,7 @@ module TD::ClientMethods
1054
1056
  # other links.
1055
1057
  #
1056
1058
  # @param chat_id [Integer] Chat identifier.
1057
- # @param invite_link [String] Invite link to be edited.
1059
+ # @param invite_link [TD::Types::String] Invite link to be edited.
1058
1060
  # @param expire_date [Integer] Point in time (Unix timestamp) when the link will expire; pass 0 if never.
1059
1061
  # @param member_limit [Integer] The maximum number of chat members that can join the chat by the link simultaneously;
1060
1062
  # 0-99999; pass 0 if not limited.
@@ -1079,7 +1081,7 @@ module TD::ClientMethods
1079
1081
 
1080
1082
  # Edits the caption of an inline message sent via a bot; for bots only.
1081
1083
  #
1082
- # @param inline_message_id [String] Inline message identifier.
1084
+ # @param inline_message_id [TD::Types::String] Inline message identifier.
1083
1085
  # @param reply_markup [TD::Types::ReplyMarkup] The new message reply markup.
1084
1086
  # @param caption [TD::Types::FormattedText] New message content caption; 0-GetOption("message_caption_length_max")
1085
1087
  # characters.
@@ -1093,7 +1095,7 @@ module TD::ClientMethods
1093
1095
 
1094
1096
  # Edits the content of a live location in an inline message sent via a bot; for bots only.
1095
1097
  #
1096
- # @param inline_message_id [String] Inline message identifier.
1098
+ # @param inline_message_id [TD::Types::String] Inline message identifier.
1097
1099
  # @param reply_markup [TD::Types::ReplyMarkup] The new message reply markup.
1098
1100
  # @param location [TD::Types::Location, nil] New location content of the message; may be null.
1099
1101
  # Pass null to stop sharing the live location.
@@ -1115,7 +1117,7 @@ module TD::ClientMethods
1115
1117
  # Edits the content of a message with an animation, an audio, a document, a photo or a video in an inline message
1116
1118
  # sent via a bot; for bots only.
1117
1119
  #
1118
- # @param inline_message_id [String] Inline message identifier.
1120
+ # @param inline_message_id [TD::Types::String] Inline message identifier.
1119
1121
  # @param reply_markup [TD::Types::ReplyMarkup] The new message reply markup; for bots only.
1120
1122
  # @param input_message_content [TD::Types::InputMessageContent] New content of the message.
1121
1123
  # Must be one of the following types: inputMessageAnimation, inputMessageAudio, inputMessageDocument,
@@ -1130,7 +1132,7 @@ module TD::ClientMethods
1130
1132
 
1131
1133
  # Edits the reply markup of an inline message sent via a bot; for bots only.
1132
1134
  #
1133
- # @param inline_message_id [String] Inline message identifier.
1135
+ # @param inline_message_id [TD::Types::String] Inline message identifier.
1134
1136
  # @param reply_markup [TD::Types::ReplyMarkup] The new message reply markup.
1135
1137
  # @return [TD::Types::Ok]
1136
1138
  def edit_inline_message_reply_markup(inline_message_id:, reply_markup:)
@@ -1141,7 +1143,7 @@ module TD::ClientMethods
1141
1143
 
1142
1144
  # Edits the text of an inline text or game message sent via a bot; for bots only.
1143
1145
  #
1144
- # @param inline_message_id [String] Inline message identifier.
1146
+ # @param inline_message_id [TD::Types::String] Inline message identifier.
1145
1147
  # @param reply_markup [TD::Types::ReplyMarkup] The new message reply markup.
1146
1148
  # @param input_message_content [TD::Types::InputMessageContent] New text content of the message.
1147
1149
  # Should be of type inputMessageText.
@@ -1265,7 +1267,7 @@ module TD::ClientMethods
1265
1267
  # Can be called before authorization.
1266
1268
  #
1267
1269
  # @param proxy_id [Integer] Proxy identifier.
1268
- # @param server [String] Proxy server IP address.
1270
+ # @param server [TD::Types::String] Proxy server IP address.
1269
1271
  # @param port [Integer] Proxy server port.
1270
1272
  # @param enable [Boolean] True, if the proxy should be enabled.
1271
1273
  # @param type [TD::Types::ProxyType] Proxy type.
@@ -1361,7 +1363,7 @@ module TD::ClientMethods
1361
1363
 
1362
1364
  # Returns all available Telegram Passport elements.
1363
1365
  #
1364
- # @param password [String] Password of the current user.
1366
+ # @param password [TD::Types::String] Password of the current user.
1365
1367
  # @return [TD::Types::PassportElements]
1366
1368
  def get_all_passport_elements(password:)
1367
1369
  broadcast('@type' => 'getAllPassportElements',
@@ -1418,7 +1420,7 @@ module TD::ClientMethods
1418
1420
 
1419
1421
  # Constructs a persistent HTTP URL for a background.
1420
1422
  #
1421
- # @param name [String] Background name.
1423
+ # @param name [TD::Types::String] Background name.
1422
1424
  # @param type [TD::Types::BackgroundType] Background type.
1423
1425
  # @return [TD::Types::HttpUrl]
1424
1426
  def get_background_url(name:, type:)
@@ -1438,7 +1440,7 @@ module TD::ClientMethods
1438
1440
 
1439
1441
  # Returns information about a bank card.
1440
1442
  #
1441
- # @param bank_card_number [String] The bank card number.
1443
+ # @param bank_card_number [TD::Types::String] The bank card number.
1442
1444
  # @return [TD::Types::BankCardInfo]
1443
1445
  def get_bank_card_info(bank_card_number:)
1444
1446
  broadcast('@type' => 'getBankCardInfo',
@@ -1527,7 +1529,7 @@ module TD::ClientMethods
1527
1529
  # e., in order of decreasing event_id).
1528
1530
  #
1529
1531
  # @param chat_id [Integer] Chat identifier.
1530
- # @param query [String] Search query by which to filter events.
1532
+ # @param query [TD::Types::String] Search query by which to filter events.
1531
1533
  # @param from_event_id [Integer] Identifier of an event from which to return results.
1532
1534
  # Use 0 to get results from the latest events.
1533
1535
  # @param limit [Integer] The maximum number of events to return; up to 100.
@@ -1597,7 +1599,7 @@ module TD::ClientMethods
1597
1599
  # get other links.
1598
1600
  #
1599
1601
  # @param chat_id [Integer] Chat identifier.
1600
- # @param invite_link [String] Invite link to get.
1602
+ # @param invite_link [TD::Types::String] Invite link to get.
1601
1603
  # @return [TD::Types::ChatInviteLink]
1602
1604
  def get_chat_invite_link(chat_id:, invite_link:)
1603
1605
  broadcast('@type' => 'getChatInviteLink',
@@ -1620,7 +1622,7 @@ module TD::ClientMethods
1620
1622
  # other links.
1621
1623
  #
1622
1624
  # @param chat_id [Integer] Chat identifier.
1623
- # @param invite_link [String] Invite link for which to return chat members.
1625
+ # @param invite_link [TD::Types::String] Invite link for which to return chat members.
1624
1626
  # @param offset_member [TD::Types::ChatInviteLinkMember] A chat member from which to return next chat members; use
1625
1627
  # null to get results from the beginning.
1626
1628
  # @param limit [Integer] The maximum number of chat members to return.
@@ -1643,8 +1645,8 @@ module TD::ClientMethods
1643
1645
  # @param is_revoked [Boolean] Pass true if revoked links needs to be returned instead of active or expired.
1644
1646
  # @param offset_date [Integer] Creation date of an invite link starting after which to return invite links; use 0 to
1645
1647
  # get results from the beginning.
1646
- # @param offset_invite_link [String] Invite link starting after which to return invite links; use empty string to get
1647
- # results from the beginning.
1648
+ # @param offset_invite_link [TD::Types::String] Invite link starting after which to return invite links; use empty
1649
+ # string to get results from the beginning.
1648
1650
  # @param limit [Integer] The maximum number of invite links to return.
1649
1651
  # @return [TD::Types::ChatInviteLinks]
1650
1652
  def get_chat_invite_links(chat_id:, creator_user_id:, is_revoked:, offset_date:, offset_invite_link:, limit:)
@@ -1752,7 +1754,7 @@ module TD::ClientMethods
1752
1754
  # Currently this method of getting the statistics are disabled and can be deleted in the future.
1753
1755
  #
1754
1756
  # @param chat_id [Integer] Chat identifier.
1755
- # @param parameters [String] Parameters from "tg://statsrefresh?params=******" link.
1757
+ # @param parameters [TD::Types::String] Parameters from "tg://statsrefresh?params=******" link.
1756
1758
  # @param is_dark [Boolean] Pass true if a URL with the dark theme must be returned.
1757
1759
  # @return [TD::Types::HttpUrl]
1758
1760
  def get_chat_statistics_url(chat_id:, parameters:, is_dark:)
@@ -1844,7 +1846,7 @@ module TD::ClientMethods
1844
1846
  # Returns a 404 error for unknown links.
1845
1847
  # Can be called before authorization.
1846
1848
  #
1847
- # @param link [String] The link.
1849
+ # @param link [TD::Types::String] The link.
1848
1850
  # @return [TD::Types::DeepLinkInfo]
1849
1851
  def get_deep_link_info(link:)
1850
1852
  broadcast('@type' => 'getDeepLinkInfo',
@@ -1855,7 +1857,7 @@ module TD::ClientMethods
1855
1857
  # replacements.
1856
1858
  # The URL will be valid for 30 seconds after generation.
1857
1859
  #
1858
- # @param language_code [String] Language code for which the emoji replacements will be suggested.
1860
+ # @param language_code [TD::Types::String] Language code for which the emoji replacements will be suggested.
1859
1861
  # @return [TD::Types::HttpUrl]
1860
1862
  def get_emoji_suggestions_url(language_code:)
1861
1863
  broadcast('@type' => 'getEmojiSuggestionsUrl',
@@ -1866,7 +1868,7 @@ module TD::ClientMethods
1866
1868
  # HTTP link.
1867
1869
  # Use the method getExternalLinkInfo to find whether a prior user confirmation is needed.
1868
1870
  #
1869
- # @param link [String] The HTTP link.
1871
+ # @param link [TD::Types::String] The HTTP link.
1870
1872
  # @param allow_write_access [Boolean] True, if the current user allowed the bot, returned in getExternalLinkInfo, to
1871
1873
  # send them messages.
1872
1874
  # @return [TD::Types::HttpUrl]
@@ -1880,7 +1882,7 @@ module TD::ClientMethods
1880
1882
  # This method can be used to automatically authorize the current user on a website.
1881
1883
  # Don't use this method for links from secret chats if link preview is disabled in secret chats.
1882
1884
  #
1883
- # @param link [String] The HTTP link.
1885
+ # @param link [TD::Types::String] The HTTP link.
1884
1886
  # @return [TD::Types::LoginUrlInfo]
1885
1887
  def get_external_link_info(link:)
1886
1888
  broadcast('@type' => 'getExternalLinkInfo',
@@ -1918,7 +1920,7 @@ module TD::ClientMethods
1918
1920
  # Returns an empty string on failure.
1919
1921
  # Can be called synchronously.
1920
1922
  #
1921
- # @param mime_type [String] The MIME type of the file.
1923
+ # @param mime_type [TD::Types::String] The MIME type of the file.
1922
1924
  # @return [TD::Types::Text]
1923
1925
  def get_file_extension(mime_type:)
1924
1926
  broadcast('@type' => 'getFileExtension',
@@ -1929,7 +1931,7 @@ module TD::ClientMethods
1929
1931
  # Returns an empty string on failure.
1930
1932
  # Can be called synchronously.
1931
1933
  #
1932
- # @param file_name [String] The name of the file or path to the file.
1934
+ # @param file_name [TD::Types::String] The name of the file or path to the file.
1933
1935
  # @return [TD::Types::Text]
1934
1936
  def get_file_mime_type(file_name:)
1935
1937
  broadcast('@type' => 'getFileMimeType',
@@ -2018,7 +2020,7 @@ module TD::ClientMethods
2018
2020
 
2019
2021
  # Returns game high scores and some part of the high score table in the range of the specified user; for bots only.
2020
2022
  #
2021
- # @param inline_message_id [String] Inline message identifier.
2023
+ # @param inline_message_id [TD::Types::String] Inline message identifier.
2022
2024
  # @param user_id [Integer] User identifier.
2023
2025
  # @return [TD::Types::GameHighScores]
2024
2026
  def get_inline_game_high_scores(inline_message_id:, user_id:)
@@ -2033,8 +2035,8 @@ module TD::ClientMethods
2033
2035
  # @param bot_user_id [Integer] The identifier of the target bot.
2034
2036
  # @param chat_id [Integer] Identifier of the chat where the query was sent.
2035
2037
  # @param user_location [TD::Types::Location] Location of the user, only if needed.
2036
- # @param query [String] Text of the query.
2037
- # @param offset [String] Offset of the first entry to return.
2038
+ # @param query [TD::Types::String] Text of the query.
2039
+ # @param offset [TD::Types::String] Offset of the first entry to return.
2038
2040
  # @return [TD::Types::InlineQueryResults]
2039
2041
  def get_inline_query_results(bot_user_id:, chat_id:, user_location:, query:, offset:)
2040
2042
  broadcast('@type' => 'getInlineQueryResults',
@@ -2075,7 +2077,7 @@ module TD::ClientMethods
2075
2077
  # Converts a JSON-serialized string to corresponding JsonValue object.
2076
2078
  # Can be called synchronously.
2077
2079
  #
2078
- # @param json [String] The JSON-serialized string.
2080
+ # @param json [TD::Types::String] The JSON-serialized string.
2079
2081
  # @return [TD::Types::JsonValue]
2080
2082
  def get_json_value(json:)
2081
2083
  broadcast('@type' => 'getJsonValue',
@@ -2086,7 +2088,7 @@ module TD::ClientMethods
2086
2088
  # Returned language pack identifier may be different from a provided one.
2087
2089
  # Can be called before authorization.
2088
2090
  #
2089
- # @param language_pack_id [String] Language pack identifier.
2091
+ # @param language_pack_id [TD::Types::String] Language pack identifier.
2090
2092
  # @return [TD::Types::LanguagePackInfo]
2091
2093
  def get_language_pack_info(language_pack_id:)
2092
2094
  broadcast('@type' => 'getLanguagePackInfo',
@@ -2097,10 +2099,11 @@ module TD::ClientMethods
2097
2099
  # Returns a 404 error if the string is not found.
2098
2100
  # Can be called synchronously.
2099
2101
  #
2100
- # @param language_pack_database_path [String] Path to the language pack database in which strings are stored.
2101
- # @param localization_target [String] Localization target to which the language pack belongs.
2102
- # @param language_pack_id [String] Language pack identifier.
2103
- # @param key [String] Language pack key of the string to be returned.
2102
+ # @param language_pack_database_path [TD::Types::String] Path to the language pack database in which strings are
2103
+ # stored.
2104
+ # @param localization_target [TD::Types::String] Localization target to which the language pack belongs.
2105
+ # @param language_pack_id [TD::Types::String] Language pack identifier.
2106
+ # @param key [TD::Types::String] Language pack key of the string to be returned.
2104
2107
  # @return [TD::Types::LanguagePackStringValue]
2105
2108
  def get_language_pack_string(language_pack_database_path:, localization_target:, language_pack_id:, key:)
2106
2109
  broadcast('@type' => 'getLanguagePackString',
@@ -2113,9 +2116,9 @@ module TD::ClientMethods
2113
2116
  # Returns strings from a language pack in the current localization target by their keys.
2114
2117
  # Can be called before authorization.
2115
2118
  #
2116
- # @param language_pack_id [String] Language pack identifier of the strings to be returned.
2117
- # @param keys [Array<String>] Language pack keys of the strings to be returned; leave empty to request all available
2118
- # strings.
2119
+ # @param language_pack_id [TD::Types::String] Language pack identifier of the strings to be returned.
2120
+ # @param keys [Array<TD::Types::String>] Language pack keys of the strings to be returned; leave empty to request all
2121
+ # available strings.
2119
2122
  # @return [TD::Types::LanguagePackStrings]
2120
2123
  def get_language_pack_strings(language_pack_id:, keys:)
2121
2124
  broadcast('@type' => 'getLanguagePackStrings',
@@ -2145,7 +2148,7 @@ module TD::ClientMethods
2145
2148
  # Returns current verbosity level for a specified TDLib internal log tag.
2146
2149
  # Can be called synchronously.
2147
2150
  #
2148
- # @param tag [String] Logging tag to change verbosity level.
2151
+ # @param tag [TD::Types::String] Logging tag to change verbosity level.
2149
2152
  # @return [TD::Types::LogVerbosityLevel]
2150
2153
  def get_log_tag_verbosity_level(tag:)
2151
2154
  broadcast('@type' => 'getLogTagVerbosityLevel',
@@ -2267,7 +2270,7 @@ module TD::ClientMethods
2267
2270
 
2268
2271
  # Returns information about a file with messages exported from another app.
2269
2272
  #
2270
- # @param message_file_head [String] Beginning of the message file; up to 100 first lines.
2273
+ # @param message_file_head [TD::Types::String] Beginning of the message file; up to 100 first lines.
2271
2274
  # @return [TD::Types::MessageFileType]
2272
2275
  def get_message_file_type(message_file_head:)
2273
2276
  broadcast('@type' => 'getMessageFileType',
@@ -2305,7 +2308,7 @@ module TD::ClientMethods
2305
2308
 
2306
2309
  # Returns information about a public or private message link.
2307
2310
  #
2308
- # @param url [String] The message link in the format "https://t.me/c/...", or "tg://privatepost?...", or
2311
+ # @param url [TD::Types::String] The message link in the format "https://t.me/c/...", or "tg://privatepost?...", or
2309
2312
  # "https://t.me/username/...", or "tg://resolve?...".
2310
2313
  # @return [TD::Types::MessageLinkInfo]
2311
2314
  def get_message_link_info(url:)
@@ -2330,8 +2333,8 @@ module TD::ClientMethods
2330
2333
  #
2331
2334
  # @param chat_id [Integer] Chat identifier of the message.
2332
2335
  # @param message_id [Integer] Message identifier.
2333
- # @param offset [String] Offset of the first entry to return as received from the previous request; use empty string
2334
- # to get first chunk of results.
2336
+ # @param offset [TD::Types::String] Offset of the first entry to return as received from the previous request; use
2337
+ # empty string to get first chunk of results.
2335
2338
  # @param limit [Integer] The maximum number of messages to be returned; must be positive and can't be greater than
2336
2339
  # 100.
2337
2340
  # Fewer messages may be returned than specified by the limit, even if the end of the list has not been reached.
@@ -2423,7 +2426,7 @@ module TD::ClientMethods
2423
2426
  # (Check the list of available options on https://core.telegram.org/tdlib/options.) Can be called before
2424
2427
  # authorization.
2425
2428
  #
2426
- # @param name [String] The name of the option.
2429
+ # @param name [TD::Types::String] The name of the option.
2427
2430
  # @return [TD::Types::OptionValue]
2428
2431
  def get_option(name:)
2429
2432
  broadcast('@type' => 'getOption',
@@ -2433,9 +2436,9 @@ module TD::ClientMethods
2433
2436
  # Returns a Telegram Passport authorization form for sharing data with a service.
2434
2437
  #
2435
2438
  # @param bot_user_id [Integer] User identifier of the service's bot.
2436
- # @param scope [String] Telegram Passport element types requested by the service.
2437
- # @param public_key [String] Service's public_key.
2438
- # @param nonce [String] Authorization form nonce provided by the service.
2439
+ # @param scope [TD::Types::String] Telegram Passport element types requested by the service.
2440
+ # @param public_key [TD::Types::String] Service's public_key.
2441
+ # @param nonce [TD::Types::String] Authorization form nonce provided by the service.
2439
2442
  # @return [TD::Types::PassportAuthorizationForm]
2440
2443
  def get_passport_authorization_form(bot_user_id:, scope:, public_key:, nonce:)
2441
2444
  broadcast('@type' => 'getPassportAuthorizationForm',
@@ -2450,7 +2453,7 @@ module TD::ClientMethods
2450
2453
  # Result can be received only once for each authorization form.
2451
2454
  #
2452
2455
  # @param autorization_form_id [Integer] Authorization form identifier.
2453
- # @param password [String] Password of the current user.
2456
+ # @param password [TD::Types::String] Password of the current user.
2454
2457
  # @return [TD::Types::PassportElementsWithErrors]
2455
2458
  def get_passport_authorization_form_available_elements(autorization_form_id:, password:)
2456
2459
  broadcast('@type' => 'getPassportAuthorizationFormAvailableElements',
@@ -2461,7 +2464,7 @@ module TD::ClientMethods
2461
2464
  # Returns one of the available Telegram Passport elements.
2462
2465
  #
2463
2466
  # @param type [TD::Types::PassportElementType] Telegram Passport element type.
2464
- # @param password [String] Password of the current user.
2467
+ # @param password [TD::Types::String] Password of the current user.
2465
2468
  # @return [TD::Types::PassportElement]
2466
2469
  def get_passport_element(type:, password:)
2467
2470
  broadcast('@type' => 'getPassportElement',
@@ -2504,7 +2507,7 @@ module TD::ClientMethods
2504
2507
  # Returns information about a phone number by its prefix.
2505
2508
  # Can be called before authorization.
2506
2509
  #
2507
- # @param phone_number_prefix [String] The phone number prefix.
2510
+ # @param phone_number_prefix [TD::Types::String] The phone number prefix.
2508
2511
  # @return [TD::Types::PhoneNumberInfo]
2509
2512
  def get_phone_number_info(phone_number_prefix:)
2510
2513
  broadcast('@type' => 'getPhoneNumberInfo',
@@ -2534,7 +2537,7 @@ module TD::ClientMethods
2534
2537
  # in Telegram Passport personal details.
2535
2538
  # Returns a 404 error if unknown.
2536
2539
  #
2537
- # @param country_code [String] A two-letter ISO 3166-1 alpha-2 country code.
2540
+ # @param country_code [TD::Types::String] A two-letter ISO 3166-1 alpha-2 country code.
2538
2541
  # @return [TD::Types::Text]
2539
2542
  def get_preferred_country_language(country_code:)
2540
2543
  broadcast('@type' => 'getPreferredCountryLanguage',
@@ -2564,7 +2567,7 @@ module TD::ClientMethods
2564
2567
  # received a push notification.
2565
2568
  # Can be called synchronously.
2566
2569
  #
2567
- # @param payload [String] JSON-encoded push notification payload.
2570
+ # @param payload [TD::Types::String] JSON-encoded push notification payload.
2568
2571
  # @return [TD::Types::PushReceiverId]
2569
2572
  def get_push_receiver_id(payload:)
2570
2573
  broadcast('@type' => 'getPushReceiverId',
@@ -2590,7 +2593,7 @@ module TD::ClientMethods
2590
2593
 
2591
2594
  # Returns t.me URLs recently visited by a newly registered user.
2592
2595
  #
2593
- # @param referrer [String] Google Play referrer to identify the user.
2596
+ # @param referrer [TD::Types::String] Google Play referrer to identify the user.
2594
2597
  # @return [TD::Types::TMeUrls]
2595
2598
  def get_recently_visited_t_me_urls(referrer:)
2596
2599
  broadcast('@type' => 'getRecentlyVisitedTMeUrls',
@@ -2607,7 +2610,7 @@ module TD::ClientMethods
2607
2610
  # Returns a 2-step verification recovery email address that was previously set up.
2608
2611
  # This method can be used to verify a password provided by the user.
2609
2612
  #
2610
- # @param password [String] The password for the current user.
2613
+ # @param password [TD::Types::String] The password for the current user.
2611
2614
  # @return [TD::Types::RecoveryEmailAddress]
2612
2615
  def get_recovery_email_address(password:)
2613
2616
  broadcast('@type' => 'getRecoveryEmailAddress',
@@ -2620,7 +2623,7 @@ module TD::ClientMethods
2620
2623
  # For example, if the file is from a message, then the message must be not deleted and accessible to the user.
2621
2624
  # If the file database is disabled, then the corresponding object with the file must be preloaded by the application.
2622
2625
  #
2623
- # @param remote_file_id [String] Remote identifier of the file to get.
2626
+ # @param remote_file_id [TD::Types::String] Remote identifier of the file to get.
2624
2627
  # @param file_type [TD::Types::FileType] File type, if known.
2625
2628
  # @return [TD::Types::File]
2626
2629
  def get_remote_file(remote_file_id:, file_type:)
@@ -2679,7 +2682,7 @@ module TD::ClientMethods
2679
2682
  # Loads an asynchronous or a zoomed in statistical graph.
2680
2683
  #
2681
2684
  # @param chat_id [Integer] Chat identifier.
2682
- # @param token [String] The token for graph loading.
2685
+ # @param token [TD::Types::String] The token for graph loading.
2683
2686
  # @param x [Integer] X-value for zoomed in graph or 0 otherwise.
2684
2687
  # @return [TD::Types::StatisticalGraph]
2685
2688
  def get_statistical_graph(chat_id:, token:, x:)
@@ -2712,7 +2715,7 @@ module TD::ClientMethods
2712
2715
  # Returns stickers from the installed sticker sets that correspond to a given emoji.
2713
2716
  # If the emoji is not empty, favorite and recently used stickers may also be returned.
2714
2717
  #
2715
- # @param emoji [String] String representation of emoji.
2718
+ # @param emoji [TD::Types::String] String representation of emoji.
2716
2719
  # If empty, returns all known installed stickers.
2717
2720
  # @param limit [Integer] The maximum number of stickers to be returned.
2718
2721
  # @return [TD::Types::Stickers]
@@ -2808,7 +2811,7 @@ module TD::ClientMethods
2808
2811
  # contained in the text.
2809
2812
  # Can be called synchronously.
2810
2813
  #
2811
- # @param text [String] The text in which to look for entites.
2814
+ # @param text [TD::Types::String] The text in which to look for entites.
2812
2815
  # @return [TD::Types::TextEntities]
2813
2816
  def get_text_entities(text:)
2814
2817
  broadcast('@type' => 'getTextEntities',
@@ -2894,7 +2897,7 @@ module TD::ClientMethods
2894
2897
  # Returns an instant view version of a web page if available.
2895
2898
  # Returns a 404 error if the web page has no instant view page.
2896
2899
  #
2897
- # @param url [String] The web page URL.
2900
+ # @param url [TD::Types::String] The web page URL.
2898
2901
  # @param force_full [Boolean] If true, the full instant view for the web page will be returned.
2899
2902
  # @return [TD::Types::WebPageInstantView]
2900
2903
  def get_web_page_instant_view(url:, force_full:)
@@ -2977,8 +2980,8 @@ module TD::ClientMethods
2977
2980
 
2978
2981
  # Uses an invite link to add the current user to the chat if possible.
2979
2982
  #
2980
- # @param invite_link [String] Invite link to import; must have URL "t.me", "telegram.me", or "telegram.dog" and query
2981
- # beginning with "/joinchat/" or "/+".
2983
+ # @param invite_link [TD::Types::String] Invite link to import; must have URL "t.me", "telegram.me", or
2984
+ # "telegram.dog" and query beginning with "/joinchat/" or "/+".
2982
2985
  # @return [TD::Types::Chat]
2983
2986
  def join_chat_by_invite_link(invite_link:)
2984
2987
  broadcast('@type' => 'joinChatByInviteLink',
@@ -2993,8 +2996,8 @@ module TD::ClientMethods
2993
2996
  # @param payload [TD::Types::GroupCallPayload] Group join payload; received from tgcalls.
2994
2997
  # @param source [Integer] Caller synchronization source identifier; received from tgcalls.
2995
2998
  # @param is_muted [Boolean] True, if the user's microphone is muted.
2996
- # @param invite_hash [String] If non-empty, invite hash to be used to join the group call without being muted by
2997
- # administrators.
2999
+ # @param invite_hash [TD::Types::String] If non-empty, invite hash to be used to join the group call without being
3000
+ # muted by administrators.
2998
3001
  # @return [TD::Types::GroupCallJoinResponse]
2999
3002
  def join_group_call(group_call_id:, participant_id:, payload:, source:, is_muted:, invite_hash:)
3000
3003
  broadcast('@type' => 'joinGroupCall',
@@ -3129,7 +3132,7 @@ module TD::ClientMethods
3129
3132
  # the text.
3130
3133
  # Can be called synchronously.
3131
3134
  #
3132
- # @param text [String] The text to parse.
3135
+ # @param text [TD::Types::String] The text to parse.
3133
3136
  # @param parse_mode [TD::Types::TextParseMode] Text parse mode.
3134
3137
  # @return [TD::Types::FormattedText]
3135
3138
  def parse_text_entities(text:, parse_mode:)
@@ -3170,7 +3173,7 @@ module TD::ClientMethods
3170
3173
  # fetch new data.
3171
3174
  # Can be called before authorization.
3172
3175
  #
3173
- # @param payload [String] JSON-encoded push notification payload with all fields sent by the server, and
3176
+ # @param payload [TD::Types::String] JSON-encoded push notification payload with all fields sent by the server, and
3174
3177
  # "google.sent_time" and "google.notification.sound" fields added.
3175
3178
  # @return [TD::Types::Ok]
3176
3179
  def process_push_notification(payload:)
@@ -3208,7 +3211,7 @@ module TD::ClientMethods
3208
3211
  # Recovers the password with a password recovery code sent to an email address that was previously set up.
3209
3212
  # Works only when the current authorization state is authorizationStateWaitPassword.
3210
3213
  #
3211
- # @param recovery_code [String] Recovery code to check.
3214
+ # @param recovery_code [TD::Types::String] Recovery code to check.
3212
3215
  # @return [TD::Types::Ok]
3213
3216
  def recover_authentication_password(recovery_code:)
3214
3217
  broadcast('@type' => 'recoverAuthenticationPassword',
@@ -3217,7 +3220,7 @@ module TD::ClientMethods
3217
3220
 
3218
3221
  # Recovers the password using a recovery code sent to an email address that was previously set up.
3219
3222
  #
3220
- # @param recovery_code [String] Recovery code to check.
3223
+ # @param recovery_code [TD::Types::String] Recovery code to check.
3221
3224
  # @return [TD::Types::PasswordState]
3222
3225
  def recover_password(recovery_code:)
3223
3226
  broadcast('@type' => 'recoverPassword',
@@ -3239,8 +3242,8 @@ module TD::ClientMethods
3239
3242
  # Finishes user registration.
3240
3243
  # Works only when the current authorization state is authorizationStateWaitRegistration.
3241
3244
  #
3242
- # @param first_name [String] The first name of the user; 1-64 characters.
3243
- # @param last_name [String] The last name of the user; 0-64 characters.
3245
+ # @param first_name [TD::Types::String] The first name of the user; 1-64 characters.
3246
+ # @param last_name [TD::Types::String] The last name of the user; 0-64 characters.
3244
3247
  # @return [TD::Types::Ok]
3245
3248
  def register_user(first_name:, last_name:)
3246
3249
  broadcast('@type' => 'registerUser',
@@ -3320,7 +3323,7 @@ module TD::ClientMethods
3320
3323
 
3321
3324
  # Removes a hashtag from the list of recently used hashtags.
3322
3325
  #
3323
- # @param hashtag [String] Hashtag to delete.
3326
+ # @param hashtag [TD::Types::String] Hashtag to delete.
3324
3327
  # @return [TD::Types::Ok]
3325
3328
  def remove_recent_hashtag(hashtag:)
3326
3329
  broadcast('@type' => 'removeRecentHashtag',
@@ -3418,7 +3421,7 @@ module TD::ClientMethods
3418
3421
  # @param chat_id [Integer] Chat identifier.
3419
3422
  # @param message_ids [Array<Integer>] Identifiers of reported messages, if any.
3420
3423
  # @param reason [TD::Types::ChatReportReason] The reason for reporting the chat.
3421
- # @param text [String] Additional report details; 0-1024 characters.
3424
+ # @param text [TD::Types::String] Additional report details; 0-1024 characters.
3422
3425
  # @return [TD::Types::Ok]
3423
3426
  def report_chat(chat_id:, message_ids:, reason:, text:)
3424
3427
  broadcast('@type' => 'reportChat',
@@ -3436,7 +3439,7 @@ module TD::ClientMethods
3436
3439
  # @param file_id [Integer] Identifier of the photo to report.
3437
3440
  # Only full photos from {TD::Types::ChatPhoto} can be reported.
3438
3441
  # @param reason [TD::Types::ChatReportReason] The reason for reporting the chat photo.
3439
- # @param text [String] Additional report details; 0-1024 characters.
3442
+ # @param text [TD::Types::String] Additional report details; 0-1024 characters.
3440
3443
  # @return [TD::Types::Ok]
3441
3444
  def report_chat_photo(chat_id:, file_id:, reason:, text:)
3442
3445
  broadcast('@type' => 'reportChatPhoto',
@@ -3579,7 +3582,7 @@ module TD::ClientMethods
3579
3582
  # If a primary link is revoked, then additionally to the revoked link returns new primary link.
3580
3583
  #
3581
3584
  # @param chat_id [Integer] Chat identifier.
3582
- # @param invite_link [String] Invite link to be revoked.
3585
+ # @param invite_link [TD::Types::String] Invite link to be revoked.
3583
3586
  # @return [TD::Types::ChatInviteLinks]
3584
3587
  def revoke_chat_invite_link(chat_id:, invite_link:)
3585
3588
  broadcast('@type' => 'revokeChatInviteLink',
@@ -3600,7 +3603,7 @@ module TD::ClientMethods
3600
3603
  # Saves application log event on the server.
3601
3604
  # Can be called before authorization.
3602
3605
  #
3603
- # @param type [String] Event type.
3606
+ # @param type [TD::Types::String] Event type.
3604
3607
  # @param chat_id [Integer] Optional chat identifier, associated with the event.
3605
3608
  # @param data [TD::Types::JsonValue] The log event data.
3606
3609
  # @return [TD::Types::Ok]
@@ -3613,7 +3616,7 @@ module TD::ClientMethods
3613
3616
 
3614
3617
  # Searches for a background by its name.
3615
3618
  #
3616
- # @param name [String] The name of the background.
3619
+ # @param name [TD::Types::String] The name of the background.
3617
3620
  # @return [TD::Types::Background]
3618
3621
  def search_background(name:)
3619
3622
  broadcast('@type' => 'searchBackground',
@@ -3643,7 +3646,7 @@ module TD::ClientMethods
3643
3646
  # Requires administrator rights in channels.
3644
3647
  #
3645
3648
  # @param chat_id [Integer] Chat identifier.
3646
- # @param query [String] Query to search for.
3649
+ # @param query [TD::Types::String] Query to search for.
3647
3650
  # @param limit [Integer] The maximum number of users to be returned.
3648
3651
  # @param filter [TD::Types::ChatMembersFilter] The type of users to return.
3649
3652
  # By default, chatMembersFilterMembers.
@@ -3664,7 +3667,7 @@ module TD::ClientMethods
3664
3667
  # For optimal performance the number of returned messages is chosen by the library.
3665
3668
  #
3666
3669
  # @param chat_id [Integer] Identifier of the chat in which to search messages.
3667
- # @param query [String] Query to search for.
3670
+ # @param query [TD::Types::String] Query to search for.
3668
3671
  # @param sender [TD::Types::MessageSender] If not null, only messages sent by the specified sender will be returned.
3669
3672
  # Not supported in secret chats.
3670
3673
  # @param from_message_id [Integer] Identifier of the message starting from which history must be fetched; use 0 to
@@ -3707,7 +3710,7 @@ module TD::ClientMethods
3707
3710
  # Searches for the specified query in the title and username of already known chats, this is an offline request.
3708
3711
  # Returns chats in the order seen in the main chat list.
3709
3712
  #
3710
- # @param query [String] Query to search for.
3713
+ # @param query [TD::Types::String] Query to search for.
3711
3714
  # If the query is empty, returns up to 20 recently found chats.
3712
3715
  # @param limit [Integer] The maximum number of chats to be returned.
3713
3716
  # @return [TD::Types::Chats]
@@ -3731,7 +3734,7 @@ module TD::ClientMethods
3731
3734
  # Searches for the specified query in the title and username of already known chats via request to the server.
3732
3735
  # Returns chats in the order seen in the main chat list.
3733
3736
  #
3734
- # @param query [String] Query to search for.
3737
+ # @param query [TD::Types::String] Query to search for.
3735
3738
  # @param limit [Integer] The maximum number of chats to be returned.
3736
3739
  # @return [TD::Types::Chats]
3737
3740
  def search_chats_on_server(query:, limit:)
@@ -3742,7 +3745,7 @@ module TD::ClientMethods
3742
3745
 
3743
3746
  # Searches for the specified query in the first names, last names and usernames of the known user contacts.
3744
3747
  #
3745
- # @param query [String, nil] Query to search for; may be empty to return all contacts.
3748
+ # @param query [TD::Types::String, nil] Query to search for; may be empty to return all contacts.
3746
3749
  # @param limit [Integer] The maximum number of users to be returned.
3747
3750
  # @return [TD::Types::Users]
3748
3751
  def search_contacts(query: nil, limit:)
@@ -3754,10 +3757,10 @@ module TD::ClientMethods
3754
3757
  # Searches for emojis by keywords.
3755
3758
  # Supported only if the file database is enabled.
3756
3759
  #
3757
- # @param text [String] Text to search for.
3760
+ # @param text [TD::Types::String] Text to search for.
3758
3761
  # @param exact_match [Boolean] True, if only emojis, which exactly match text needs to be returned.
3759
- # @param input_language_codes [Array<String>, nil] List of possible IETF language tags of the user's input language;
3760
- # may be empty if unknown.
3762
+ # @param input_language_codes [Array<TD::Types::String>, nil] List of possible IETF language tags of the user's input
3763
+ # language; may be empty if unknown.
3761
3764
  # @return [TD::Types::Emojis]
3762
3765
  def search_emojis(text:, exact_match:, input_language_codes: nil)
3763
3766
  broadcast('@type' => 'searchEmojis',
@@ -3768,7 +3771,7 @@ module TD::ClientMethods
3768
3771
 
3769
3772
  # Searches for recently used hashtags by their prefix.
3770
3773
  #
3771
- # @param prefix [String] Hashtag prefix to search for.
3774
+ # @param prefix [TD::Types::String] Hashtag prefix to search for.
3772
3775
  # @param limit [Integer] The maximum number of hashtags to be returned.
3773
3776
  # @return [TD::Types::Hashtags]
3774
3777
  def search_hashtags(prefix:, limit:)
@@ -3780,7 +3783,7 @@ module TD::ClientMethods
3780
3783
  # Searches for installed sticker sets by looking for specified query in their title and name.
3781
3784
  #
3782
3785
  # @param is_masks [Boolean] Pass true to return mask sticker sets; pass false to return ordinary sticker sets.
3783
- # @param query [String] Query to search for.
3786
+ # @param query [TD::Types::String] Query to search for.
3784
3787
  # @param limit [Integer] The maximum number of sticker sets to return.
3785
3788
  # @return [TD::Types::StickerSets]
3786
3789
  def search_installed_sticker_sets(is_masks:, query:, limit:)
@@ -3797,7 +3800,7 @@ module TD::ClientMethods
3797
3800
  # @param chat_list [TD::Types::ChatList] Chat list in which to search messages; pass null to search in all chats
3798
3801
  # regardless of their chat list.
3799
3802
  # Only Main and Archive chat lists are supported.
3800
- # @param query [String] Query to search for.
3803
+ # @param query [TD::Types::String] Query to search for.
3801
3804
  # @param offset_date [Integer] The date of the message starting from which the results should be fetched.
3802
3805
  # Use 0 or any date in the future to get results from the last message.
3803
3806
  # @param offset_chat_id [Integer] The chat identifier of the last found message, or 0 for the first request.
@@ -3830,7 +3833,7 @@ module TD::ClientMethods
3830
3833
  # Currently only private chats, supergroups and channels can be public.
3831
3834
  # Returns the chat if found; otherwise an error is returned.
3832
3835
  #
3833
- # @param username [String] Username to be resolved.
3836
+ # @param username [TD::Types::String] Username to be resolved.
3834
3837
  # @return [TD::Types::Chat]
3835
3838
  def search_public_chat(username:)
3836
3839
  broadcast('@type' => 'searchPublicChat',
@@ -3843,7 +3846,7 @@ module TD::ClientMethods
3843
3846
  # Returns nothing if the length of the searched username prefix is less than 5.
3844
3847
  # Excludes private chats with contacts and chats from the chat list from the results.
3845
3848
  #
3846
- # @param query [String] Query to search for.
3849
+ # @param query [TD::Types::String] Query to search for.
3847
3850
  # @return [TD::Types::Chats]
3848
3851
  def search_public_chats(query:)
3849
3852
  broadcast('@type' => 'searchPublicChats',
@@ -3856,10 +3859,10 @@ module TD::ClientMethods
3856
3859
  #
3857
3860
  # @param chat_id [Integer] Identifier of the chat in which to search.
3858
3861
  # Specify 0 to search in all secret chats.
3859
- # @param query [String] Query to search for.
3862
+ # @param query [TD::Types::String] Query to search for.
3860
3863
  # If empty, searchChatMessages should be used instead.
3861
- # @param offset [String] Offset of the first entry to return as received from the previous request; use empty string
3862
- # to get first chunk of results.
3864
+ # @param offset [TD::Types::String] Offset of the first entry to return as received from the previous request; use
3865
+ # empty string to get first chunk of results.
3863
3866
  # @param limit [Integer] The maximum number of messages to be returned; up to 100.
3864
3867
  # Fewer messages may be returned than specified by the limit, even if the end of the message history has not been
3865
3868
  # reached.
@@ -3876,7 +3879,7 @@ module TD::ClientMethods
3876
3879
 
3877
3880
  # Searches for a sticker set by its name.
3878
3881
  #
3879
- # @param name [String] Name of the sticker set.
3882
+ # @param name [TD::Types::String] Name of the sticker set.
3880
3883
  # @return [TD::Types::StickerSet]
3881
3884
  def search_sticker_set(name:)
3882
3885
  broadcast('@type' => 'searchStickerSet',
@@ -3886,7 +3889,7 @@ module TD::ClientMethods
3886
3889
  # Searches for ordinary sticker sets by looking for specified query in their title and name.
3887
3890
  # Excludes installed sticker sets from the results.
3888
3891
  #
3889
- # @param query [String] Query to search for.
3892
+ # @param query [TD::Types::String] Query to search for.
3890
3893
  # @return [TD::Types::StickerSets]
3891
3894
  def search_sticker_sets(query:)
3892
3895
  broadcast('@type' => 'searchStickerSets',
@@ -3895,7 +3898,7 @@ module TD::ClientMethods
3895
3898
 
3896
3899
  # Searches for stickers from public sticker sets that correspond to a given emoji.
3897
3900
  #
3898
- # @param emoji [String] String representation of emoji; must be non-empty.
3901
+ # @param emoji [TD::Types::String] String representation of emoji; must be non-empty.
3899
3902
  # @param limit [Integer, nil] The maximum number of stickers to be returned.
3900
3903
  # @return [TD::Types::Stickers]
3901
3904
  def search_stickers(emoji:, limit: nil)
@@ -3911,7 +3914,7 @@ module TD::ClientMethods
3911
3914
  #
3912
3915
  # @param bot_user_id [Integer] Identifier of the bot.
3913
3916
  # @param chat_id [Integer] Identifier of the target chat.
3914
- # @param parameter [String] A hidden parameter sent to the bot for deep linking purposes
3917
+ # @param parameter [TD::Types::String] A hidden parameter sent to the bot for deep linking purposes
3915
3918
  # (https://core.telegram.org/bots#deep-linking).
3916
3919
  # @return [TD::Types::Message]
3917
3920
  def send_bot_start_message(bot_user_id:, chat_id:, parameter:)
@@ -3924,7 +3927,7 @@ module TD::ClientMethods
3924
3927
  # Sends debug information for a call.
3925
3928
  #
3926
3929
  # @param call_id [Integer] Call identifier.
3927
- # @param debug_information [String] Debug information in application-specific format.
3930
+ # @param debug_information [TD::Types::String] Debug information in application-specific format.
3928
3931
  # @return [TD::Types::Ok]
3929
3932
  def send_call_debug_information(call_id:, debug_information:)
3930
3933
  broadcast('@type' => 'sendCallDebugInformation',
@@ -3936,7 +3939,7 @@ module TD::ClientMethods
3936
3939
  #
3937
3940
  # @param call_id [Integer] Call identifier.
3938
3941
  # @param rating [Integer] Call rating; 1-5.
3939
- # @param comment [String] An optional user comment if the rating is less than 5.
3942
+ # @param comment [TD::Types::String] An optional user comment if the rating is less than 5.
3940
3943
  # @param problems [Array<TD::Types::CallProblem>] List of the exact types of problems with the call, specified by the
3941
3944
  # user.
3942
3945
  # @return [TD::Types::Ok]
@@ -3984,8 +3987,8 @@ module TD::ClientMethods
3984
3987
 
3985
3988
  # Sends a custom request; for bots only.
3986
3989
  #
3987
- # @param method [String] The method name.
3988
- # @param parameters [String] JSON-serialized method parameters.
3990
+ # @param method [TD::Types::String] The method name.
3991
+ # @param parameters [TD::Types::String] JSON-serialized method parameters.
3989
3992
  # @return [TD::Types::CustomRequestResult]
3990
3993
  def send_custom_request(method:, parameters:)
3991
3994
  broadcast('@type' => 'sendCustomRequest',
@@ -3995,7 +3998,7 @@ module TD::ClientMethods
3995
3998
 
3996
3999
  # Sends a code to verify an email address to be added to a user's Telegram Passport.
3997
4000
  #
3998
- # @param email_address [String] Email address.
4001
+ # @param email_address [TD::Types::String] Email address.
3999
4002
  # @return [TD::Types::EmailAddressAuthenticationCodeInfo]
4000
4003
  def send_email_address_verification_code(email_address:)
4001
4004
  broadcast('@type' => 'sendEmailAddressVerificationCode',
@@ -4011,7 +4014,7 @@ module TD::ClientMethods
4011
4014
  # @param reply_to_message_id [Integer] Identifier of a message to reply to or 0.
4012
4015
  # @param options [TD::Types::MessageSendOptions] Options to be used to send the message.
4013
4016
  # @param query_id [Integer] Identifier of the inline query.
4014
- # @param result_id [String] Identifier of the inline result.
4017
+ # @param result_id [TD::Types::String] Identifier of the inline result.
4015
4018
  # @param hide_via_bot [Boolean] If true, there will be no mention of a bot, via which the message is sent.
4016
4019
  # Can be used only for bots GetOption("animation_search_bot_username"), GetOption("photo_search_bot_username") and
4017
4020
  # GetOption("venue_search_bot_username").
@@ -4088,8 +4091,8 @@ module TD::ClientMethods
4088
4091
  # @param chat_id [Integer] Chat identifier of the Invoice message.
4089
4092
  # @param message_id [Integer] Message identifier.
4090
4093
  # @param payment_form_id [Integer] Payment form identifier returned by getPaymentForm.
4091
- # @param order_info_id [String] Identifier returned by validateOrderInfo, or an empty string.
4092
- # @param shipping_option_id [String] Identifier of a chosen shipping option, if applicable.
4094
+ # @param order_info_id [TD::Types::String] Identifier returned by validateOrderInfo, or an empty string.
4095
+ # @param shipping_option_id [TD::Types::String] Identifier of a chosen shipping option, if applicable.
4093
4096
  # @param credentials [TD::Types::InputCredentials] The credentials chosen by user for payment.
4094
4097
  # @param tip_amount [Integer] Chosen by the user amount of tip in the smallest units of the currency.
4095
4098
  # @return [TD::Types::PaymentResult]
@@ -4109,8 +4112,8 @@ module TD::ClientMethods
4109
4112
  # Should be called when user presses "https://t.me/confirmphone?phone=*******&hash=**********" or
4110
4113
  # "tg://confirmphone?phone=*******&hash=**********" link.
4111
4114
  #
4112
- # @param hash [String] Value of the "hash" parameter from the link.
4113
- # @param phone_number [String] Value of the "phone" parameter from the link.
4115
+ # @param hash [TD::Types::String] Value of the "hash" parameter from the link.
4116
+ # @param phone_number [TD::Types::String] Value of the "phone" parameter from the link.
4114
4117
  # @param settings [TD::Types::PhoneNumberAuthenticationSettings] Settings for the authentication of the user's phone
4115
4118
  # number.
4116
4119
  # @return [TD::Types::AuthenticationCodeInfo]
@@ -4123,7 +4126,7 @@ module TD::ClientMethods
4123
4126
 
4124
4127
  # Sends a code to verify a phone number to be added to a user's Telegram Passport.
4125
4128
  #
4126
- # @param phone_number [String] The phone number of the user, in international format.
4129
+ # @param phone_number [TD::Types::String] The phone number of the user, in international format.
4127
4130
  # @param settings [TD::Types::PhoneNumberAuthenticationSettings] Settings for the authentication of the user's phone
4128
4131
  # number.
4129
4132
  # @return [TD::Types::AuthenticationCodeInfo]
@@ -4157,7 +4160,7 @@ module TD::ClientMethods
4157
4160
  # authentication query and the current authorization state is authorizationStateWaitCode,
4158
4161
  # authorizationStateWaitRegistration, or authorizationStateWaitPassword.
4159
4162
  #
4160
- # @param phone_number [String] The phone number of the user, in international format.
4163
+ # @param phone_number [TD::Types::String] The phone number of the user, in international format.
4161
4164
  # @param settings [TD::Types::PhoneNumberAuthenticationSettings] Settings for the authentication of the user's phone
4162
4165
  # number.
4163
4166
  # @return [TD::Types::Ok]
@@ -4194,7 +4197,7 @@ module TD::ClientMethods
4194
4197
 
4195
4198
  # Changes the bio of the current user.
4196
4199
  #
4197
- # @param bio [String] The new value of the user bio; 0-70 characters without line feeds.
4200
+ # @param bio [TD::Types::String] The new value of the user bio; 0-70 characters without line feeds.
4198
4201
  # @return [TD::Types::Ok]
4199
4202
  def set_bio(bio:)
4200
4203
  broadcast('@type' => 'setBio',
@@ -4205,7 +4208,7 @@ module TD::ClientMethods
4205
4208
  # only.
4206
4209
  #
4207
4210
  # @param pending_update_count [Integer] The number of pending updates.
4208
- # @param error_message [String] The last error message.
4211
+ # @param error_message [TD::Types::String] The last error message.
4209
4212
  # @return [TD::Types::Ok]
4210
4213
  def set_bot_updates_status(pending_update_count:, error_message:)
4211
4214
  broadcast('@type' => 'setBotUpdatesStatus',
@@ -4216,7 +4219,7 @@ module TD::ClientMethods
4216
4219
  # Changes application-specific data associated with a chat.
4217
4220
  #
4218
4221
  # @param chat_id [Integer] Chat identifier.
4219
- # @param client_data [String] New value of client_data.
4222
+ # @param client_data [TD::Types::String] New value of client_data.
4220
4223
  # @return [TD::Types::Ok]
4221
4224
  def set_chat_client_data(chat_id:, client_data:)
4222
4225
  broadcast('@type' => 'setChatClientData',
@@ -4229,7 +4232,7 @@ module TD::ClientMethods
4229
4232
  # Requires can_change_info administrator right.
4230
4233
  #
4231
4234
  # @param chat_id [Integer] Identifier of the chat.
4232
- # @param description [String] New chat description; 0-255 characters.
4235
+ # @param description [TD::Types::String] New chat description; 0-255 characters.
4233
4236
  # @return [TD::Types::Ok]
4234
4237
  def set_chat_description(chat_id:, description:)
4235
4238
  broadcast('@type' => 'setChatDescription',
@@ -4368,7 +4371,7 @@ module TD::ClientMethods
4368
4371
  # Requires can_change_info administrator right.
4369
4372
  #
4370
4373
  # @param chat_id [Integer] Chat identifier.
4371
- # @param title [String] New title of the chat; 1-128 characters.
4374
+ # @param title [TD::Types::String] New title of the chat; 1-128 characters.
4372
4375
  # @return [TD::Types::Ok]
4373
4376
  def set_chat_title(chat_id:, title:)
4374
4377
  broadcast('@type' => 'setChatTitle',
@@ -4402,8 +4405,8 @@ module TD::ClientMethods
4402
4405
  # Adds, edits or deletes a string in a custom local language pack.
4403
4406
  # Can be called before authorization.
4404
4407
  #
4405
- # @param language_pack_id [String] Identifier of a previously added custom local language pack in the current
4406
- # localization target.
4408
+ # @param language_pack_id [TD::Types::String] Identifier of a previously added custom local language pack in the
4409
+ # current localization target.
4407
4410
  # @param new_string [TD::Types::LanguagePackString] New language pack string.
4408
4411
  # @return [TD::Types::Ok]
4409
4412
  def set_custom_language_pack_string(language_pack_id:, new_string:)
@@ -4487,7 +4490,7 @@ module TD::ClientMethods
4487
4490
  # Requires groupCall.can_be_managed group call flag.
4488
4491
  #
4489
4492
  # @param group_call_id [Integer] Group call identifier.
4490
- # @param title [String] New group call title; 1-64 characters.
4493
+ # @param title [TD::Types::String] New group call title; 1-64 characters.
4491
4494
  # @return [TD::Types::Ok]
4492
4495
  def set_group_call_title(group_call_id:, title:)
4493
4496
  broadcast('@type' => 'setGroupCallTitle',
@@ -4497,7 +4500,7 @@ module TD::ClientMethods
4497
4500
 
4498
4501
  # Updates the game score of the specified user in a game; for bots only.
4499
4502
  #
4500
- # @param inline_message_id [String] Inline message identifier.
4503
+ # @param inline_message_id [TD::Types::String] Inline message identifier.
4501
4504
  # @param edit_message [Boolean] True, if the message should be edited.
4502
4505
  # @param user_id [Integer] User identifier.
4503
4506
  # @param score [Integer] The new score.
@@ -4536,7 +4539,7 @@ module TD::ClientMethods
4536
4539
  # Sets the verbosity level for a specified TDLib internal log tag.
4537
4540
  # Can be called synchronously.
4538
4541
  #
4539
- # @param tag [String] Logging tag to change verbosity level.
4542
+ # @param tag [TD::Types::String] Logging tag to change verbosity level.
4540
4543
  # @param new_verbosity_level [Integer] New verbosity level; 1-1024.
4541
4544
  # @return [TD::Types::Ok]
4542
4545
  def set_log_tag_verbosity_level(tag:, new_verbosity_level:)
@@ -4560,8 +4563,8 @@ module TD::ClientMethods
4560
4563
 
4561
4564
  # Changes the first and last name of the current user.
4562
4565
  #
4563
- # @param first_name [String] The new value of the first name for the user; 1-64 characters.
4564
- # @param last_name [String] The new value of the optional last name for the user; 0-64 characters.
4566
+ # @param first_name [TD::Types::String] The new value of the first name for the user; 1-64 characters.
4567
+ # @param last_name [TD::Types::String] The new value of the optional last name for the user; 0-64 characters.
4565
4568
  # @return [TD::Types::Ok]
4566
4569
  def set_name(first_name:, last_name:)
4567
4570
  broadcast('@type' => 'setName',
@@ -4588,7 +4591,7 @@ module TD::ClientMethods
4588
4591
  # (Check the list of available options on https://core.telegram.org/tdlib/options.) Only writable options can be set.
4589
4592
  # Can be called before authorization.
4590
4593
  #
4591
- # @param name [String] The name of the option.
4594
+ # @param name [TD::Types::String] The name of the option.
4592
4595
  # @param value [TD::Types::OptionValue] The new value of the option.
4593
4596
  # @return [TD::Types::Ok]
4594
4597
  def set_option(name:, value:)
@@ -4602,7 +4605,7 @@ module TD::ClientMethods
4602
4605
  # number or the chosen email address must be verified first.
4603
4606
  #
4604
4607
  # @param element [TD::Types::InputPassportElement] Input Telegram Passport element.
4605
- # @param password [String] Password of the current user.
4608
+ # @param password [TD::Types::String] Password of the current user.
4606
4609
  # @return [TD::Types::PassportElement]
4607
4610
  def set_passport_element(element:, password:)
4608
4611
  broadcast('@type' => 'setPassportElement',
@@ -4626,11 +4629,11 @@ module TD::ClientMethods
4626
4629
  # If a new recovery email address is specified, then the change will not be applied until the new recovery email
4627
4630
  # address is confirmed.
4628
4631
  #
4629
- # @param old_password [String] Previous password of the user.
4630
- # @param new_password [String, nil] New password of the user; may be empty to remove the password.
4631
- # @param new_hint [String, nil] New password hint; may be empty.
4632
+ # @param old_password [TD::Types::String] Previous password of the user.
4633
+ # @param new_password [TD::Types::String, nil] New password of the user; may be empty to remove the password.
4634
+ # @param new_hint [TD::Types::String, nil] New password hint; may be empty.
4632
4635
  # @param set_recovery_email_address [Boolean] Pass true if the recovery email address should be changed.
4633
- # @param new_recovery_email_address [String, nil] New recovery email address; may be empty.
4636
+ # @param new_recovery_email_address [TD::Types::String, nil] New recovery email address; may be empty.
4634
4637
  # @return [TD::Types::PasswordState]
4635
4638
  def set_password(old_password:, new_password: nil, new_hint: nil, set_recovery_email_address: false,
4636
4639
  new_recovery_email_address: nil)
@@ -4683,8 +4686,8 @@ module TD::ClientMethods
4683
4686
  # If new_recovery_email_address is the same as the email address that is currently set up, this call succeeds
4684
4687
  # immediately and aborts all other requests waiting for an email confirmation.
4685
4688
  #
4686
- # @param password [String] Password of the current user.
4687
- # @param new_recovery_email_address [String] New recovery email address.
4689
+ # @param password [TD::Types::String] Password of the current user.
4690
+ # @param new_recovery_email_address [TD::Types::String] New recovery email address.
4688
4691
  # @return [TD::Types::PasswordState]
4689
4692
  def set_recovery_email_address(password:, new_recovery_email_address:)
4690
4693
  broadcast('@type' => 'setRecoveryEmailAddress',
@@ -4720,7 +4723,7 @@ module TD::ClientMethods
4720
4723
  # Returns the sticker set.
4721
4724
  #
4722
4725
  # @param user_id [Integer] Sticker set owner.
4723
- # @param name [String] Sticker set name.
4726
+ # @param name [TD::Types::String] Sticker set name.
4724
4727
  # @param thumbnail [TD::Types::InputFile] Thumbnail to set in PNG or TGS format.
4725
4728
  # Animated thumbnail must be set for animated sticker sets and only for them.
4726
4729
  # Pass a zero InputFileId to delete the thumbnail.
@@ -4747,7 +4750,7 @@ module TD::ClientMethods
4747
4750
  # Changes the username of a supergroup or channel, requires owner privileges in the supergroup or channel.
4748
4751
  #
4749
4752
  # @param supergroup_id [Integer] Identifier of the supergroup or channel.
4750
- # @param username [String] New value of the username.
4753
+ # @param username [TD::Types::String] New value of the username.
4751
4754
  # Use an empty string to remove the username.
4752
4755
  # @return [TD::Types::Ok]
4753
4756
  def set_supergroup_username(supergroup_id:, username:)
@@ -4779,7 +4782,7 @@ module TD::ClientMethods
4779
4782
 
4780
4783
  # Changes the username of the current user.
4781
4784
  #
4782
- # @param username [String] The new value of the username.
4785
+ # @param username [TD::Types::String] The new value of the username.
4783
4786
  # Use an empty string to remove the username.
4784
4787
  # @return [TD::Types::Ok]
4785
4788
  def set_username(username:)
@@ -4814,7 +4817,7 @@ module TD::ClientMethods
4814
4817
  # Requires groupCall.can_be_managed group call flag.
4815
4818
  #
4816
4819
  # @param group_call_id [Integer] Group call identifier.
4817
- # @param title [String] Group call recording title; 0-64 characters.
4820
+ # @param title [TD::Types::String] Group call recording title; 0-64 characters.
4818
4821
  # @return [TD::Types::Ok]
4819
4822
  def start_group_call_recording(group_call_id:, title:)
4820
4823
  broadcast('@type' => 'startGroupCallRecording',
@@ -4849,7 +4852,7 @@ module TD::ClientMethods
4849
4852
  # This method shouldn't be called explicitly for the current used/base language packs.
4850
4853
  # Can be called before authorization.
4851
4854
  #
4852
- # @param language_pack_id [String] Language pack identifier.
4855
+ # @param language_pack_id [TD::Types::String] Language pack identifier.
4853
4856
  # @return [TD::Types::Ok]
4854
4857
  def synchronize_language_pack(language_pack_id:)
4855
4858
  broadcast('@type' => 'synchronizeLanguagePack',
@@ -5013,7 +5016,7 @@ module TD::ClientMethods
5013
5016
  # @param chat_id [Integer] Chat identifier.
5014
5017
  # @param user_id [Integer] Identifier of the user to which transfer the ownership.
5015
5018
  # The ownership can't be transferred to a bot or to a deleted user.
5016
- # @param password [String] The password of the current user.
5019
+ # @param password [TD::Types::String] The password of the current user.
5017
5020
  # @return [TD::Types::Ok]
5018
5021
  def transfer_chat_ownership(chat_id:, user_id:, password:)
5019
5022
  broadcast('@type' => 'transferChatOwnership',