@mtkruto/node 0.114.0 → 0.116.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.
Files changed (149) hide show
  1. package/esm/3_types.d.ts +7 -1
  2. package/esm/3_types.d.ts.map +1 -1
  3. package/esm/3_types.js +7 -1
  4. package/esm/client/0_params.d.ts +4 -0
  5. package/esm/client/0_params.d.ts.map +1 -1
  6. package/esm/client/1_client_generic.d.ts +51 -30
  7. package/esm/client/1_client_generic.d.ts.map +1 -1
  8. package/esm/client/2_account_manager.d.ts +13 -4
  9. package/esm/client/2_account_manager.d.ts.map +1 -1
  10. package/esm/client/2_account_manager.js +44 -7
  11. package/esm/client/2_bot_info_manager.d.ts +9 -2
  12. package/esm/client/2_bot_info_manager.d.ts.map +1 -1
  13. package/esm/client/2_bot_info_manager.js +14 -0
  14. package/esm/client/2_context.d.ts +332 -280
  15. package/esm/client/2_context.d.ts.map +1 -1
  16. package/esm/client/2_context.js +608 -517
  17. package/esm/client/3_filters.d.ts +1 -1
  18. package/esm/client/3_filters.d.ts.map +1 -1
  19. package/esm/client/3_message_manager.d.ts +2 -8
  20. package/esm/client/3_message_manager.d.ts.map +1 -1
  21. package/esm/client/3_message_manager.js +6 -44
  22. package/esm/client/4_checklist_manager.d.ts +38 -0
  23. package/esm/client/4_checklist_manager.d.ts.map +1 -0
  24. package/esm/client/4_checklist_manager.js +68 -0
  25. package/esm/client/4_gift_manager.d.ts +1 -0
  26. package/esm/client/4_gift_manager.d.ts.map +1 -1
  27. package/esm/client/4_gift_manager.js +6 -0
  28. package/esm/client/5_client.d.ts +51 -30
  29. package/esm/client/5_client.d.ts.map +1 -1
  30. package/esm/client/5_client.js +84 -44
  31. package/esm/client/5_client_dispatcher.d.ts +51 -30
  32. package/esm/client/5_client_dispatcher.d.ts.map +1 -1
  33. package/esm/client/5_client_dispatcher.js +68 -38
  34. package/esm/types/0_emoji_status.d.ts +45 -0
  35. package/esm/types/0_emoji_status.d.ts.map +1 -0
  36. package/esm/types/0_emoji_status.js +33 -0
  37. package/esm/types/0_input_emoji_status.d.ts +33 -0
  38. package/esm/types/0_input_emoji_status.d.ts.map +1 -0
  39. package/esm/types/0_user_status.d.ts +64 -0
  40. package/esm/types/0_user_status.d.ts.map +1 -0
  41. package/esm/types/0_user_status.js +35 -0
  42. package/esm/types/{0_working_hour_interval.d.ts → 0_working_hours_interval.d.ts} +2 -2
  43. package/esm/types/0_working_hours_interval.d.ts.map +1 -0
  44. package/esm/types/0_working_hours_interval.js +20 -0
  45. package/esm/types/1_bot_commands.d.ts +30 -0
  46. package/esm/types/1_bot_commands.d.ts.map +1 -0
  47. package/esm/types/1_bot_commands.js +20 -0
  48. package/esm/types/1_chat_p.d.ts +6 -0
  49. package/esm/types/1_chat_p.d.ts.map +1 -1
  50. package/esm/types/1_chat_p.js +4 -0
  51. package/esm/types/1_working_hours.d.ts +2 -2
  52. package/esm/types/1_working_hours.d.ts.map +1 -1
  53. package/esm/types/2_user.d.ts +6 -0
  54. package/esm/types/2_user.d.ts.map +1 -1
  55. package/esm/types/2_user.js +5 -0
  56. package/esm/types/3_reply_quote.d.ts +1 -1
  57. package/esm/types/3_reply_quote.d.ts.map +1 -1
  58. package/esm/types/4_gift.d.ts +1 -1
  59. package/esm/types/4_gift.d.ts.map +1 -1
  60. package/esm/types/5_claimed_gift.d.ts +1 -1
  61. package/esm/types/5_claimed_gift.js +1 -1
  62. package/esm/types/5_gift_non_upgraded_information.d.ts +47 -0
  63. package/esm/types/5_gift_non_upgraded_information.d.ts.map +1 -0
  64. package/esm/types/5_gift_non_upgraded_information.js +69 -0
  65. package/esm/types/5_gift_upgraded_information.d.ts +41 -0
  66. package/esm/types/5_gift_upgraded_information.d.ts.map +1 -0
  67. package/esm/types/5_gift_upgraded_information.js +58 -0
  68. package/esm/types/6_message.d.ts +21 -1
  69. package/esm/types/6_message.d.ts.map +1 -1
  70. package/esm/types/6_message.js +12 -0
  71. package/esm/types/8_update.d.ts +60 -2
  72. package/esm/types/8_update.d.ts.map +1 -1
  73. package/package.json +1 -1
  74. package/script/3_types.d.ts +7 -1
  75. package/script/3_types.d.ts.map +1 -1
  76. package/script/3_types.js +7 -1
  77. package/script/client/0_params.d.ts +4 -0
  78. package/script/client/0_params.d.ts.map +1 -1
  79. package/script/client/1_client_generic.d.ts +51 -30
  80. package/script/client/1_client_generic.d.ts.map +1 -1
  81. package/script/client/2_account_manager.d.ts +13 -4
  82. package/script/client/2_account_manager.d.ts.map +1 -1
  83. package/script/client/2_account_manager.js +43 -6
  84. package/script/client/2_bot_info_manager.d.ts +9 -2
  85. package/script/client/2_bot_info_manager.d.ts.map +1 -1
  86. package/script/client/2_bot_info_manager.js +14 -0
  87. package/script/client/2_context.d.ts +332 -280
  88. package/script/client/2_context.d.ts.map +1 -1
  89. package/script/client/2_context.js +608 -517
  90. package/script/client/3_filters.d.ts +1 -1
  91. package/script/client/3_filters.d.ts.map +1 -1
  92. package/script/client/3_message_manager.d.ts +2 -8
  93. package/script/client/3_message_manager.d.ts.map +1 -1
  94. package/script/client/3_message_manager.js +6 -44
  95. package/script/client/4_checklist_manager.d.ts +38 -0
  96. package/script/client/4_checklist_manager.d.ts.map +1 -0
  97. package/script/client/4_checklist_manager.js +72 -0
  98. package/script/client/4_gift_manager.d.ts +1 -0
  99. package/script/client/4_gift_manager.d.ts.map +1 -1
  100. package/script/client/4_gift_manager.js +6 -0
  101. package/script/client/5_client.d.ts +51 -30
  102. package/script/client/5_client.d.ts.map +1 -1
  103. package/script/client/5_client.js +84 -44
  104. package/script/client/5_client_dispatcher.d.ts +51 -30
  105. package/script/client/5_client_dispatcher.d.ts.map +1 -1
  106. package/script/client/5_client_dispatcher.js +68 -38
  107. package/script/types/0_emoji_status.d.ts +45 -0
  108. package/script/types/0_emoji_status.d.ts.map +1 -0
  109. package/script/types/0_emoji_status.js +36 -0
  110. package/script/types/0_input_emoji_status.d.ts +33 -0
  111. package/script/types/0_input_emoji_status.d.ts.map +1 -0
  112. package/script/types/0_user_status.d.ts +64 -0
  113. package/script/types/0_user_status.d.ts.map +1 -0
  114. package/script/types/0_user_status.js +38 -0
  115. package/script/types/{0_working_hour_interval.d.ts → 0_working_hours_interval.d.ts} +2 -2
  116. package/script/types/0_working_hours_interval.d.ts.map +1 -0
  117. package/script/types/0_working_hours_interval.js +21 -0
  118. package/script/types/1_bot_commands.d.ts +30 -0
  119. package/script/types/1_bot_commands.d.ts.map +1 -0
  120. package/script/types/1_bot_commands.js +21 -0
  121. package/script/types/1_chat_p.d.ts +6 -0
  122. package/script/types/1_chat_p.d.ts.map +1 -1
  123. package/script/types/1_chat_p.js +4 -0
  124. package/script/types/1_working_hours.d.ts +2 -2
  125. package/script/types/1_working_hours.d.ts.map +1 -1
  126. package/script/types/2_user.d.ts +6 -0
  127. package/script/types/2_user.d.ts.map +1 -1
  128. package/script/types/2_user.js +5 -0
  129. package/script/types/3_reply_quote.d.ts +1 -1
  130. package/script/types/3_reply_quote.d.ts.map +1 -1
  131. package/script/types/4_gift.d.ts +1 -1
  132. package/script/types/4_gift.d.ts.map +1 -1
  133. package/script/types/5_claimed_gift.d.ts +1 -1
  134. package/script/types/5_claimed_gift.js +1 -1
  135. package/script/types/5_gift_non_upgraded_information.d.ts +47 -0
  136. package/script/types/5_gift_non_upgraded_information.d.ts.map +1 -0
  137. package/script/types/5_gift_non_upgraded_information.js +72 -0
  138. package/script/types/5_gift_upgraded_information.d.ts +41 -0
  139. package/script/types/5_gift_upgraded_information.d.ts.map +1 -0
  140. package/script/types/5_gift_upgraded_information.js +61 -0
  141. package/script/types/6_message.d.ts +21 -1
  142. package/script/types/6_message.d.ts.map +1 -1
  143. package/script/types/6_message.js +12 -0
  144. package/script/types/8_update.d.ts +60 -2
  145. package/script/types/8_update.d.ts.map +1 -1
  146. package/esm/types/0_working_hour_interval.d.ts.map +0 -1
  147. package/script/types/0_working_hour_interval.d.ts.map +0 -1
  148. /package/esm/types/{0_working_hour_interval.js → 0_input_emoji_status.js} +0 -0
  149. /package/script/types/{0_working_hour_interval.js → 0_input_emoji_status.js} +0 -0
@@ -376,20 +376,37 @@ class ClientDispatcher extends _4_composer_js_1.Composer {
376
376
  * Set the current account's emoji status. User-only.
377
377
  *
378
378
  * @method ac
379
- * @param id The identifier of the emoji to be used as the new status.
379
+ * @param emojiStatus The emoji or gift to set as the new emoji status.
380
380
  */
381
- async setEmojiStatus(id, params) {
382
- return await this.#dispatch(id, params);
381
+ async setEmojiStatus(emojiStatus, params) {
382
+ return await this.#dispatch("setEmojiStatus", emojiStatus, params);
383
+ }
384
+ /**
385
+ * Remove the current account's emoji status. User-only.
386
+ *
387
+ * @method ac
388
+ */
389
+ async removeEmojiStatus() {
390
+ return await this.#dispatch("removeEmojiStatus");
383
391
  }
384
392
  /**
385
393
  * Set the emoji status of a bot's user. Bot-only.
386
394
  *
387
395
  * @method ac
388
396
  * @param userId The identifier of a user of the bot.
389
- * @param id The identifier of the emoji to be used as the new status.
397
+ * @param emojiStatus The emoji or gift to set as the new emoji status.
398
+ */
399
+ async setUserEmojiStatus(userId, emojiStatus, params) {
400
+ return await this.#dispatch("setUserEmojiStatus", userId, emojiStatus, params);
401
+ }
402
+ /**
403
+ * Remove the emoji status of a bot's user. Bot-only.
404
+ *
405
+ * @method ac
406
+ * @param userId The identifier of a user of the bot.
390
407
  */
391
- async setUserEmojiStatus(userId, id, params) {
392
- return await this.#dispatch("setUserEmojiStatus", userId, id, params);
408
+ async removeUserEmojiStatus(userId) {
409
+ return await this.#dispatch("removeUserEmojiStatus", userId);
393
410
  }
394
411
  /**
395
412
  * Update the profile of the current user. At least one parameter must be specified. User-only.
@@ -941,8 +958,8 @@ class ClientDispatcher extends _4_composer_js_1.Composer {
941
958
  * @method ms
942
959
  * @param chatId The identifier of a chat.
943
960
  */
944
- async unpinMessages(chatId) {
945
- return await this.#dispatch("unpinMessages", chatId);
961
+ async unpinMessages(chatId, params) {
962
+ return await this.#dispatch("unpinMessages", chatId, params);
946
963
  }
947
964
  /**
948
965
  * Forward multiple messages.
@@ -1094,13 +1111,40 @@ class ClientDispatcher extends _4_composer_js_1.Composer {
1094
1111
  async getMessageReactions(chatId, messageId, params) {
1095
1112
  return await this.#dispatch("getMessageReactions", chatId, messageId, params);
1096
1113
  }
1114
+ //
1115
+ // ========================= POLLS ========================= //
1116
+ //
1117
+ /**
1118
+ * Cast a vote. User-only.
1119
+ *
1120
+ * @method pl
1121
+ * @param chatId The identifier of the chat that includes the poll.
1122
+ * @param messageId The identifier of the message that includes the poll.
1123
+ * @param optionIndexes The indexes of the options to cast for.
1124
+ */
1125
+ async vote(chatId, messageId, optionIndexes) {
1126
+ return await this.#dispatch("vote", chatId, messageId, optionIndexes);
1127
+ }
1128
+ /**
1129
+ * Retract a vote. User-only.
1130
+ *
1131
+ * @method pl
1132
+ * @param chatId The identifier of the chat that includes the poll.
1133
+ * @param messageId The identifier of the message that includes the poll.
1134
+ */
1135
+ async retractVote(chatId, messageId) {
1136
+ return await this.#dispatch("retractVote", chatId, messageId);
1137
+ }
1138
+ //
1139
+ // ========================= CHECKLISTS ========================= //
1140
+ //
1097
1141
  /**
1098
1142
  * Add items to a checklist. User-only.
1099
1143
  *
1100
1144
  * @param chatId The identifier of a chat.
1101
1145
  * @param messageId The identifier of the checklist message.
1102
1146
  * @param items The items to add.
1103
- * @method ms
1147
+ * @method cl
1104
1148
  */
1105
1149
  async addToChecklist(chatId, messageId, items) {
1106
1150
  return await this.#dispatch("addToChecklist", chatId, messageId, items);
@@ -1110,7 +1154,7 @@ class ClientDispatcher extends _4_composer_js_1.Composer {
1110
1154
  *
1111
1155
  * @param chatId The identifier of a chat.
1112
1156
  * @param messageId The identifier of the checklist message.
1113
- * @method ms
1157
+ * @method cl
1114
1158
  */
1115
1159
  async updateChecklist(chatId, messageId, params) {
1116
1160
  return await this.#dispatch("updateChecklist", chatId, messageId, params);
@@ -1121,7 +1165,7 @@ class ClientDispatcher extends _4_composer_js_1.Composer {
1121
1165
  * @param chatId The identifier of a chat.
1122
1166
  * @param messageId The identifier of the checklist message.
1123
1167
  * @param items The identifiers of the items to check.
1124
- * @method ms
1168
+ * @method cl
1125
1169
  */
1126
1170
  async checkChecklistItems(chatId, messageId, items) {
1127
1171
  return await this.#dispatch("checkChecklistItems", chatId, messageId, items);
@@ -1132,7 +1176,7 @@ class ClientDispatcher extends _4_composer_js_1.Composer {
1132
1176
  * @param chatId The identifier of a chat.
1133
1177
  * @param messageId The identifier of the checklist message.
1134
1178
  * @param items The identifiers of the items to uncheck.
1135
- * @method ms
1179
+ * @method cl
1136
1180
  */
1137
1181
  async uncheckChecklistItems(chatId, messageId, items) {
1138
1182
  return await this.#dispatch("uncheckChecklistItems", chatId, messageId, items);
@@ -1143,7 +1187,7 @@ class ClientDispatcher extends _4_composer_js_1.Composer {
1143
1187
  * @param chatId The identifier of a chat.
1144
1188
  * @param messageId The identifier of the checklist message.
1145
1189
  * @param item The identifier of the item to check.
1146
- * @method ms
1190
+ * @method cl
1147
1191
  */
1148
1192
  async checkChecklistItem(chatId, messageId, item) {
1149
1193
  return await this.#dispatch("checkChecklistItem", chatId, messageId, item);
@@ -1154,36 +1198,12 @@ class ClientDispatcher extends _4_composer_js_1.Composer {
1154
1198
  * @param chatId The identifier of a chat.
1155
1199
  * @param messageId The identifier of the checklist message.
1156
1200
  * @param item The identifier of the item to uncheck.
1157
- * @method ms
1201
+ * @method cl
1158
1202
  */
1159
1203
  async uncheckChecklistItem(chatId, messageId, item) {
1160
1204
  return await this.#dispatch("uncheckChecklistItem", chatId, messageId, item);
1161
1205
  }
1162
1206
  //
1163
- // ========================= POLLS ========================= //
1164
- //
1165
- /**
1166
- * Cast a vote. User-only.
1167
- *
1168
- * @method pl
1169
- * @param chatId The identifier of the chat that includes the poll.
1170
- * @param messageId The identifier of the message that includes the poll.
1171
- * @param optionIndexes The indexes of the options to cast for.
1172
- */
1173
- async vote(chatId, messageId, optionIndexes) {
1174
- return await this.#dispatch("vote", chatId, messageId, optionIndexes);
1175
- }
1176
- /**
1177
- * Retract a vote. User-only.
1178
- *
1179
- * @method pl
1180
- * @param chatId The identifier of the chat that includes the poll.
1181
- * @param messageId The identifier of the message that includes the poll.
1182
- */
1183
- async retractVote(chatId, messageId) {
1184
- return await this.#dispatch("retractVote", chatId, messageId);
1185
- }
1186
- //
1187
1207
  // ========================= FILES ========================= //
1188
1208
  //
1189
1209
  /**
@@ -2461,5 +2481,15 @@ class ClientDispatcher extends _4_composer_js_1.Composer {
2461
2481
  async getGift(slug) {
2462
2482
  return await this.#dispatch("getGift", slug);
2463
2483
  }
2484
+ /**
2485
+ * Transfer a gift. User-only.
2486
+ *
2487
+ * @method gf
2488
+ * @param chatId The identifier of a chat to transfer the gift to.
2489
+ * @param gift The gift to transfer.
2490
+ */
2491
+ async transferGift(chatId, gift) {
2492
+ return await this.#dispatch("transferGift", chatId, gift);
2493
+ }
2464
2494
  }
2465
2495
  exports.ClientDispatcher = ClientDispatcher;
@@ -0,0 +1,45 @@
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 type { Api } from "../2_tl.js";
21
+ export interface _EmojiStatusBase {
22
+ until?: number;
23
+ }
24
+ /** @unlisted */
25
+ export interface EmojiStatusCustomEmoji extends _EmojiStatusBase {
26
+ type: "customEmoji";
27
+ customEmojiId: string;
28
+ }
29
+ /** @unlisted */
30
+ export interface EmojiStatusGift extends _EmojiStatusBase {
31
+ /** @discriminator */
32
+ type: "gift";
33
+ giftId: string;
34
+ customEmojiId: string;
35
+ title: string;
36
+ slug: string;
37
+ patternId: string;
38
+ centerColor: number;
39
+ edgeColor: number;
40
+ patternColor: number;
41
+ textColor: number;
42
+ }
43
+ export type EmojiStatus = EmojiStatusCustomEmoji | EmojiStatusGift;
44
+ export declare function constructEmojiStatus(emojiStatus: Api.EmojiStatus): EmojiStatus;
45
+ //# sourceMappingURL=0_emoji_status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"0_emoji_status.d.ts","sourceRoot":"","sources":["../../src/types/0_emoji_status.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,gBAAgB;AAChB,MAAM,WAAW,sBAAuB,SAAQ,gBAAgB;IAC9D,IAAI,EAAE,aAAa,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,gBAAgB;AAChB,MAAM,WAAW,eAAgB,SAAQ,gBAAgB;IACvD,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,WAAW,GAAG,sBAAsB,GAAG,eAAe,CAAC;AAEnE,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,GAAG,CAAC,WAAW,GAAG,WAAW,CAY9E"}
@@ -0,0 +1,36 @@
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.constructEmojiStatus = constructEmojiStatus;
23
+ const _0_deps_js_1 = require("../0_deps.js");
24
+ function constructEmojiStatus(emojiStatus) {
25
+ switch (emojiStatus._) {
26
+ case "emojiStatusEmpty":
27
+ (0, _0_deps_js_1.unreachable)();
28
+ break;
29
+ case "emojiStatus":
30
+ return { type: "customEmoji", customEmojiId: String(emojiStatus.document_id), until: emojiStatus.until };
31
+ case "emojiStatusCollectible":
32
+ return { type: "gift", giftId: String(emojiStatus.collectible_id), customEmojiId: String(emojiStatus.document_id), title: emojiStatus.title, slug: emojiStatus.slug, patternId: String(emojiStatus.pattern_document_id), centerColor: emojiStatus.center_color, edgeColor: emojiStatus.edge_color, patternColor: emojiStatus.pattern_color, textColor: emojiStatus.text_color, until: emojiStatus.until };
33
+ case "inputEmojiStatusCollectible":
34
+ (0, _0_deps_js_1.unreachable)();
35
+ }
36
+ }
@@ -0,0 +1,33 @@
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
+ /** @unlisted */
21
+ export interface InputEmojiStatusCustomEmoji {
22
+ /** @discriminator */
23
+ type: "customEmoji";
24
+ customEmojiId: string;
25
+ }
26
+ /** @unlisted */
27
+ export interface InputEmojiStatusGift {
28
+ /** @discriminator */
29
+ type: "gift";
30
+ giftId: number;
31
+ }
32
+ export type InputEmojiStatus = InputEmojiStatusCustomEmoji | InputEmojiStatusGift;
33
+ //# sourceMappingURL=0_input_emoji_status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"0_input_emoji_status.d.ts","sourceRoot":"","sources":["../../src/types/0_input_emoji_status.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,gBAAgB;AAChB,MAAM,WAAW,2BAA2B;IAC1C,qBAAqB;IACrB,IAAI,EAAE,aAAa,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,gBAAgB;AAChB,MAAM,WAAW,oBAAoB;IACnC,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,gBAAgB,GAAG,2BAA2B,GAAG,oBAAoB,CAAC"}
@@ -0,0 +1,64 @@
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 type { Api } from "../2_tl.js";
21
+ /**
22
+ * A user status indicating that the user is currently online.
23
+ * @unlisted
24
+ */
25
+ export interface UserStatusOnline {
26
+ type: "online";
27
+ }
28
+ /**
29
+ * A user status indicating that the user is currently offline.
30
+ * @unlisted
31
+ */
32
+ export interface UserStatusOffline {
33
+ /** @discriminator */
34
+ type: "offline";
35
+ /** A point in time in which the user was last seen online. */
36
+ lastSeenAt: number;
37
+ }
38
+ /**
39
+ * A user status indictating that the user was last seen online recently.
40
+ * @unlisted
41
+ */
42
+ export interface UserStatusLastSeenRecently {
43
+ /** @discriminator */
44
+ type: "lastSeenRecently";
45
+ }
46
+ /**
47
+ * A user status indictating that the user was last seen online around a week ago.
48
+ * @unlisted
49
+ */
50
+ export interface UserStatusLastSeenLastWeek {
51
+ /** @discriminator */
52
+ type: "lastSeenLastWeek";
53
+ }
54
+ /**
55
+ * A user status indictating that the user was last seen online around a month ago.
56
+ * @unlisted
57
+ */
58
+ export interface UserStatusLastSeenLastMonth {
59
+ /** @discriminator */
60
+ type: "lastSeenLastMonth";
61
+ }
62
+ export type UserStatus = UserStatusOnline | UserStatusOffline | UserStatusLastSeenRecently | UserStatusLastSeenLastWeek | UserStatusLastSeenLastMonth;
63
+ export declare function constructUserStatus(userStatus: Api.UserStatus): UserStatus;
64
+ //# sourceMappingURL=0_user_status.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"0_user_status.d.ts","sourceRoot":"","sources":["../../src/types/0_user_status.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEtC;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,qBAAqB;IACrB,IAAI,EAAE,SAAS,CAAC;IAChB,8DAA8D;IAC9D,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IACzC,qBAAqB;IACrB,IAAI,EAAE,kBAAkB,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IACzC,qBAAqB;IACrB,IAAI,EAAE,kBAAkB,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,WAAW,2BAA2B;IAC1C,qBAAqB;IACrB,IAAI,EAAE,mBAAmB,CAAC;CAC3B;AAED,MAAM,MAAM,UAAU,GAAG,gBAAgB,GAAG,iBAAiB,GAAG,0BAA0B,GAAG,0BAA0B,GAAG,2BAA2B,CAAC;AAEtJ,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,GAAG,CAAC,UAAU,GAAG,UAAU,CAe1E"}
@@ -0,0 +1,38 @@
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.constructUserStatus = constructUserStatus;
23
+ function constructUserStatus(userStatus) {
24
+ switch (userStatus._) {
25
+ case "userStatusEmpty":
26
+ return { type: "lastSeenRecently" };
27
+ case "userStatusOnline":
28
+ return { type: "online" };
29
+ case "userStatusOffline":
30
+ return { type: "offline", lastSeenAt: userStatus.was_online };
31
+ case "userStatusRecently":
32
+ return { type: "lastSeenRecently" };
33
+ case "userStatusLastWeek":
34
+ return { type: "lastSeenLastWeek" };
35
+ case "userStatusLastMonth":
36
+ return { type: "lastSeenLastMonth" };
37
+ }
38
+ }
@@ -18,10 +18,10 @@
18
18
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
  */
20
20
  /** A business working hour interval. */
21
- export interface WorkingHourInterval {
21
+ export interface WorkingHoursInterval {
22
22
  /** A point in time in which the working hour starts. */
23
23
  startsAt: number;
24
24
  /** A point in time in which the working hour ends. */
25
25
  endsAt: number;
26
26
  }
27
- //# sourceMappingURL=0_working_hour_interval.d.ts.map
27
+ //# sourceMappingURL=0_working_hours_interval.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"0_working_hours_interval.d.ts","sourceRoot":"","sources":["../../src/types/0_working_hours_interval.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,wCAAwC;AACxC,MAAM,WAAW,oBAAoB;IACnC,wDAAwD;IACxD,QAAQ,EAAE,MAAM,CAAC;IACjB,sDAAsD;IACtD,MAAM,EAAE,MAAM,CAAC;CAChB"}
@@ -0,0 +1,21 @@
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 });
@@ -0,0 +1,30 @@
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 type { BotCommand } from "./0_bot_command.js";
21
+ /** A bot's list of commands. */
22
+ export interface BotCommands {
23
+ /** The identifier of the bot. */
24
+ botId: number;
25
+ /** The identifier of the chat in which the command list is valid. */
26
+ chatId: number;
27
+ /** The list of commands. */
28
+ commands: BotCommand[];
29
+ }
30
+ //# sourceMappingURL=1_bot_commands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1_bot_commands.d.ts","sourceRoot":"","sources":["../../src/types/1_bot_commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,gCAAgC;AAChC,MAAM,WAAW,WAAW;IAC1B,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,qEAAqE;IACrE,MAAM,EAAE,MAAM,CAAC;IACf,4BAA4B;IAC5B,QAAQ,EAAE,UAAU,EAAE,CAAC;CACxB"}
@@ -0,0 +1,21 @@
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 });
@@ -19,7 +19,9 @@
19
19
  */
20
20
  import { Api } from "../2_tl.js";
21
21
  import { type ChatPhoto } from "./0_chat_photo.js";
22
+ import { type EmojiStatus } from "./0_emoji_status.js";
22
23
  import { type RestrictionReason } from "./0_restriction_reason.js";
24
+ import { type UserStatus } from "./0_user_status.js";
23
25
  /** @unlisted */
24
26
  export type ChatType = "private" | "group" | "supergroup" | "channel";
25
27
  /** @unlisted */
@@ -47,6 +49,10 @@ export interface ChatPPrivate extends _ChatPBase {
47
49
  username?: string;
48
50
  /** The user's additional usernames. */
49
51
  also?: string[];
52
+ /** The user's status. */
53
+ status?: UserStatus;
54
+ /** The user's emoji status. */
55
+ emojiStatus?: EmojiStatus;
50
56
  /** The user's [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag). */
51
57
  languageCode?: string;
52
58
  /** Whether the user has been identified as scam. */
@@ -1 +1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GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,aAAa,GAAG,UAAU,CAAC;AAC/E,wBAAgB,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,gBAAgB,GAAG,eAAe,GAAG,YAAY,CAAC;AACzG,wBAAgB,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,KAAK,CAAC;AAiHjE,gBAAgB;AAChB,MAAM,WAAW,UAAU;IACzB,CAAC,IAAI,EAAE,GAAG,CAAC,QAAQ,GAAG,CAAC,YAAY,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IACpD,CAAC,IAAI,EAAE,GAAG,CAAC,QAAQ,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IAClD,CAAC,IAAI,EAAE,GAAG,CAAC,WAAW,GAAG,CAAC,YAAY,GAAG,eAAe,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IACzE,CAAC,IAAI,EAAE,GAAG,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ,GAAG,GAAG,CAAC,WAAW,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;CAC/E;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,IAAI,YAAY,CAE/D"}
@@ -26,7 +26,9 @@ const _1_utilities_js_1 = require("../1_utilities.js");
26
26
  const _2_tl_js_1 = require("../2_tl.js");
27
27
  const _2_telegram_js_1 = require("../tl/2_telegram.js");
28
28
  const _0_chat_photo_js_1 = require("./0_chat_photo.js");
29
+ const _0_emoji_status_js_1 = require("./0_emoji_status.js");
29
30
  const _0_restriction_reason_js_1 = require("./0_restriction_reason.js");
31
+ const _0_user_status_js_1 = require("./0_user_status.js");
30
32
  function constructChatP(chat) {
31
33
  if (_2_tl_js_1.Api.is("user", chat)) {
32
34
  const id = Number(chat.id);
@@ -42,6 +44,8 @@ function constructChatP(chat) {
42
44
  username,
43
45
  languageCode: chat.lang_code,
44
46
  also: usernames?.filter((v) => v !== username),
47
+ status: chat.status ? (0, _0_user_status_js_1.constructUserStatus)(chat.status) : undefined,
48
+ emojiStatus: chat.emoji_status ? (0, _0_emoji_status_js_1.constructEmojiStatus)(chat.emoji_status) : undefined,
45
49
  isScam: chat.scam || false,
46
50
  isFake: chat.fake || false,
47
51
  isPremium: chat.premium || false,
@@ -18,13 +18,13 @@
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
- import type { WorkingHourInterval } from "./0_working_hour_interval.js";
21
+ import type { WorkingHoursInterval } from "./0_working_hours_interval.js";
22
22
  /** The working hours of a business. */
23
23
  export interface WorkingHours {
24
24
  /** The timezone of the working hours. */
25
25
  timezone: string;
26
26
  /** The working hours. */
27
- intervals: WorkingHourInterval[];
27
+ intervals: WorkingHoursInterval[];
28
28
  }
29
29
  export declare function constructWorkingHours(hours: Api.businessWorkHours): WorkingHours;
30
30
  export declare function workingHoursToTlObject(workingHours: WorkingHours): Api.businessWorkHours;
@@ -1 +1 @@
1
- {"version":3,"file":"1_working_hours.d.ts","sourceRoot":"","sources":["../../src/types/1_working_hours.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAExE,uCAAuC;AACvC,MAAM,WAAW,YAAY;IAC3B,yCAAyC;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,yBAAyB;IACzB,SAAS,EAAE,mBAAmB,EAAE,CAAC;CAClC;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,GAAG,CAAC,iBAAiB,GAAG,YAAY,CAKhF;AAED,wBAAgB,sBAAsB,CAAC,YAAY,EAAE,YAAY,GAAG,GAAG,CAAC,iBAAiB,CAMxF"}
1
+ {"version":3,"file":"1_working_hours.d.ts","sourceRoot":"","sources":["../../src/types/1_working_hours.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAE1E,uCAAuC;AACvC,MAAM,WAAW,YAAY;IAC3B,yCAAyC;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,yBAAyB;IACzB,SAAS,EAAE,oBAAoB,EAAE,CAAC;CACnC;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,GAAG,CAAC,iBAAiB,GAAG,YAAY,CAKhF;AAED,wBAAgB,sBAAsB,CAAC,YAAY,EAAE,YAAY,GAAG,GAAG,CAAC,iBAAiB,CAMxF"}
@@ -19,7 +19,9 @@
19
19
  */
20
20
  import { Api } from "../2_tl.js";
21
21
  import { type ChatPhoto } from "./0_chat_photo.js";
22
+ import { type EmojiStatus } from "./0_emoji_status.js";
22
23
  import type { RestrictionReason } from "./0_restriction_reason.js";
24
+ import { type UserStatus } from "./0_user_status.js";
23
25
  import type { ChatPPrivate } from "./1_chat_p.js";
24
26
  /** A user. */
25
27
  export interface User {
@@ -37,6 +39,10 @@ export interface User {
37
39
  username?: string;
38
40
  /** The user's additional usernames. */
39
41
  also?: string[];
42
+ /** The user's status. */
43
+ status?: UserStatus;
44
+ /** The user's emoji status. */
45
+ emojiStatus?: EmojiStatus;
40
46
  /** The user's profile photo. */
41
47
  photo?: ChatPhoto;
42
48
  /** The user's [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag). */
@@ -1 +1 @@
1
- {"version":3,"file":"2_user.d.ts","sourceRoot":"","sources":["../../src/types/2_user.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,K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B,4CAA4C;IAC5C,YAAY,EAAE,OAAO,CAAC;IACtB,mDAAmD;IACnD,iBAAiB,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACxC,gGAAgG;IAChG,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,0DAA0D;IAC1D,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,GAAG,CAAC,IAAI,GAAG,IAAI,CA+BnD;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,CAsBxD"}
@@ -24,10 +24,13 @@ exports.constructUser2 = constructUser2;
24
24
  const _1_utilities_js_1 = require("../1_utilities.js");
25
25
  const _2_tl_js_1 = require("../2_tl.js");
26
26
  const _0_chat_photo_js_1 = require("./0_chat_photo.js");
27
+ const _0_emoji_status_js_1 = require("./0_emoji_status.js");
28
+ const _0_user_status_js_1 = require("./0_user_status.js");
27
29
  function constructUser(user_) {
28
30
  const id = Number(user_.id);
29
31
  const usernames = user_.usernames?.map((v) => v.username);
30
32
  const username = user_.username ?? usernames?.shift();
33
+ user_.emoji_status;
31
34
  const user = {
32
35
  id,
33
36
  color: _2_tl_js_1.Api.is("peerColor", user_.color) && user_.color.color !== undefined ? user_.color.color : (0, _1_utilities_js_1.getColorFromPeerId)(id),
@@ -36,6 +39,8 @@ function constructUser(user_) {
36
39
  lastName: user_.last_name,
37
40
  username: username,
38
41
  also: usernames?.filter((v) => v !== username),
42
+ status: user_.status ? (0, _0_user_status_js_1.constructUserStatus)(user_.status) : undefined,
43
+ emojiStatus: user_.emoji_status ? (0, _0_emoji_status_js_1.constructEmojiStatus)(user_.emoji_status) : undefined,
39
44
  languageCode: user_.lang_code,
40
45
  isScam: user_.scam || false,
41
46
  isFake: user_.fake || false,