@mtkruto/node 0.145.0 → 0.146.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 (150) hide show
  1. package/esm/3_types.d.ts +2 -0
  2. package/esm/3_types.d.ts.map +1 -1
  3. package/esm/3_types.js +2 -0
  4. package/esm/client/1_client_generic.d.ts +36 -1
  5. package/esm/client/1_client_generic.d.ts.map +1 -1
  6. package/esm/client/2_bot_info_manager.d.ts.map +1 -1
  7. package/esm/client/2_bot_info_manager.js +1 -2
  8. package/esm/client/2_update_manager.d.ts.map +1 -1
  9. package/esm/client/2_update_manager.js +22 -23
  10. package/esm/client/3_account_manager.d.ts +3 -0
  11. package/esm/client/3_account_manager.d.ts.map +1 -1
  12. package/esm/client/3_account_manager.js +14 -1
  13. package/esm/client/3_message_manager.d.ts +3 -1
  14. package/esm/client/3_message_manager.d.ts.map +1 -1
  15. package/esm/client/3_message_manager.js +14 -0
  16. package/esm/client/3_video_chat_manager.d.ts.map +1 -1
  17. package/esm/client/3_video_chat_manager.js +1 -2
  18. package/esm/client/6_client.d.ts +36 -1
  19. package/esm/client/6_client.d.ts.map +1 -1
  20. package/esm/client/6_client.js +47 -3
  21. package/esm/client/6_client_dispatcher.d.ts +36 -1
  22. package/esm/client/6_client_dispatcher.d.ts.map +1 -1
  23. package/esm/client/6_client_dispatcher.js +45 -0
  24. package/esm/deps/jsr.io/@std/assert/1.0.19/equals.js +4 -4
  25. package/esm/deps/jsr.io/@std/internal/1.0.14/_os.d.ts.map +1 -0
  26. package/esm/deps/jsr.io/@std/internal/1.0.14/_os.js +14 -0
  27. package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/build_message.d.ts.map +1 -1
  28. package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/diff.d.ts.map +1 -1
  29. package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/diff.js +4 -3
  30. package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/diff_str.d.ts.map +1 -1
  31. package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/diff_str.js +8 -9
  32. package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/format.d.ts.map +1 -1
  33. package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/os.d.ts.map +1 -1
  34. package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/styles.d.ts.map +1 -1
  35. package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/types.d.ts.map +1 -1
  36. package/esm/deps/jsr.io/@std/path/1.1.4/basename.js +1 -1
  37. package/esm/deps/jsr.io/@std/path/1.1.4/extname.js +1 -1
  38. package/esm/deps/jsr.io/@std/path/1.1.4/is_absolute.js +1 -1
  39. package/esm/deps/jsr.io/@std/path/1.1.4/join.js +1 -1
  40. package/esm/deps/jsr.io/@std/path/1.1.4/to_file_url.js +1 -1
  41. package/esm/types/0_authorization_session.d.ts +43 -0
  42. package/esm/types/0_authorization_session.d.ts.map +1 -0
  43. package/esm/types/0_authorization_session.js +41 -0
  44. package/esm/types/0_message_counters.d.ts +29 -0
  45. package/esm/types/0_message_counters.d.ts.map +1 -0
  46. package/esm/types/0_message_counters.js +20 -0
  47. package/esm/types/1_chat_action.d.ts +1 -1
  48. package/esm/types/1_chat_action.d.ts.map +1 -1
  49. package/esm/types/1_chat_action.js +3 -3
  50. package/esm/types/1_chat_p.d.ts.map +1 -1
  51. package/esm/types/1_chat_p.js +2 -3
  52. package/esm/types/2_story_interactive_area.d.ts.map +1 -1
  53. package/esm/types/2_story_interactive_area.js +1 -2
  54. package/esm/types/3_bot_access_settings.d.ts +2 -2
  55. package/esm/types/3_bot_access_settings.d.ts.map +1 -1
  56. package/esm/types/3_message_draft.d.ts.map +1 -1
  57. package/esm/types/3_message_draft.js +1 -2
  58. package/esm/types/7_saved_chat.d.ts +2 -3
  59. package/esm/types/7_saved_chat.d.ts.map +1 -1
  60. package/esm/types/7_saved_chat.js +3 -3
  61. package/package.json +1 -1
  62. package/script/3_types.d.ts +2 -0
  63. package/script/3_types.d.ts.map +1 -1
  64. package/script/3_types.js +2 -0
  65. package/script/client/1_client_generic.d.ts +36 -1
  66. package/script/client/1_client_generic.d.ts.map +1 -1
  67. package/script/client/2_bot_info_manager.d.ts.map +1 -1
  68. package/script/client/2_bot_info_manager.js +1 -2
  69. package/script/client/2_update_manager.d.ts.map +1 -1
  70. package/script/client/2_update_manager.js +22 -23
  71. package/script/client/3_account_manager.d.ts +3 -0
  72. package/script/client/3_account_manager.d.ts.map +1 -1
  73. package/script/client/3_account_manager.js +13 -0
  74. package/script/client/3_message_manager.d.ts +3 -1
  75. package/script/client/3_message_manager.d.ts.map +1 -1
  76. package/script/client/3_message_manager.js +14 -0
  77. package/script/client/3_video_chat_manager.d.ts.map +1 -1
  78. package/script/client/3_video_chat_manager.js +1 -2
  79. package/script/client/6_client.d.ts +36 -1
  80. package/script/client/6_client.d.ts.map +1 -1
  81. package/script/client/6_client.js +47 -3
  82. package/script/client/6_client_dispatcher.d.ts +36 -1
  83. package/script/client/6_client_dispatcher.d.ts.map +1 -1
  84. package/script/client/6_client_dispatcher.js +45 -0
  85. package/script/deps/jsr.io/@std/assert/1.0.19/equals.js +4 -4
  86. package/script/deps/jsr.io/@std/internal/1.0.14/_os.d.ts.map +1 -0
  87. package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/_os.js +7 -5
  88. package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/build_message.d.ts.map +1 -1
  89. package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/diff.d.ts.map +1 -1
  90. package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/diff.js +4 -3
  91. package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/diff_str.d.ts.map +1 -1
  92. package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/diff_str.js +8 -9
  93. package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/format.d.ts.map +1 -1
  94. package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/os.d.ts.map +1 -1
  95. package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/styles.d.ts.map +1 -1
  96. package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/types.d.ts.map +1 -1
  97. package/script/deps/jsr.io/@std/path/1.1.4/basename.js +1 -1
  98. package/script/deps/jsr.io/@std/path/1.1.4/extname.js +1 -1
  99. package/script/deps/jsr.io/@std/path/1.1.4/is_absolute.js +1 -1
  100. package/script/deps/jsr.io/@std/path/1.1.4/join.js +1 -1
  101. package/script/deps/jsr.io/@std/path/1.1.4/to_file_url.js +1 -1
  102. package/script/types/0_authorization_session.d.ts +43 -0
  103. package/script/types/0_authorization_session.d.ts.map +1 -0
  104. package/script/types/0_authorization_session.js +44 -0
  105. package/script/types/0_message_counters.d.ts +29 -0
  106. package/script/types/0_message_counters.d.ts.map +1 -0
  107. package/script/types/0_message_counters.js +21 -0
  108. package/script/types/1_chat_action.d.ts +1 -1
  109. package/script/types/1_chat_action.d.ts.map +1 -1
  110. package/script/types/1_chat_action.js +3 -3
  111. package/script/types/1_chat_p.d.ts.map +1 -1
  112. package/script/types/1_chat_p.js +2 -3
  113. package/script/types/2_story_interactive_area.d.ts.map +1 -1
  114. package/script/types/2_story_interactive_area.js +1 -2
  115. package/script/types/3_bot_access_settings.d.ts +2 -2
  116. package/script/types/3_bot_access_settings.d.ts.map +1 -1
  117. package/script/types/3_message_draft.d.ts.map +1 -1
  118. package/script/types/3_message_draft.js +1 -2
  119. package/script/types/7_saved_chat.d.ts +2 -3
  120. package/script/types/7_saved_chat.d.ts.map +1 -1
  121. package/script/types/7_saved_chat.js +3 -3
  122. package/esm/deps/jsr.io/@std/internal/1.0.13/_os.d.ts.map +0 -1
  123. package/esm/deps/jsr.io/@std/internal/1.0.13/_os.js +0 -12
  124. package/script/deps/jsr.io/@std/internal/1.0.13/_os.d.ts.map +0 -1
  125. /package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/_os.d.ts +0 -0
  126. /package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/build_message.d.ts +0 -0
  127. /package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/build_message.js +0 -0
  128. /package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/diff.d.ts +0 -0
  129. /package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/diff_str.d.ts +0 -0
  130. /package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/format.d.ts +0 -0
  131. /package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/format.js +0 -0
  132. /package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/os.d.ts +0 -0
  133. /package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/os.js +0 -0
  134. /package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/styles.d.ts +0 -0
  135. /package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/styles.js +0 -0
  136. /package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/types.d.ts +0 -0
  137. /package/esm/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/types.js +0 -0
  138. /package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/_os.d.ts +0 -0
  139. /package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/build_message.d.ts +0 -0
  140. /package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/build_message.js +0 -0
  141. /package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/diff.d.ts +0 -0
  142. /package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/diff_str.d.ts +0 -0
  143. /package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/format.d.ts +0 -0
  144. /package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/format.js +0 -0
  145. /package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/os.d.ts +0 -0
  146. /package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/os.js +0 -0
  147. /package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/styles.d.ts +0 -0
  148. /package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/styles.js +0 -0
  149. /package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/types.d.ts +0 -0
  150. /package/script/deps/jsr.io/@std/internal/{1.0.13 → 1.0.14}/types.js +0 -0
@@ -648,6 +648,31 @@ export class ClientDispatcher extends Composer {
648
648
  async deleteAccount(reason, params) {
649
649
  return await this.#dispatch("deleteAccount", reason, params);
650
650
  }
651
+ /**
652
+ * Get the authorization sessions. User-only.
653
+ *
654
+ * @method ac
655
+ */
656
+ async getAuthorizationSessions() {
657
+ return await this.#dispatch("getAuthorizationSessions");
658
+ }
659
+ /**
660
+ * Remove an authorization session. User-only.
661
+ *
662
+ * @method ac
663
+ * @param id The identifier of the authorization session to remove.
664
+ */
665
+ async removeAuthorizationSession(id) {
666
+ return await this.#dispatch("removeAuthorizationSession", id);
667
+ }
668
+ /**
669
+ * Remove all authorization sessions except for the current one. User-only.
670
+ *
671
+ * @method ac
672
+ */
673
+ async removeAuthorizationSessions() {
674
+ return await this.#dispatch("removeAuthorizationSessions");
675
+ }
651
676
  //
652
677
  // ========================= MESSAGES ========================= //
653
678
  //
@@ -1353,6 +1378,26 @@ export class ClientDispatcher extends Composer {
1353
1378
  async translateMessage(toLanguage, chatId, messageId, params) {
1354
1379
  return await this.#dispatch("translateMessage", toLanguage, chatId, messageId, params);
1355
1380
  }
1381
+ /**
1382
+ * Get the counters of multiple messages. User-only.
1383
+ *
1384
+ * @method ms
1385
+ * @param chatId The identifier of the chat including the messages.
1386
+ * @param messageIds The identifiers of the messages.
1387
+ */
1388
+ async getMessagesCounters(chatId, messageIds) {
1389
+ return await this.#dispatch("getMessagesCounters", chatId, messageIds);
1390
+ }
1391
+ /**
1392
+ * Get the counters of a single message. User-only.
1393
+ *
1394
+ * @method ms
1395
+ * @param chatId The identifier of the chat including the message.
1396
+ * @param messageId The identifier of the message.
1397
+ */
1398
+ async getMessageCounters(chatId, messageId) {
1399
+ return await this.#dispatch("getMessageCounters", chatId, messageId);
1400
+ }
1356
1401
  //
1357
1402
  // ========================= POLLS ========================= //
1358
1403
  //
@@ -1,10 +1,10 @@
1
1
  // Copyright 2018-2026 the Deno authors. MIT license.
2
2
  // This module is browser compatible.
3
3
  import { equal } from "./equal.js";
4
- import { buildMessage } from "../../internal/1.0.13/build_message.js";
5
- import { diff } from "../../internal/1.0.13/diff.js";
6
- import { diffStr } from "../../internal/1.0.13/diff_str.js";
7
- import { format } from "../../internal/1.0.13/format.js";
4
+ import { buildMessage } from "../../internal/1.0.14/build_message.js";
5
+ import { diff } from "../../internal/1.0.14/diff.js";
6
+ import { diffStr } from "../../internal/1.0.14/diff_str.js";
7
+ import { format } from "../../internal/1.0.14/format.js";
8
8
  import { AssertionError } from "./assertion_error.js";
9
9
  /**
10
10
  * Make an assertion that `actual` and `expected` are equal, deeply. If not
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_os.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.14/_os.ts"],"names":[],"mappings":"AAIA,wBAAgB,YAAY,IAAI,OAAO,CAUtC"}
@@ -0,0 +1,14 @@
1
+ // Copyright 2018-2026 the Deno authors. MIT license.
2
+ import * as dntShim from "../../../../../_dnt.shims.js";
3
+ export function checkWindows() {
4
+ // deno-lint-ignore no-explicit-any
5
+ const global = dntShim.dntGlobalThis;
6
+ // Check Node/Bun/Deno via `process.platform`, then the Deno global, then the browser
7
+ const platform = global.process?.platform;
8
+ if (typeof platform === "string")
9
+ return platform.startsWith("win");
10
+ const os = global.Deno?.build?.os;
11
+ if (typeof os === "string")
12
+ return os === "windows";
13
+ return global.navigator?.platform?.startsWith("Win") ?? false;
14
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"build_message.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.13/build_message.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEvD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,WAAW,CACzB,QAAQ,EAAE,QAAQ;AAClB;;;GAGG;AACH,UAAU,UAAQ,GACjB,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAWvB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CASrD;AAED,4CAA4C;AAC5C,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,YAAY,CAC1B,UAAU,EAAE,aAAa,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,EAC7C,OAAO,GAAE,mBAAwB,EACjC,YAAY,CAAC,EAAE,CACb,UAAU,EAAE,aAAa,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,EAC7C,UAAU,EAAE,OAAO,EACnB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,KAC1B,aAAa,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,GACrC,MAAM,EAAE,CA8BV"}
1
+ {"version":3,"file":"build_message.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.14/build_message.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEvD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,WAAW,CACzB,QAAQ,EAAE,QAAQ;AAClB;;;GAGG;AACH,UAAU,UAAQ,GACj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BAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,KAAK,IAAI,aAAa,CAWvE;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,SAAS,CAAC,CAAC,EACzB,CAAC,EAAE,CAAC,EAAE,EACN,CAAC,EAAE,CAAC,EAAE,EACN,OAAO,EAAE,aAAa,EACtB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,WAAW,EACnB,kBAAkB,EAAE,MAAM,GACzB,KAAK,CAAC;IACP,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,CAAC,CAAC;CACV,CAAC,CAiCD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,QAAQ,CACtB,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,MAAM,EAAE,WAAW,EACnB,kBAAkB,EAAE,MAAM,EAC1B,GAAG,EAAE,MAAM,EACX,KAAK,CAAC,EAAE,aAAa,EACrB,IAAI,CAAC,EAAE,aAAa,GACnB,aAAa,CAsBf;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,UAAU,CAAC,CAAC,CAAC,EAAE,CAwEvD"}
@@ -105,27 +105,28 @@ export function backTrace(A, B, current, swapped, routes, diffTypesPtrOffset) {
105
105
  break;
106
106
  const prev = j;
107
107
  if (type === REMOVED) {
108
- result.unshift({
108
+ result.push({
109
109
  type: swapped ? "removed" : "added",
110
110
  value: B[b],
111
111
  });
112
112
  b -= 1;
113
113
  }
114
114
  else if (type === ADDED) {
115
- result.unshift({
115
+ result.push({
116
116
  type: swapped ? "added" : "removed",
117
117
  value: A[a],
118
118
  });
119
119
  a -= 1;
120
120
  }
121
121
  else {
122
- result.unshift({ type: "common", value: A[a] });
122
+ result.push({ type: "common", value: A[a] });
123
123
  a -= 1;
124
124
  b -= 1;
125
125
  }
126
126
  j = routes[prev];
127
127
  type = routes[prev + diffTypesPtrOffset];
128
128
  }
129
+ result.reverse();
129
130
  return result;
130
131
  }
131
132
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"diff_str.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.13/diff_str.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAqB,UAAU,EAAE,MAAM,YAAY,CAAC;AAGhE;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAY/C;AAKD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,UAAQ,GAAG,MAAM,EAAE,CAiBnE;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,EACxB,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC,EAAE,GAC3B,UAAU,CAAC,MAAM,CAAC,EAAE,CAetB;AAID;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,EAAE,CAkDlE"}
1
+ {"version":3,"file":"diff_str.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.14/diff_str.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAqB,UAAU,EAAE,MAAM,YAAY,CAAC;AAGhE;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAY/C;AAKD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,UAAQ,GAAG,MAAM,EAAE,CAiBnE;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,EACxB,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC,EAAE,GAC3B,UAAU,CAAC,MAAM,CAAC,EAAE,CAetB;AAID;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,EAAE,CAkDlE"}
@@ -155,19 +155,18 @@ export function diffStr(A, B) {
155
155
  const hasMoreRemovedLines = added.length < removed.length;
156
156
  const aLines = hasMoreRemovedLines ? added : removed;
157
157
  const bLines = hasMoreRemovedLines ? removed : added;
158
+ let bIdx = 0;
158
159
  for (const a of aLines) {
159
160
  let tokens = [];
160
161
  let b;
162
+ const aTokens = tokenize(a.value, true);
161
163
  // Search another diff line with at least one common token
162
- while (bLines.length) {
163
- b = bLines.shift();
164
- const tokenized = [
165
- tokenize(a.value, true),
166
- tokenize(b.value, true),
167
- ];
168
- if (hasMoreRemovedLines)
169
- tokenized.reverse();
170
- tokens = diff(tokenized[0], tokenized[1]);
164
+ while (bIdx < bLines.length) {
165
+ b = bLines[bIdx++];
166
+ const bTokens = tokenize(b.value, true);
167
+ tokens = hasMoreRemovedLines
168
+ ? diff(bTokens, aTokens)
169
+ : diff(aTokens, bTokens);
171
170
  if (tokens.some(({ type, value }) => type === "common" && NON_WHITESPACE_REGEXP.test(value))) {
172
171
  break;
173
172
  }
@@ -1 +1 @@
1
- {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.13/format.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,SAAS,GAAG,CACtB,CAAC,EAAE,OAAO,EACV,OAAO,EAAE;IACP,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,EAAE,OAAO,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,iBAAiB,EAAE,MAAM,CAAC;CAC3B,KACE,MAAM,CAAC;AAEZ;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,CAmBzC"}
1
+ {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.14/format.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,SAAS,GAAG,CACtB,CAAC,EAAE,OAAO,EACV,OAAO,EAAE;IACP,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,EAAE,OAAO,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,iBAAiB,EAAE,MAAM,CAAC;CAC3B,KACE,MAAM,CAAC;AAEZ;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,CAmBzC"}
@@ -1 +1 @@
1
- {"version":3,"file":"os.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.13/os.ts"],"names":[],"mappings":"AAKA,8CAA8C;AAC9C,eAAO,MAAM,SAAS,EAAE,OAAwB,CAAC"}
1
+ {"version":3,"file":"os.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.14/os.ts"],"names":[],"mappings":"AAKA,8CAA8C;AAC9C,eAAO,MAAM,SAAS,EAAE,OAAwB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.13/styles.ts"],"names":[],"mappings":"AAqCA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAExC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEvC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEzC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE1C;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEzC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAExC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEzC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE3C;AAWD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEpD"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.14/styles.ts"],"names":[],"mappings":"AAqCA;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAExC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEvC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,KAAK,CAAC,GAA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AK,EAAE,CAAC,CAAC;IACT,OAAO,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;CAC3B,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/deps/jsr.io/@std/internal/1.0.14/types.ts"],"names":[],"mappings":"AAGA,kDAAkD;AAClD,MAAM,MAAM,QAAQ,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnD;;;GAGG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI,iBAAiB,CAAC,CAAC,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC;AAEvE;;;GAGG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI;IAChC,IAAI,EAAE,QAAQ,GAAG,YAAY,CAAC;IAC9B,KAAK,EAAE,CAAC,CAAC;CACV,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,iBAAiB,CAAC,CAAC,IAAI;IACjC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC;IAC1B,KAAK,EAAE,CAAC,CAAC;IACT,OAAO,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;CAC3B,CAAC"}
@@ -1,6 +1,6 @@
1
1
  // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  // This module is browser compatible.
3
- import { isWindows } from "../../internal/1.0.13/os.js";
3
+ import { isWindows } from "../../internal/1.0.14/os.js";
4
4
  import { basename as posixBasename } from "./posix/basename.js";
5
5
  import { basename as windowsBasename } from "./windows/basename.js";
6
6
  /**
@@ -1,6 +1,6 @@
1
1
  // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  // This module is browser compatible.
3
- import { isWindows } from "../../internal/1.0.13/os.js";
3
+ import { isWindows } from "../../internal/1.0.14/os.js";
4
4
  import { extname as posixExtname } from "./posix/extname.js";
5
5
  import { extname as windowsExtname } from "./windows/extname.js";
6
6
  /**
@@ -1,6 +1,6 @@
1
1
  // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  // This module is browser compatible.
3
- import { isWindows } from "../../internal/1.0.13/os.js";
3
+ import { isWindows } from "../../internal/1.0.14/os.js";
4
4
  import { isAbsolute as posixIsAbsolute } from "./posix/is_absolute.js";
5
5
  import { isAbsolute as windowsIsAbsolute } from "./windows/is_absolute.js";
6
6
  /**
@@ -1,6 +1,6 @@
1
1
  // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  // This module is browser compatible.
3
- import { isWindows } from "../../internal/1.0.13/os.js";
3
+ import { isWindows } from "../../internal/1.0.14/os.js";
4
4
  import { join as posixJoin } from "./posix/join.js";
5
5
  import { join as windowsJoin } from "./windows/join.js";
6
6
  /**
@@ -1,6 +1,6 @@
1
1
  // Copyright 2018-2025 the Deno authors. MIT license.
2
2
  // This module is browser compatible.
3
- import { isWindows } from "../../internal/1.0.13/os.js";
3
+ import { isWindows } from "../../internal/1.0.14/os.js";
4
4
  import { toFileUrl as posixToFileUrl } from "./posix/to_file_url.js";
5
5
  import { toFileUrl as windowsToFileUrl } from "./windows/to_file_url.js";
6
6
  /**
@@ -0,0 +1,43 @@
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
+ /** An authorization session. */
22
+ export interface AuthorizationSession {
23
+ id: string;
24
+ date: number;
25
+ lastActivity: number;
26
+ isCurrent: boolean;
27
+ isOfficialApp: boolean;
28
+ isPasswordPending: boolean;
29
+ isEncryptedRequestsDisabled: boolean;
30
+ isCallRequestsDisabled: boolean;
31
+ isUnconfirmed: boolean;
32
+ deviceModel: string;
33
+ platform: string;
34
+ systemVersion: string;
35
+ apiId: number;
36
+ appName: string;
37
+ appVersion: string;
38
+ ipAddress: string;
39
+ country: string;
40
+ region: string;
41
+ }
42
+ export declare function constructAuthorizationSession(authorization: Api.Authorization): AuthorizationSession;
43
+ //# sourceMappingURL=0_authorization_session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"0_authorization_session.d.ts","sourceRoot":"","sources":["../../src/types/0_authorization_session.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEtC,gCAAgC;AAChC,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;IACvB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,2BAA2B,EAAE,OAAO,CAAC;IACrC,sBAAsB,EAAE,OAAO,CAAC;IAChC,aAAa,EAAE,OAAO,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,6BAA6B,CAAC,aAAa,EAAE,GAAG,CAAC,aAAa,GAAG,oBAAoB,CAqBpG"}
@@ -0,0 +1,41 @@
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
+ export function constructAuthorizationSession(authorization) {
21
+ return {
22
+ id: String(authorization.hash),
23
+ date: authorization.date_created,
24
+ lastActivity: authorization.date_active,
25
+ isCurrent: authorization.current || false,
26
+ isOfficialApp: authorization.official_app || false,
27
+ isPasswordPending: authorization.password_pending || false,
28
+ isEncryptedRequestsDisabled: authorization.encrypted_requests_disabled || false,
29
+ isCallRequestsDisabled: authorization.call_requests_disabled || false,
30
+ isUnconfirmed: authorization.unconfirmed || false,
31
+ deviceModel: authorization.device_model,
32
+ platform: authorization.platform,
33
+ systemVersion: authorization.system_version,
34
+ apiId: authorization.api_id,
35
+ appName: authorization.app_name,
36
+ appVersion: authorization.app_version,
37
+ ipAddress: authorization.ip,
38
+ country: authorization.country,
39
+ region: authorization.region,
40
+ };
41
+ }
@@ -0,0 +1,29 @@
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
+ /** The counters of a message. */
21
+ export interface MessageCounters {
22
+ /** The number of times the message was viewed. */
23
+ views: number;
24
+ /** The number of replies made to the messages. */
25
+ replies: number;
26
+ /** The number of times the message was forwarded. */
27
+ forwards: number;
28
+ }
29
+ //# sourceMappingURL=0_message_counters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"0_message_counters.d.ts","sourceRoot":"","sources":["../../src/types/0_message_counters.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,iCAAiC;AACjC,MAAM,WAAW,eAAe;IAC9B,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,OAAO,EAAE,MAAM,CAAC;IAChB,qDAAqD;IACrD,QAAQ,EAAE,MAAM,CAAC;CAClB"}
@@ -0,0 +1,20 @@
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
+ export {};
@@ -17,7 +17,7 @@
17
17
  * You should have received a copy of the GNU Lesser General Public License
18
18
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
  */
20
- import type { Api } from "../2_tl.js";
20
+ import { Api } from "../2_tl.js";
21
21
  import { type ChatActionType } from "./0_chat_action_type.js";
22
22
  /** A sign of a possible action by a member of a conversation. */
23
23
  export interface ChatAction {
@@ -1 +1 @@
1
- {"version":3,"file":"1_chat_action.d.ts","sourceRoot":"","sources":["../../src/types/1_chat_action.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,KAAK,cAAc,EAA2B,MAAM,yBAAyB,CAAC;AAEvF,iEAAiE;AACjE,MAAM,WAAW,UAAU;IACzB,8BAA8B;IAC9B,IAAI,EAAE,cAAc,CAAC;IACrB,4DAA4D;IAC5D,MAAM,EAAE,MAAM,CAAC;IACf,kDAAkD;IAClD,MAAM,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,GAAG,CAAC,gBAAgB,GAAG,GAAG,CAAC,oBAAoB,GAAG,GAAG,CAAC,uBAAuB,GAAG,UAAU,GAAG,IAAI,CAY5I"}
1
+ {"version":3,"file":"1_chat_action.d.ts","sourceRoot":"","sources":["../../src/types/1_chat_action.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,KAAK,cAAc,EAA2B,MAAM,yBAAyB,CAAC;AAEvF,iEAAiE;AACjE,MAAM,WAAW,UAAU;IACzB,8BAA8B;IAC9B,IAAI,EAAE,cAAc,CAAC;IACrB,4DAA4D;IAC5D,MAAM,EAAE,MAAM,CAAC;IACf,kDAAkD;IAClD,MAAM,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,GAAG,CAAC,gBAAgB,GAAG,GAAG,CAAC,oBAAoB,GAAG,GAAG,CAAC,uBAAuB,GAAG,UAAU,GAAG,IAAI,CAY5I"}
@@ -18,15 +18,15 @@
18
18
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
  */
20
20
  import { cleanObject } from "../1_utilities.js";
21
- import { peerToChatId } from "../tl/2_telegram.js";
21
+ import { Api } from "../2_tl.js";
22
22
  import { constructChatActionType } from "./0_chat_action_type.js";
23
23
  export function constructChatAction(update) {
24
24
  const type = constructChatActionType(update.action);
25
25
  if (type === null) {
26
26
  return null;
27
27
  }
28
- const chatId = peerToChatId(update);
29
- const fromId = peerToChatId("user_id" in update ? { _: "peerUser", user_id: update.user_id } : update.from_id);
28
+ const chatId = Api.peerToChatId(update);
29
+ const fromId = Api.peerToChatId("user_id" in update ? { _: "peerUser", user_id: update.user_id } : update.from_id);
30
30
  const messageThreadId = "top_msg_id" in update ? update.top_msg_id : undefined;
31
31
  return cleanObject({ type, chatId, fromId, messageThreadId });
32
32
  }
@@ -1 +1 @@
1
- {"version":3,"file":"1_chat_p.d.ts","sourceRoot":"","sources":["../../src/types/1_chat_p.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,EAAE,KAAK,SAAS,EAAsB,MAAM,mBAAmB,CAAC;AACvE,OAAO,EAAwB,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EAA8B,KAAK,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC/F,OAAO,EAAuB,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAE1E,gBAAgB;AAChB,MAAM,MAAM,QAAQ,GAChB,SAAS,GACT,OAAO,GAC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IAAI,YAAY,CAE/D"}
@@ -20,7 +20,6 @@
20
20
  import { unreachable } from "../0_deps.js";
21
21
  import { cleanObject, getColorFromPeerId, ZERO_CHANNEL_ID } from "../1_utilities.js";
22
22
  import { Api } from "../2_tl.js";
23
- import { peerToChatId } from "../tl/2_telegram.js";
24
23
  import { constructChatPhoto } from "./0_chat_photo.js";
25
24
  import { constructEmojiStatus } from "./0_emoji_status.js";
26
25
  import { constructRestrictionReason } from "./0_restriction_reason.js";
@@ -65,7 +64,7 @@ export function constructChatP(chat) {
65
64
  return cleanObject(chat_);
66
65
  }
67
66
  else if (Api.is("chat", chat) || Api.is("chatForbidden", chat)) {
68
- const id = peerToChatId(chat);
67
+ const id = Api.peerToChatId(chat);
69
68
  const chat_ = {
70
69
  id,
71
70
  type: "group",
@@ -83,7 +82,7 @@ export function constructChatP(chat) {
83
82
  }
84
83
  else if (Api.is("channel", chat) || Api.is("channelForbidden", chat)) {
85
84
  let chat_;
86
- const id = peerToChatId(chat);
85
+ const id = Api.peerToChatId(chat);
87
86
  if (Api.is("channelForbidden", chat)) {
88
87
  const { title } = chat;
89
88
  if (chat.megagroup) {
@@ -1 +1 @@
1
- {"version":3,"file":"2_story_interactive_area.d.ts","sourceRoot":"","sources":["../../src/types/2_story_interactive_area.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,EAAqB,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAqB,KAAK,QAAQ,EAAsB,MAAM,iBAAiB,CAAC;AACvF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAkB,KAAK,KAAK,EAAE,MAAM,cAAc,CAAC;AAE1D,gBAAgB;AAChB,MAAM,WAAW,4BAA4B;IAC3C,WAA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@@ -19,7 +19,6 @@
19
19
  */
20
20
  import { unreachable } from "../0_deps.js";
21
21
  import { Api } from "../2_tl.js";
22
- import { chatIdToPeerId } from "../tl/2_telegram.js";
23
22
  import { constructLocation } from "./0_location.js";
24
23
  import { constructReaction, reactionToTlObject } from "./0_reaction.js";
25
24
  import { constructVenue } from "./1_venue.js";
@@ -125,7 +124,7 @@ export function storyInteractiveAreaToTlObject(area, getPeer) {
125
124
  if (!peer || peer[0].type !== "channel") {
126
125
  unreachable();
127
126
  }
128
- const channel = { _: "inputChannel", channel_id: chatIdToPeerId(peer[0].id), access_hash: peer[1] };
127
+ const channel = { _: "inputChannel", channel_id: Api.chatIdToPeerId(peer[0].id), access_hash: peer[1] };
129
128
  return { _: "inputMediaAreaChannelPost", coordinates, channel, msg_id: area.messageReference.messageId };
130
129
  }
131
130
  case "link":
@@ -17,11 +17,11 @@
17
17
  * You should have received a copy of the GNU Lesser General Public License
18
18
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
  */
20
- import type { bots_accessSettings } from "../tl/1_telegram_api.js";
20
+ import { Api } from "../2_tl.js";
21
21
  import { type User } from "./2_user.js";
22
22
  export interface BotAccessSettings {
23
23
  isAccessRestricted: boolean;
24
24
  usersWithAccess: User[];
25
25
  }
26
- export declare function constructBotAccessSettings(accessSettings: bots_accessSettings): BotAccessSettings;
26
+ export declare function constructBotAccessSettings(accessSettings: Api.bots_accessSettings): BotAccessSettings;
27
27
  //# sourceMappingURL=3_bot_access_settings.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"3_bot_access_settings.d.ts","sourceRoot":"","sources":["../../src/types/3_bot_access_settings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAiB,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AAEvD,MAAM,WAAW,iBAAiB;IAChC,kBAAkB,EAAE,OAAO,CAAC;IAC5B,eAAe,EAAE,IAAI,EAAE,CAAC;CACzB;AAED,wBAAgB,0BAA0B,CAAC,cAAc,EAAE,mBAAmB,GAAG,iBAAiB,CAKjG"}
1
+ {"version":3,"file":"3_bot_access_settings.d.ts","sourceRoot":"","sources":["../../src/types/3_bot_access_settings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAiB,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AAEvD,MAAM,WAAW,iBAAiB;IAChC,kBAAkB,EAAE,OAAO,CAAC;IAC5B,eAAe,EAAE,IAAI,EAAE,CAAC;CACzB;AAED,wBAAgB,0BAA0B,CAAC,cAAc,EAAE,GAAG,CAAC,mBAAmB,GAAG,iBAAiB,CAKrG"}
@@ -1 +1 @@
1
- {"version":3,"file":"3_message_draft.d.ts","sourceRoot":"","sources":["../../src/types/3_message_draft.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,EAA0B,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEnF,uBAAuB;AACvB,MAAM,WAAW,YAAY;IAC3B,2BAA2B;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,8DAA8D;IAC9D,MAAM,EAAE,MAAM,CAAC;IACf,wBAAwB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,iCAAiC;IACjC,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,2DAA2D;IAC3D,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,GAAG,CAAC,gBAAgB,GAAG,YAAY,GAAG,IAAI,CAmBvF"}
1
+ {"version":3,"file":"3_message_draft.d.ts","sourceRoot":"","sources":["../../src/types/3_message_draft.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAA0B,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEnF,uBAAuB;AACvB,MAAM,WAAW,YAAY;IAC3B,2BAA2B;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,8DAA8D;IAC9D,MAAM,EAAE,MAAM,CAAC;IACf,wBAAwB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,iCAAiC;IACjC,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,2DAA2D;IAC3D,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,GAAG,CAAC,gBAAgB,GAAG,YAAY,GAAG,IAAI,CAmBvF"}
@@ -19,13 +19,12 @@
19
19
  */
20
20
  import { cleanObject } from "../1_utilities.js";
21
21
  import { Api } from "../2_tl.js";
22
- import { peerToChatId } from "../tl/2_telegram.js";
23
22
  import { constructMessageEntity } from "./2_message_entity.js";
24
23
  export function constructMessageDraft(action) {
25
24
  if (!Api.is("sendMessageTextDraftAction", action.action)) {
26
25
  return null;
27
26
  }
28
- const fromId = peerToChatId(action);
27
+ const fromId = Api.peerToChatId(action);
29
28
  const id = String(action.action.random_id);
30
29
  const text = action.action.text.text;
31
30
  const entities = action.action.text.entities.map((v) => constructMessageEntity(v)).filter((v) => v !== null);
@@ -17,8 +17,7 @@
17
17
  * You should have received a copy of the GNU Lesser General Public License
18
18
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
  */
20
- import type { Api } from "../2_tl.js";
21
- import type { SavedDialog } from "../tl/1_telegram_api.js";
20
+ import { Api } from "../2_tl.js";
22
21
  import { type ChatP, type PeerGetter } from "./1_chat_p.js";
23
22
  import type { StickerSetNameGetter } from "./1_sticker.js";
24
23
  import { type Message, type MessageGetter } from "./6_message.js";
@@ -31,5 +30,5 @@ export interface SavedChat {
31
30
  /** Whether the chat is pinned. */
32
31
  isPinned: boolean;
33
32
  }
34
- export declare function constructSavedChat(dialog: SavedDialog, result: Api.messages_savedDialogs | Api.messages_savedDialogsSlice, getPeer: PeerGetter, getMessage: MessageGetter, getStickerSetName: StickerSetNameGetter): Promise<SavedChat>;
33
+ export declare function constructSavedChat(dialog: Api.SavedDialog, result: Api.messages_savedDialogs | Api.messages_savedDialogsSlice, getPeer: PeerGetter, getMessage: MessageGetter, getStickerSetName: StickerSetNameGetter): Promise<SavedChat>;
35
34
  //# sourceMappingURL=7_saved_chat.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"7_saved_chat.d.ts","sourceRoot":"","sources":["../../src/types/7_saved_chat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,EAAE,KAAK,KAAK,EAAkB,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAC5E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAoB,KAAK,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpF,mCAAmC;AACnC,MAAM,WAAW,SAAS;IACxB,gBAAgB;IAChB,IAAI,EAAE,KAAK,CAAC;IACZ,qCAAqC;IACrC,WAAW,EAAE,OAAO,CAAC;IACrB,kCAAkC;IAClC,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,CAAC,qBAAqB,GAAG,GAAG,CAAC,0BAA0B,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,iBAAiB,EAAE,oBAAoB,GAAG,OAAO,CAAC,SAAS,CAAC,CAkB7O"}
1
+ {"version":3,"file":"7_saved_chat.d.ts","sourceRoot":"","sources":["../../src/types/7_saved_chat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,KAAK,KAAK,EAAkB,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAC5E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAoB,KAAK,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpF,mCAAmC;AACnC,MAAM,WAAW,SAAS;IACxB,gBAAgB;IAChB,IAAI,EAAE,KAAK,CAAC;IACZ,qCAAqC;IACrC,WAAW,EAAE,OAAO,CAAC;IACrB,kCAAkC;IAClC,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,GAAG,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,CAAC,qBAAqB,GAAG,GAAG,CAAC,0BAA0B,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,iBAAiB,EAAE,oBAAoB,GAAG,OAAO,CAAC,SAAS,CAAC,CAkBjP"}
@@ -18,7 +18,7 @@
18
18
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19
19
  */
20
20
  import { unreachable } from "../0_deps.js";
21
- import { peerToChatId } from "../tl/2_telegram.js";
21
+ import { Api } from "../2_tl.js";
22
22
  import { constructChatP } from "./1_chat_p.js";
23
23
  import { constructMessage } from "./6_message.js";
24
24
  export async function constructSavedChat(dialog, result, getPeer, getMessage, getStickerSetName) {
@@ -26,8 +26,8 @@ export async function constructSavedChat(dialog, result, getPeer, getMessage, ge
26
26
  if (message === undefined) {
27
27
  unreachable();
28
28
  }
29
- const dialogId = peerToChatId(dialog.peer);
30
- const chat_ = (dialog.peer._ === "peerUser" ? result.users : result.chats).find((v) => peerToChatId(v) === dialogId);
29
+ const dialogId = Api.peerToChatId(dialog.peer);
30
+ const chat_ = (dialog.peer._ === "peerUser" ? result.users : result.chats).find((v) => Api.peerToChatId(v) === dialogId);
31
31
  if (chat_ === undefined) {
32
32
  unreachable();
33
33
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mtkruto/node",
3
- "version": "0.145.0",
3
+ "version": "0.146.0",
4
4
  "description": "MTKruto for Node.js",
5
5
  "author": "Roj <rojvv@icloud.com>",
6
6
  "repository": {