@mtkruto/node 0.191.0 → 0.193.0
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.
- package/README.md +5 -5
- package/esm/3_types.d.ts +8 -3
- package/esm/3_types.d.ts.map +1 -1
- package/esm/3_types.js +8 -3
- package/esm/client/0_html.d.ts +2 -1
- package/esm/client/0_html.d.ts.map +1 -1
- package/esm/client/0_html.js +18 -16
- package/esm/client/0_markdown.d.ts +3 -2
- package/esm/client/0_markdown.d.ts.map +1 -1
- package/esm/client/0_markdown.js +6 -4
- package/esm/client/0_params.d.ts +54 -0
- package/esm/client/0_params.d.ts.map +1 -1
- package/esm/client/1_client_generic.d.ts +154 -14
- package/esm/client/1_client_generic.d.ts.map +1 -1
- package/esm/client/3_account_manager.d.ts +5 -1
- package/esm/client/3_account_manager.d.ts.map +1 -1
- package/esm/client/3_account_manager.js +40 -2
- package/esm/client/3_message_manager.js +1 -1
- package/esm/client/3_secret_chat_manager.d.ts +10 -4
- package/esm/client/3_secret_chat_manager.d.ts.map +1 -1
- package/esm/client/3_secret_chat_manager.js +82 -76
- package/esm/client/3_sticker_set_manager.d.ts +5 -0
- package/esm/client/3_sticker_set_manager.d.ts.map +1 -1
- package/esm/client/3_sticker_set_manager.js +40 -9
- package/esm/client/4_chat_manager.d.ts +5 -1
- package/esm/client/4_chat_manager.d.ts.map +1 -1
- package/esm/client/4_chat_manager.js +59 -1
- package/esm/client/4_checklist_manager.js +1 -1
- package/esm/client/4_context.d.ts +16 -4
- package/esm/client/4_context.d.ts.map +1 -1
- package/esm/client/4_context.js +38 -5
- package/esm/client/4_forum_manager.d.ts +5 -1
- package/esm/client/4_forum_manager.d.ts.map +1 -1
- package/esm/client/4_forum_manager.js +38 -1
- package/esm/client/6_client.d.ts +152 -12
- package/esm/client/6_client.d.ts.map +1 -1
- package/esm/client/6_client.js +191 -11
- package/esm/client/6_client_dispatcher.d.ts +152 -12
- package/esm/client/6_client_dispatcher.d.ts.map +1 -1
- package/esm/client/6_client_dispatcher.js +191 -11
- package/esm/types/0_report_reason.d.ts +1 -0
- package/esm/types/0_report_reason.d.ts.map +1 -1
- package/esm/types/0_story_report_option.d.ts +3 -0
- package/esm/types/0_story_report_option.d.ts.map +1 -1
- package/esm/types/1_available_reactions.d.ts +3 -2
- package/esm/types/1_available_reactions.d.ts.map +1 -1
- package/esm/types/1_available_reactions.js +18 -1
- package/esm/types/1_channel_location.d.ts +8 -0
- package/esm/types/1_channel_location.d.ts.map +1 -0
- package/esm/types/1_channel_location.js +11 -0
- package/esm/types/1_sticker_set_p.d.ts +48 -0
- package/esm/types/1_sticker_set_p.d.ts.map +1 -0
- package/esm/types/1_sticker_set_p.js +73 -0
- package/esm/types/1_story_report_result.d.ts +17 -3
- package/esm/types/1_story_report_result.d.ts.map +1 -1
- package/esm/types/2_poll_voter.d.ts +19 -0
- package/esm/types/2_poll_voter.d.ts.map +1 -1
- package/esm/types/2_poll_voter.js +19 -0
- package/esm/types/2_secret_message.d.ts +1 -0
- package/esm/types/2_secret_message.d.ts.map +1 -1
- package/esm/types/3_bot_access_settings.d.ts +3 -0
- package/esm/types/3_bot_access_settings.d.ts.map +1 -1
- package/esm/types/3_connected_website.d.ts +10 -0
- package/esm/types/3_connected_website.d.ts.map +1 -1
- package/esm/types/3_poll_voter_list.d.ts +1 -0
- package/esm/types/3_poll_voter_list.d.ts.map +1 -1
- package/esm/types/3_rich_text_component.d.ts +24 -0
- package/esm/types/3_rich_text_component.d.ts.map +1 -1
- package/esm/types/3_text_to_translate.d.ts +3 -0
- package/esm/types/3_text_to_translate.d.ts.map +1 -1
- package/esm/types/3_translated_text.d.ts +3 -0
- package/esm/types/3_translated_text.d.ts.map +1 -1
- package/esm/types/4_page_block.d.ts +45 -1
- package/esm/types/4_page_block.d.ts.map +1 -1
- package/esm/types/A_topic.d.ts +20 -3
- package/esm/types/A_topic.d.ts.map +1 -1
- package/esm/types/A_topic.js +37 -0
- package/esm/types/B_recent_action.d.ts +225 -0
- package/esm/types/B_recent_action.d.ts.map +1 -0
- package/esm/types/B_recent_action.js +303 -0
- package/esm/types/{1_secret_chat_action.js → B_topic_list_item.d.ts} +9 -8
- package/esm/types/B_topic_list_item.d.ts.map +1 -0
- package/esm/types/B_topic_list_item.js +20 -0
- package/esm/types/B_update.d.ts +16 -16
- package/esm/types/B_update.d.ts.map +1 -1
- package/esm/types/C_recent_actions_entry.d.ts +13 -0
- package/esm/types/C_recent_actions_entry.d.ts.map +1 -0
- package/esm/types/C_recent_actions_entry.js +13 -0
- package/esm/types/C_topic_list.d.ts +34 -0
- package/esm/types/C_topic_list.d.ts.map +1 -0
- package/esm/types/{1_secret_chat_action.d.ts → C_topic_list.js} +8 -10
- package/package.json +1 -1
- package/script/3_types.d.ts +8 -3
- package/script/3_types.d.ts.map +1 -1
- package/script/3_types.js +8 -3
- package/script/client/0_html.d.ts +2 -1
- package/script/client/0_html.d.ts.map +1 -1
- package/script/client/0_html.js +17 -15
- package/script/client/0_markdown.d.ts +3 -2
- package/script/client/0_markdown.d.ts.map +1 -1
- package/script/client/0_markdown.js +5 -3
- package/script/client/0_params.d.ts +54 -0
- package/script/client/0_params.d.ts.map +1 -1
- package/script/client/1_client_generic.d.ts +154 -14
- package/script/client/1_client_generic.d.ts.map +1 -1
- package/script/client/3_account_manager.d.ts +5 -1
- package/script/client/3_account_manager.d.ts.map +1 -1
- package/script/client/3_account_manager.js +40 -2
- package/script/client/3_message_manager.js +1 -1
- package/script/client/3_secret_chat_manager.d.ts +10 -4
- package/script/client/3_secret_chat_manager.d.ts.map +1 -1
- package/script/client/3_secret_chat_manager.js +81 -75
- package/script/client/3_sticker_set_manager.d.ts +5 -0
- package/script/client/3_sticker_set_manager.d.ts.map +1 -1
- package/script/client/3_sticker_set_manager.js +39 -8
- package/script/client/4_chat_manager.d.ts +5 -1
- package/script/client/4_chat_manager.d.ts.map +1 -1
- package/script/client/4_chat_manager.js +58 -0
- package/script/client/4_checklist_manager.js +1 -1
- package/script/client/4_context.d.ts +16 -4
- package/script/client/4_context.d.ts.map +1 -1
- package/script/client/4_context.js +38 -5
- package/script/client/4_forum_manager.d.ts +5 -1
- package/script/client/4_forum_manager.d.ts.map +1 -1
- package/script/client/4_forum_manager.js +37 -0
- package/script/client/6_client.d.ts +152 -12
- package/script/client/6_client.d.ts.map +1 -1
- package/script/client/6_client.js +191 -11
- package/script/client/6_client_dispatcher.d.ts +152 -12
- package/script/client/6_client_dispatcher.d.ts.map +1 -1
- package/script/client/6_client_dispatcher.js +191 -11
- package/script/types/0_report_reason.d.ts +1 -0
- package/script/types/0_report_reason.d.ts.map +1 -1
- package/script/types/0_story_report_option.d.ts +3 -0
- package/script/types/0_story_report_option.d.ts.map +1 -1
- package/script/types/1_available_reactions.d.ts +3 -2
- package/script/types/1_available_reactions.d.ts.map +1 -1
- package/script/types/1_available_reactions.js +18 -0
- package/script/types/1_channel_location.d.ts +8 -0
- package/script/types/1_channel_location.d.ts.map +1 -0
- package/script/types/1_channel_location.js +14 -0
- package/script/types/1_sticker_set_p.d.ts +48 -0
- package/script/types/1_sticker_set_p.d.ts.map +1 -0
- package/script/types/1_sticker_set_p.js +76 -0
- package/script/types/1_story_report_result.d.ts +17 -3
- package/script/types/1_story_report_result.d.ts.map +1 -1
- package/script/types/2_poll_voter.d.ts +19 -0
- package/script/types/2_poll_voter.d.ts.map +1 -1
- package/script/types/2_poll_voter.js +19 -0
- package/script/types/2_secret_message.d.ts +1 -0
- package/script/types/2_secret_message.d.ts.map +1 -1
- package/script/types/3_bot_access_settings.d.ts +3 -0
- package/script/types/3_bot_access_settings.d.ts.map +1 -1
- package/script/types/3_connected_website.d.ts +10 -0
- package/script/types/3_connected_website.d.ts.map +1 -1
- package/script/types/3_poll_voter_list.d.ts +1 -0
- package/script/types/3_poll_voter_list.d.ts.map +1 -1
- package/script/types/3_rich_text_component.d.ts +24 -0
- package/script/types/3_rich_text_component.d.ts.map +1 -1
- package/script/types/3_text_to_translate.d.ts +3 -0
- package/script/types/3_text_to_translate.d.ts.map +1 -1
- package/script/types/3_translated_text.d.ts +3 -0
- package/script/types/3_translated_text.d.ts.map +1 -1
- package/script/types/4_page_block.d.ts +45 -1
- package/script/types/4_page_block.d.ts.map +1 -1
- package/script/types/A_topic.d.ts +20 -3
- package/script/types/A_topic.d.ts.map +1 -1
- package/script/types/A_topic.js +38 -0
- package/script/types/B_recent_action.d.ts +225 -0
- package/script/types/B_recent_action.d.ts.map +1 -0
- package/script/types/B_recent_action.js +306 -0
- package/script/types/{1_secret_chat_action.d.ts → B_topic_list_item.d.ts} +9 -10
- package/script/types/B_topic_list_item.d.ts.map +1 -0
- package/script/types/{1_secret_chat_action.js → B_topic_list_item.js} +0 -10
- package/script/types/B_update.d.ts +16 -16
- package/script/types/B_update.d.ts.map +1 -1
- package/script/types/C_recent_actions_entry.d.ts +13 -0
- package/script/types/C_recent_actions_entry.d.ts.map +1 -0
- package/script/types/C_recent_actions_entry.js +16 -0
- package/script/types/C_topic_list.d.ts +34 -0
- package/script/types/C_topic_list.d.ts.map +1 -0
- package/script/types/C_topic_list.js +31 -0
- package/esm/types/1_secret_chat_action.d.ts.map +0 -1
- package/script/types/1_secret_chat_action.d.ts.map +0 -1
|
@@ -192,6 +192,24 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
192
192
|
async sendCode(phoneNumber) {
|
|
193
193
|
return await this.#dispatch("sendCode", phoneNumber);
|
|
194
194
|
}
|
|
195
|
+
/**
|
|
196
|
+
* Allow a bot to set custom emoji status. User-only.
|
|
197
|
+
*
|
|
198
|
+
* @param botId The user identifier of the bot.
|
|
199
|
+
* @method ac
|
|
200
|
+
*/
|
|
201
|
+
async allowBotToSetCustomEmojiStatus(botId) {
|
|
202
|
+
return await this.#dispatch("allowBotToSetCustomEmojiStatus", botId);
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Disallow a bot to set custom emoji status. User-only.
|
|
206
|
+
*
|
|
207
|
+
* @param botId The user identifier of the bot.
|
|
208
|
+
* @method ac
|
|
209
|
+
*/
|
|
210
|
+
async disallowBotToSetCustomEmojiStatus(botId) {
|
|
211
|
+
return await this.#dispatch("disallowBotToSetCustomEmojiStatus", botId);
|
|
212
|
+
}
|
|
195
213
|
/**
|
|
196
214
|
* Check if a code entered by the user was the same as the verification code.
|
|
197
215
|
*
|
|
@@ -304,6 +322,14 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
304
322
|
async checkUsername(username, params) {
|
|
305
323
|
return await this.#dispatch("checkUsername", username, params);
|
|
306
324
|
}
|
|
325
|
+
/**
|
|
326
|
+
* Clear recent emoji statuses. User-only.
|
|
327
|
+
*
|
|
328
|
+
* @method ac
|
|
329
|
+
*/
|
|
330
|
+
async clearRecentEmojiStatuses() {
|
|
331
|
+
return await this.#dispatch("clearRecentEmojiStatuses");
|
|
332
|
+
}
|
|
307
333
|
/**
|
|
308
334
|
* Delete the current account. User-only.
|
|
309
335
|
*
|
|
@@ -355,6 +381,14 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
355
381
|
async getAccountTtl() {
|
|
356
382
|
return await this.#dispatch("getAccountTtl");
|
|
357
383
|
}
|
|
384
|
+
/**
|
|
385
|
+
* Get application configuration. User-only.
|
|
386
|
+
*
|
|
387
|
+
* @method ac
|
|
388
|
+
*/
|
|
389
|
+
async getApplicationConfiguration() {
|
|
390
|
+
return await this.#dispatch("getApplicationConfiguration");
|
|
391
|
+
}
|
|
358
392
|
/**
|
|
359
393
|
* Get app support. User-only.
|
|
360
394
|
*
|
|
@@ -447,6 +481,14 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
447
481
|
async getProfilePhotos(userId, params) {
|
|
448
482
|
return await this.#dispatch("getProfilePhotos", userId, params);
|
|
449
483
|
}
|
|
484
|
+
/**
|
|
485
|
+
* Get recent emoji statuses. User-only.
|
|
486
|
+
*
|
|
487
|
+
* @method ac
|
|
488
|
+
*/
|
|
489
|
+
async getRecentEmojiStatuses() {
|
|
490
|
+
return await this.#dispatch("getRecentEmojiStatuses");
|
|
491
|
+
}
|
|
450
492
|
/**
|
|
451
493
|
* Get timezones. User-only.
|
|
452
494
|
*
|
|
@@ -828,7 +870,7 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
828
870
|
return await this.#dispatch("deleteMessages", chatId, messageIds, params);
|
|
829
871
|
}
|
|
830
872
|
/**
|
|
831
|
-
* Delete a scheduled message.
|
|
873
|
+
* Delete a scheduled message. User-only.
|
|
832
874
|
*
|
|
833
875
|
* @method ms
|
|
834
876
|
* @param chatId The identifier of a chat.
|
|
@@ -838,7 +880,7 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
838
880
|
return await this.#dispatch("deleteScheduledMessage", chatId, messageId);
|
|
839
881
|
}
|
|
840
882
|
/**
|
|
841
|
-
* Delete multiple scheduled messages.
|
|
883
|
+
* Delete multiple scheduled messages. User-only.
|
|
842
884
|
*
|
|
843
885
|
* @method ms
|
|
844
886
|
* @param chatId The identifier of a chat.
|
|
@@ -869,7 +911,7 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
869
911
|
return await this.#dispatch("editInlineMessageLiveLocation", inlineMessageId, latitude, longitude, params);
|
|
870
912
|
}
|
|
871
913
|
/**
|
|
872
|
-
* Edit an inline message's media.
|
|
914
|
+
* Edit an inline message's media. User-only.
|
|
873
915
|
*
|
|
874
916
|
* @method ms
|
|
875
917
|
* @param inlineMessageId The identifier of the inline message.
|
|
@@ -1144,7 +1186,7 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
1144
1186
|
return await this.#dispatch("getSavedChats", params);
|
|
1145
1187
|
}
|
|
1146
1188
|
/**
|
|
1147
|
-
* Get messages saved from a specific chat.
|
|
1189
|
+
* Get messages saved from a specific chat. User-only.
|
|
1148
1190
|
*
|
|
1149
1191
|
* @method ms
|
|
1150
1192
|
* @param chatId The identifier of a chat.
|
|
@@ -1435,7 +1477,7 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
1435
1477
|
return await this.#dispatch("sendRichTextDraft", chatId, draftId, richText, params);
|
|
1436
1478
|
}
|
|
1437
1479
|
/**
|
|
1438
|
-
* Send a scheduled message before its schedule.
|
|
1480
|
+
* Send a scheduled message before its schedule. User-only.
|
|
1439
1481
|
*
|
|
1440
1482
|
* @method ms
|
|
1441
1483
|
* @param chatId The identifier of a chat.
|
|
@@ -1445,7 +1487,7 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
1445
1487
|
return await this.#dispatch("sendScheduledMessage", chatId, messageId);
|
|
1446
1488
|
}
|
|
1447
1489
|
/**
|
|
1448
|
-
* Send multiple scheduled messages before their schedule.
|
|
1490
|
+
* Send multiple scheduled messages before their schedule. User-only.
|
|
1449
1491
|
*
|
|
1450
1492
|
* @method ms
|
|
1451
1493
|
* @param chatId The identifier of a chat.
|
|
@@ -1914,6 +1956,15 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
1914
1956
|
async banChatMember(chatId, memberId, params) {
|
|
1915
1957
|
return await this.#dispatch("banChatMember", chatId, memberId, params);
|
|
1916
1958
|
}
|
|
1959
|
+
/**
|
|
1960
|
+
* Add a single user to a chat. User-only.
|
|
1961
|
+
*
|
|
1962
|
+
* @method ch
|
|
1963
|
+
* @param chatId The identifier of the chat to boost.
|
|
1964
|
+
*/
|
|
1965
|
+
async boostChat(chatId, params) {
|
|
1966
|
+
return await this.#dispatch("boostChat", chatId, params);
|
|
1967
|
+
}
|
|
1917
1968
|
/**
|
|
1918
1969
|
* Close a chat previously opened by openChat.
|
|
1919
1970
|
*
|
|
@@ -2030,6 +2081,26 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
2030
2081
|
async deleteChatStickerSet(chatId) {
|
|
2031
2082
|
return await this.#dispatch("deleteChatStickerSet", chatId);
|
|
2032
2083
|
}
|
|
2084
|
+
/**
|
|
2085
|
+
* Delete revoked invite links. User-only.
|
|
2086
|
+
*
|
|
2087
|
+
* @method ch
|
|
2088
|
+
* @param chatId The identifier of the chat.
|
|
2089
|
+
* @param userId The user identifier of a chat admin.
|
|
2090
|
+
*/
|
|
2091
|
+
async deleteRevokedInviteLinks(chatId, userId) {
|
|
2092
|
+
return await this.#dispatch("deleteRevokedInviteLinks", chatId, userId);
|
|
2093
|
+
}
|
|
2094
|
+
/**
|
|
2095
|
+
* Delete a forum topic.
|
|
2096
|
+
*
|
|
2097
|
+
* @method ch
|
|
2098
|
+
* @param chatId The identifier of the chat.
|
|
2099
|
+
* @param topicId The identifier of the topic.
|
|
2100
|
+
*/
|
|
2101
|
+
async deleteTopic(chatId, topicId) {
|
|
2102
|
+
return await this.#dispatch("deleteTopic", chatId, topicId);
|
|
2103
|
+
}
|
|
2033
2104
|
/**
|
|
2034
2105
|
* Disable automatic anti-spam in a group. User-only.
|
|
2035
2106
|
*
|
|
@@ -2178,6 +2249,15 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
2178
2249
|
async enableTopics(chatId, isShownAsTabs) {
|
|
2179
2250
|
return await this.#dispatch("enableTopics", chatId, isShownAsTabs);
|
|
2180
2251
|
}
|
|
2252
|
+
/**
|
|
2253
|
+
* Get administered chats. User-only.
|
|
2254
|
+
*
|
|
2255
|
+
* @method ch
|
|
2256
|
+
* @returns A list of administered chats.
|
|
2257
|
+
*/
|
|
2258
|
+
async getAdministeredChats(params) {
|
|
2259
|
+
return await this.#dispatch("getAdministeredChats", params);
|
|
2260
|
+
}
|
|
2181
2261
|
/**
|
|
2182
2262
|
* Get a chat.
|
|
2183
2263
|
*
|
|
@@ -2315,6 +2395,15 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
2315
2395
|
async getPinnedChats(from) {
|
|
2316
2396
|
return await this.#dispatch("getPinnedChats", from);
|
|
2317
2397
|
}
|
|
2398
|
+
/**
|
|
2399
|
+
* Get the recent actions of a channel or a supergroup. User-only.
|
|
2400
|
+
*
|
|
2401
|
+
* @method ch
|
|
2402
|
+
* @param chatId The identifier of the chat.
|
|
2403
|
+
*/
|
|
2404
|
+
async getRecentActions(chatId, params) {
|
|
2405
|
+
return await this.#dispatch("getRecentActions", chatId, params);
|
|
2406
|
+
}
|
|
2318
2407
|
/**
|
|
2319
2408
|
* Get recommended channels. User-only.
|
|
2320
2409
|
*
|
|
@@ -2344,6 +2433,35 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
2344
2433
|
async getSimilarChannels(chatId) {
|
|
2345
2434
|
return await this.#dispatch("getSimilarChannels", chatId);
|
|
2346
2435
|
}
|
|
2436
|
+
/**
|
|
2437
|
+
* Get a topic of a forum chat by its identifier. User-only.
|
|
2438
|
+
*
|
|
2439
|
+
* @method ch
|
|
2440
|
+
* @param chatId The identifier of the chat.
|
|
2441
|
+
* @param topicId The identifier of the topic.
|
|
2442
|
+
*/
|
|
2443
|
+
async getTopic(chatId, topicId) {
|
|
2444
|
+
return await this.#dispatch("getTopic", chatId, topicId);
|
|
2445
|
+
}
|
|
2446
|
+
/**
|
|
2447
|
+
* Get the topics of a forum chat. User-only.
|
|
2448
|
+
*
|
|
2449
|
+
* @method ch
|
|
2450
|
+
* @param chatId The identifier of the chat.
|
|
2451
|
+
*/
|
|
2452
|
+
async getTopics(chatId, params) {
|
|
2453
|
+
return await this.#dispatch("getTopics", chatId, params);
|
|
2454
|
+
}
|
|
2455
|
+
/**
|
|
2456
|
+
* Get topics of a forum chat by their identifiers. User-only.
|
|
2457
|
+
*
|
|
2458
|
+
* @method ch
|
|
2459
|
+
* @param chatId The identifier of the chat.
|
|
2460
|
+
* @param topicIds The identifiers of the topics.
|
|
2461
|
+
*/
|
|
2462
|
+
async getTopicsById(chatId, topicIds) {
|
|
2463
|
+
return await this.#dispatch("getTopicsById", chatId, topicIds);
|
|
2464
|
+
}
|
|
2347
2465
|
/**
|
|
2348
2466
|
* Hide the general forum topic.
|
|
2349
2467
|
*
|
|
@@ -3239,7 +3357,7 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
3239
3357
|
return await this.#dispatch("getContacts");
|
|
3240
3358
|
}
|
|
3241
3359
|
/**
|
|
3242
|
-
* Set a contact note.
|
|
3360
|
+
* Set a contact note. User-only.
|
|
3243
3361
|
*
|
|
3244
3362
|
* @method co
|
|
3245
3363
|
* @param userId The identifier of the user to update the note for.
|
|
@@ -3391,6 +3509,16 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
3391
3509
|
async removeGiftsFromCollection(chatId, collectionId, gifts) {
|
|
3392
3510
|
return await this.#dispatch("removeGiftsFromCollection", chatId, collectionId, gifts);
|
|
3393
3511
|
}
|
|
3512
|
+
/**
|
|
3513
|
+
* Reorder gift collections. User-only.
|
|
3514
|
+
*
|
|
3515
|
+
* @method gc
|
|
3516
|
+
* @param chatId The identifier of the chat that includes the gift collection.
|
|
3517
|
+
* @param collectionIds The identifiers of the gift collections.
|
|
3518
|
+
*/
|
|
3519
|
+
async reorderGiftCollections(chatId, collectionIds) {
|
|
3520
|
+
return await this.#dispatch("reorderGiftCollections", chatId, collectionIds);
|
|
3521
|
+
}
|
|
3394
3522
|
/**
|
|
3395
3523
|
* Reorder gifts in a gift collection. User-only.
|
|
3396
3524
|
*
|
|
@@ -3446,6 +3574,15 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
3446
3574
|
//
|
|
3447
3575
|
// ========================= STICKER SETS ========================= //
|
|
3448
3576
|
//
|
|
3577
|
+
/**
|
|
3578
|
+
* Add a sticker set. User-only.
|
|
3579
|
+
*
|
|
3580
|
+
* @method ss
|
|
3581
|
+
* @param slug The slug of the sticker set or its link.
|
|
3582
|
+
*/
|
|
3583
|
+
async addStickerSet(slug) {
|
|
3584
|
+
return await this.#dispatch("addStickerSet", slug);
|
|
3585
|
+
}
|
|
3449
3586
|
/**
|
|
3450
3587
|
* Add a sticker to a sticker set.
|
|
3451
3588
|
*
|
|
@@ -3456,6 +3593,15 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
3456
3593
|
async addStickerToStickerSet(slug, sticker, params) {
|
|
3457
3594
|
return await this.#dispatch("addStickerToStickerSet", slug, sticker, params);
|
|
3458
3595
|
}
|
|
3596
|
+
/**
|
|
3597
|
+
* Archive a sticker set. User-only.
|
|
3598
|
+
*
|
|
3599
|
+
* @method ss
|
|
3600
|
+
* @param slug The slug of the sticker set or its link.
|
|
3601
|
+
*/
|
|
3602
|
+
async archiveStickerSet(slug) {
|
|
3603
|
+
return await this.#dispatch("archiveStickerSet", slug);
|
|
3604
|
+
}
|
|
3459
3605
|
/**
|
|
3460
3606
|
* Change the position of a sticker in its set.
|
|
3461
3607
|
*
|
|
@@ -3496,6 +3642,14 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
3496
3642
|
async deleteStickerSet(slug) {
|
|
3497
3643
|
return await this.#dispatch("deleteStickerSet", slug);
|
|
3498
3644
|
}
|
|
3645
|
+
/**
|
|
3646
|
+
* Get added sticker sets. User-only.
|
|
3647
|
+
*
|
|
3648
|
+
* @method ss
|
|
3649
|
+
*/
|
|
3650
|
+
async getAddedStickerSets() {
|
|
3651
|
+
return await this.#dispatch("getAddedStickerSets");
|
|
3652
|
+
}
|
|
3499
3653
|
/**
|
|
3500
3654
|
* Get a dice sticker set.
|
|
3501
3655
|
*
|
|
@@ -3523,6 +3677,15 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
3523
3677
|
async removeStickerFromStickerSet(fileId) {
|
|
3524
3678
|
return await this.#dispatch("removeStickerFromStickerSet", fileId);
|
|
3525
3679
|
}
|
|
3680
|
+
/**
|
|
3681
|
+
* Remove a sticker set. User-only.
|
|
3682
|
+
*
|
|
3683
|
+
* @method ss
|
|
3684
|
+
* @param slug The slug of the sticker set or its link.
|
|
3685
|
+
*/
|
|
3686
|
+
async removeStickerSet(slug) {
|
|
3687
|
+
return await this.#dispatch("removeStickerSet", slug);
|
|
3688
|
+
}
|
|
3526
3689
|
/**
|
|
3527
3690
|
* Replace a sticker's emoji.
|
|
3528
3691
|
*
|
|
@@ -3583,6 +3746,15 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
3583
3746
|
async suggestStickerSetSlug(title) {
|
|
3584
3747
|
return await this.#dispatch("suggestStickerSetSlug", title);
|
|
3585
3748
|
}
|
|
3749
|
+
/**
|
|
3750
|
+
* Unarchive a sticker set. User-only.
|
|
3751
|
+
*
|
|
3752
|
+
* @method ss
|
|
3753
|
+
* @param slug The slug of the sticker set or its link.
|
|
3754
|
+
*/
|
|
3755
|
+
async unarchiveStickerSet(slug) {
|
|
3756
|
+
return await this.#dispatch("unarchiveStickerSet", slug);
|
|
3757
|
+
}
|
|
3586
3758
|
//
|
|
3587
3759
|
// ========================= MANAGED BOTS ========================= //
|
|
3588
3760
|
//
|
|
@@ -3689,14 +3861,13 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
3689
3861
|
return await this.#dispatch("sendSecretAudio", id, audio, params);
|
|
3690
3862
|
}
|
|
3691
3863
|
/**
|
|
3692
|
-
* Send a secret chat
|
|
3864
|
+
* Send a cancel typing action to a secret chat. User-only.
|
|
3693
3865
|
*
|
|
3694
3866
|
* @method sc
|
|
3695
3867
|
* @param id The identifier of the secret chat.
|
|
3696
|
-
* @param action The type of action to send.
|
|
3697
3868
|
*/
|
|
3698
|
-
async
|
|
3699
|
-
return await this.#dispatch("
|
|
3869
|
+
async sendSecretCancelTypingAction(id) {
|
|
3870
|
+
return await this.#dispatch("sendSecretCancelTypingAction", id);
|
|
3700
3871
|
}
|
|
3701
3872
|
/**
|
|
3702
3873
|
* Send a contact to a secret chat. User-only.
|
|
@@ -3770,6 +3941,15 @@ class ClientDispatcher extends _5_composer_js_1.Composer {
|
|
|
3770
3941
|
async sendSecretSticker(id, sticker, params) {
|
|
3771
3942
|
return await this.#dispatch("sendSecretSticker", id, sticker, params);
|
|
3772
3943
|
}
|
|
3944
|
+
/**
|
|
3945
|
+
* Send a typing action to a secret chat. User-only.
|
|
3946
|
+
*
|
|
3947
|
+
* @method sc
|
|
3948
|
+
* @param id The identifier of the secret chat.
|
|
3949
|
+
*/
|
|
3950
|
+
async sendSecretTypingAction(id) {
|
|
3951
|
+
return await this.#dispatch("sendSecretTypingAction", id);
|
|
3952
|
+
}
|
|
3773
3953
|
/**
|
|
3774
3954
|
* Send a venue to a secret chat. User-only.
|
|
3775
3955
|
*
|
|
@@ -58,6 +58,7 @@ export interface ReportReasonIllegalDrugs {
|
|
|
58
58
|
export interface ReportReasonPersonalDetails {
|
|
59
59
|
type: "personalDetails";
|
|
60
60
|
}
|
|
61
|
+
/** Any type of report reason. */
|
|
61
62
|
export type ReportReason = ReportReasonSpam | ReportReasonViolence | ReportReasonPornography | ReportReasonChildAbuse | ReportReasonOther | ReportReasonCopyright | ReportReasonLocationIrrelevant | ReportReasonFake | ReportReasonIllegalDrugs | ReportReasonPersonalDetails;
|
|
62
63
|
export declare function reportReasonToTlObject(reportReason: ReportReason): Api.ReportReason;
|
|
63
64
|
//# sourceMappingURL=0_report_reason.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"0_report_reason.d.ts","sourceRoot":"","sources":["../../src/types/0_report_reason.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEtC,gBAAgB;AAChB,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,gBAAgB;AAChB,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,gBAAgB;AAChB,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,aAAa,CAAC;CACrB;AAED,gBAAgB;AAChB,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,YAAY,CAAC;CACpB;AAED,gBAAgB;AAChB,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,OAAO,CAAC;CACf;AAED,gBAAgB;AAChB,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,WAAW,CAAC;CACnB;AAED,gBAAgB;AAChB,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE,oBAAoB,CAAC;CAC5B;AAED,gBAAgB;AAChB,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,gBAAgB;AAChB,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,cAAc,CAAC;CACtB;AAED,gBAAgB;AAChB,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,iBAAiB,CAAC;CACzB;AAED,MAAM,MAAM,YAAY,GAAG,gBAAgB,GAAG,oBAAoB,GAAG,uBAAuB,GAAG,sBAAsB,GAAG,iBAAiB,GAAG,qBAAqB,GAAG,8BAA8B,GAAG,gBAAgB,GAAG,wBAAwB,GAAG,2BAA2B,CAAC;AAE/Q,wBAAgB,sBAAsB,CAAC,YAAY,EAAE,YAAY,GAAG,GAAG,CAAC,YAAY,CAyBnF"}
|
|
1
|
+
{"version":3,"file":"0_report_reason.d.ts","sourceRoot":"","sources":["../../src/types/0_report_reason.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEtC,gBAAgB;AAChB,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,gBAAgB;AAChB,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,gBAAgB;AAChB,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,aAAa,CAAC;CACrB;AAED,gBAAgB;AAChB,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,YAAY,CAAC;CACpB;AAED,gBAAgB;AAChB,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,OAAO,CAAC;CACf;AAED,gBAAgB;AAChB,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,WAAW,CAAC;CACnB;AAED,gBAAgB;AAChB,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE,oBAAoB,CAAC;CAC5B;AAED,gBAAgB;AAChB,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,gBAAgB;AAChB,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,cAAc,CAAC;CACtB;AAED,gBAAgB;AAChB,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,iBAAiB,CAAC;CACzB;AAED,iCAAiC;AACjC,MAAM,MAAM,YAAY,GAAG,gBAAgB,GAAG,oBAAoB,GAAG,uBAAuB,GAAG,sBAAsB,GAAG,iBAAiB,GAAG,qBAAqB,GAAG,8BAA8B,GAAG,gBAAgB,GAAG,wBAAwB,GAAG,2BAA2B,CAAC;AAE/Q,wBAAgB,sBAAsB,CAAC,YAAY,EAAE,YAAY,GAAG,GAAG,CAAC,YAAY,CAyBnF"}
|
|
@@ -18,8 +18,11 @@
|
|
|
18
18
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
19
|
*/
|
|
20
20
|
import type { Api } from "../2_tl.js";
|
|
21
|
+
/** A story report option. */
|
|
21
22
|
export interface StoryReportOption {
|
|
23
|
+
/** The option's text. */
|
|
22
24
|
text: string;
|
|
25
|
+
/** The option's identifier. */
|
|
23
26
|
option: string;
|
|
24
27
|
}
|
|
25
28
|
export declare function constructStoryReportOption(rr: Api.messageReportOption): StoryReportOption;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"0_story_report_option.d.ts","sourceRoot":"","sources":["../../src/types/0_story_report_option.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,0BAA0B,CAAC,EAAE,EAAE,GAAG,CAAC,mBAAmB,GAAG,iBAAiB,CAIzF"}
|
|
1
|
+
{"version":3,"file":"0_story_report_option.d.ts","sourceRoot":"","sources":["../../src/types/0_story_report_option.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEtC,6BAA6B;AAC7B,MAAM,WAAW,iBAAiB;IAChC,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,+BAA+B;IAC/B,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,0BAA0B,CAAC,EAAE,EAAE,GAAG,CAAC,mBAAmB,GAAG,iBAAiB,CAIzF"}
|
|
@@ -35,7 +35,7 @@ export interface AvailableReactionsSome {
|
|
|
35
35
|
/** The allowed reactions. */
|
|
36
36
|
reactions: Reaction[];
|
|
37
37
|
/** The maximum number of allowed reactions on a single message. */
|
|
38
|
-
maxReactionCount
|
|
38
|
+
maxReactionCount?: number;
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
41
41
|
* An available reactions value allowing all types of reactions.
|
|
@@ -44,9 +44,10 @@ export interface AvailableReactionsSome {
|
|
|
44
44
|
export interface AvailableReactionsAll {
|
|
45
45
|
type: "all";
|
|
46
46
|
/** The maximum number of allowed reactions on a single message. */
|
|
47
|
-
maxReactionCount
|
|
47
|
+
maxReactionCount?: number;
|
|
48
48
|
}
|
|
49
49
|
/** A chat's available reactions. */
|
|
50
50
|
export type AvailableReactions = AvailableReactionsNone | AvailableReactionsSome | AvailableReactionsAll;
|
|
51
|
+
export declare function constructAvailableReactions(cr: Api.ChatReactions): AvailableReactions;
|
|
51
52
|
export declare function availableReactionsToTlObject(chatAvailableReactions: AvailableReactions): Api.ChatReactions;
|
|
52
53
|
//# sourceMappingURL=1_available_reactions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_available_reactions.d.ts","sourceRoot":"","sources":["../../src/types/1_available_reactions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,
|
|
1
|
+
{"version":3,"file":"1_available_reactions.d.ts","sourceRoot":"","sources":["../../src/types/1_available_reactions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAqB,KAAK,QAAQ,EAAsB,MAAM,iBAAiB,CAAC;AAEvF;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,6BAA6B;IAC7B,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,mEAAmE;IACnE,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,KAAK,CAAC;IACZ,mEAAmE;IACnE,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,oCAAoC;AACpC,MAAM,MAAM,kBAAkB,GAAG,sBAAsB,GAAG,sBAAsB,GAAG,qBAAqB,CAAC;AAEzG,wBAAgB,2BAA2B,CAAC,EAAE,EAAE,GAAG,CAAC,aAAa,GAAG,kBAAkB,CAgBrF;AAED,wBAAgB,4BAA4B,CAAC,sBAAsB,EAAE,kBAAkB,GAAG,GAAG,CAAC,aAAa,CAS1G"}
|
|
@@ -19,8 +19,26 @@
|
|
|
19
19
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.constructAvailableReactions = constructAvailableReactions;
|
|
22
23
|
exports.availableReactionsToTlObject = availableReactionsToTlObject;
|
|
23
24
|
const _0_reaction_js_1 = require("./0_reaction.js");
|
|
25
|
+
function constructAvailableReactions(cr) {
|
|
26
|
+
switch (cr._) {
|
|
27
|
+
case "chatReactionsNone":
|
|
28
|
+
return {
|
|
29
|
+
type: "none",
|
|
30
|
+
};
|
|
31
|
+
case "chatReactionsAll":
|
|
32
|
+
return {
|
|
33
|
+
type: "all",
|
|
34
|
+
};
|
|
35
|
+
case "chatReactionsSome":
|
|
36
|
+
return {
|
|
37
|
+
type: "some",
|
|
38
|
+
reactions: cr.reactions.map(_0_reaction_js_1.constructReaction),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
}
|
|
24
42
|
function availableReactionsToTlObject(chatAvailableReactions) {
|
|
25
43
|
switch (chatAvailableReactions.type) {
|
|
26
44
|
case "none":
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Api } from "../2_tl.js";
|
|
2
|
+
import { type Location } from "./0_location.js";
|
|
3
|
+
export interface ChannelLocation {
|
|
4
|
+
location?: Location;
|
|
5
|
+
address: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function constructChannelLocation(cl: Api.channelLocation): ChannelLocation;
|
|
8
|
+
//# sourceMappingURL=1_channel_location.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1_channel_location.d.ts","sourceRoot":"","sources":["../../src/types/1_channel_location.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAqB,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEnE,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,wBAAwB,CAAC,EAAE,EAAE,GAAG,CAAC,eAAe,GAAG,eAAe,CAOjF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.constructChannelLocation = constructChannelLocation;
|
|
4
|
+
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
5
|
+
const _2_tl_js_1 = require("../2_tl.js");
|
|
6
|
+
const _0_location_js_1 = require("./0_location.js");
|
|
7
|
+
function constructChannelLocation(cl) {
|
|
8
|
+
const location = _2_tl_js_1.Api.is("geoPoint", cl.geo_point) ? (0, _0_location_js_1.constructLocation)(cl.geo_point) : undefined;
|
|
9
|
+
const address = cl.address;
|
|
10
|
+
return (0, _1_utilities_js_1.cleanObject)({
|
|
11
|
+
location,
|
|
12
|
+
address,
|
|
13
|
+
});
|
|
14
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
3
|
+
* Copyright (C) 2023-2026 Roj <https://roj.im/>
|
|
4
|
+
*
|
|
5
|
+
* This file is part of MTKruto.
|
|
6
|
+
*
|
|
7
|
+
* This program is free software: you can redistribute it and/or modify
|
|
8
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
9
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
10
|
+
* (at your option) any later version.
|
|
11
|
+
*
|
|
12
|
+
* This program is distributed in the hope that it will be useful,
|
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
* GNU Lesser General Public License for more details.
|
|
16
|
+
*
|
|
17
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
18
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
19
|
+
*/
|
|
20
|
+
import { Api } from "../2_tl.js";
|
|
21
|
+
import type { Thumbnail } from "./0_thumbnail.js";
|
|
22
|
+
/** A partial sticker (or emoji) set. */
|
|
23
|
+
export interface StickerSetP {
|
|
24
|
+
/** The unique identifier of the set. */
|
|
25
|
+
id: string;
|
|
26
|
+
/** The set's slug. */
|
|
27
|
+
name: string;
|
|
28
|
+
/** The set's title. */
|
|
29
|
+
title: string;
|
|
30
|
+
/** The type of the set. */
|
|
31
|
+
type: "regular" | "mask" | "customEmoji";
|
|
32
|
+
/** Thumbnails if available. */
|
|
33
|
+
thumbnails: Thumbnail[];
|
|
34
|
+
/** Whether the emojis in the set are adaptive. */
|
|
35
|
+
isAdaptive: boolean;
|
|
36
|
+
/** Whether the emojis in the set can be set as channel status. */
|
|
37
|
+
canSetAsChannelStatus: boolean;
|
|
38
|
+
/** Whether the current account is the creator of the set. */
|
|
39
|
+
isCreator: boolean;
|
|
40
|
+
/** Whether the set is official. */
|
|
41
|
+
isOfficial: boolean;
|
|
42
|
+
/** Whether the set is archived. */
|
|
43
|
+
isArchived: boolean;
|
|
44
|
+
/** A point in time when the set was added to the current account. */
|
|
45
|
+
addedAt?: number;
|
|
46
|
+
}
|
|
47
|
+
export declare function constructStickerSetP(stickerSet: Api.StickerSet): StickerSetP;
|
|
48
|
+
//# sourceMappingURL=1_sticker_set_p.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1_sticker_set_p.d.ts","sourceRoot":"","sources":["../../src/types/1_sticker_set_p.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,wCAAwC;AACxC,MAAM,WAAW,WAAW;IAC1B,wCAAwC;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,sBAAsB;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,IAAI,EAAE,SAAS,GAAG,MAAM,GAAG,aAAa,CAAC;IACzC,+BAA+B;IAC/B,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,kDAAkD;IAClD,UAAU,EAAE,OAAO,CAAC;IACpB,kEAAkE;IAClE,qBAAqB,EAAE,OAAO,CAAC;IAC/B,6DAA6D;IAC7D,SAAS,EAAE,OAAO,CAAC;IACnB,mCAAmC;IACnC,UAAU,EAAE,OAAO,CAAC;IACpB,mCAAmC;IACnC,UAAU,EAAE,OAAO,CAAC;IACpB,qEAAqE;IACrE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,GAAG,CAAC,UAAU,GAAG,WAAW,CAuD5E"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* MTKruto - Cross-runtime JavaScript library for building Telegram clients
|
|
4
|
+
* Copyright (C) 2023-2026 Roj <https://roj.im/>
|
|
5
|
+
*
|
|
6
|
+
* This file is part of MTKruto.
|
|
7
|
+
*
|
|
8
|
+
* This program is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU Lesser General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU Lesser General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
19
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.constructStickerSetP = constructStickerSetP;
|
|
23
|
+
const _2_tl_js_1 = require("../2_tl.js");
|
|
24
|
+
const _file_id_js_1 = require("./_file_id.js");
|
|
25
|
+
function constructStickerSetP(stickerSet) {
|
|
26
|
+
const type = stickerSet.emojis ? "customEmoji" : stickerSet.masks ? "mask" : "regular";
|
|
27
|
+
const name = stickerSet.short_name;
|
|
28
|
+
const title = stickerSet.title;
|
|
29
|
+
const thumbnails = new Array();
|
|
30
|
+
const thumb = stickerSet.thumbs?.[0];
|
|
31
|
+
if (thumb !== undefined && stickerSet.thumb_version !== undefined && stickerSet.thumb_dc_id !== undefined && _2_tl_js_1.Api.is("photoSize", thumb)) {
|
|
32
|
+
const fileId = {
|
|
33
|
+
type: _file_id_js_1.FileType.Photo,
|
|
34
|
+
dcId: stickerSet.thumb_dc_id,
|
|
35
|
+
location: {
|
|
36
|
+
type: "photo",
|
|
37
|
+
source: {
|
|
38
|
+
type: _file_id_js_1.PhotoSourceType.StickerSetThumbnailVersion,
|
|
39
|
+
stickerSetId: stickerSet.id,
|
|
40
|
+
stickerSetAccessHash: stickerSet.access_hash,
|
|
41
|
+
version: stickerSet.thumb_version,
|
|
42
|
+
},
|
|
43
|
+
id: 0n,
|
|
44
|
+
accessHash: 0n,
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
thumbnails.push({
|
|
48
|
+
fileId: (0, _file_id_js_1.serializeFileId)(fileId),
|
|
49
|
+
fileUniqueId: (0, _file_id_js_1.toUniqueFileId)(fileId),
|
|
50
|
+
width: thumb.w,
|
|
51
|
+
height: thumb.h,
|
|
52
|
+
fileSize: thumb.size,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
const adaptive = !!stickerSet.text_color;
|
|
56
|
+
const canSetAsChannelStatus = !!stickerSet.channel_emoji_status;
|
|
57
|
+
const creator = !!stickerSet.creator;
|
|
58
|
+
const official = !!stickerSet.official;
|
|
59
|
+
const archived = !!stickerSet.archived;
|
|
60
|
+
const stickerSet_ = {
|
|
61
|
+
id: String(stickerSet.id),
|
|
62
|
+
type,
|
|
63
|
+
name,
|
|
64
|
+
title,
|
|
65
|
+
thumbnails,
|
|
66
|
+
isAdaptive: adaptive,
|
|
67
|
+
canSetAsChannelStatus,
|
|
68
|
+
isCreator: creator,
|
|
69
|
+
isOfficial: official,
|
|
70
|
+
isArchived: archived,
|
|
71
|
+
};
|
|
72
|
+
if (stickerSet.installed_date) {
|
|
73
|
+
stickerSet_.addedAt = stickerSet.installed_date;
|
|
74
|
+
}
|
|
75
|
+
return stickerSet_;
|
|
76
|
+
}
|
|
@@ -19,22 +19,36 @@
|
|
|
19
19
|
*/
|
|
20
20
|
import type { Api } from "../2_tl.js";
|
|
21
21
|
import { type StoryReportOption } from "./0_story_report_option.js";
|
|
22
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* A story report result indicating that a report option is required to complete the report.
|
|
24
|
+
* @unlisted
|
|
25
|
+
*/
|
|
23
26
|
export interface StoryReportResultOptionRequired {
|
|
24
27
|
type: "optionRequired";
|
|
28
|
+
/** The title of the report result. */
|
|
25
29
|
title: string;
|
|
30
|
+
/** The available report options. */
|
|
26
31
|
options: StoryReportOption[];
|
|
27
32
|
}
|
|
28
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* A story report result indicating that a text is required to complete the report.
|
|
35
|
+
* @unlisted
|
|
36
|
+
*/
|
|
29
37
|
export interface StoryReportResultTextRequired {
|
|
30
38
|
type: "textRequired";
|
|
39
|
+
/** The identifier of the option requiring text. */
|
|
31
40
|
option: string;
|
|
41
|
+
/** Whether the text is optional. */
|
|
32
42
|
isOptional: boolean;
|
|
33
43
|
}
|
|
34
|
-
/**
|
|
44
|
+
/**
|
|
45
|
+
* A story report result indicating that the story was reported.
|
|
46
|
+
* @unlisted
|
|
47
|
+
*/
|
|
35
48
|
export interface StoryReportResultReported {
|
|
36
49
|
type: "reported";
|
|
37
50
|
}
|
|
51
|
+
/** Any type of story report result. */
|
|
38
52
|
export type StoryReportResult = StoryReportResultOptionRequired | StoryReportResultTextRequired | StoryReportResultReported;
|
|
39
53
|
export declare function constructStoryReportResult(rr: Api.ReportResult): StoryReportResult;
|
|
40
54
|
//# sourceMappingURL=1_story_report_result.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1_story_report_result.d.ts","sourceRoot":"","sources":["../../src/types/1_story_report_result.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAA8B,KAAK,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAEhG
|
|
1
|
+
{"version":3,"file":"1_story_report_result.d.ts","sourceRoot":"","sources":["../../src/types/1_story_report_result.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAA8B,KAAK,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAEhG;;;GAGG;AACH,MAAM,WAAW,+BAA+B;IAC9C,IAAI,EAAE,gBAAgB,CAAC;IACvB,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,OAAO,EAAE,iBAAiB,EAAE,CAAC;CAC9B;AAED;;;GAGG;AACH,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,cAAc,CAAC;IACrB,mDAAmD;IACnD,MAAM,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,UAAU,EAAE,OAAO,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,uCAAuC;AACvC,MAAM,MAAM,iBAAiB,GAAG,+BAA+B,GAAG,6BAA6B,GAAG,yBAAyB,CAAC;AAE5H,wBAAgB,0BAA0B,CAAC,EAAE,EAAE,GAAG,CAAC,YAAY,GAAG,iBAAiB,CAclF"}
|