@mtkruto/node 0.180.1 → 0.191.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 (157) hide show
  1. package/esm/3_types.d.ts +6 -0
  2. package/esm/3_types.d.ts.map +1 -1
  3. package/esm/3_types.js +6 -0
  4. package/esm/client/0_params.d.ts +42 -30
  5. package/esm/client/0_params.d.ts.map +1 -1
  6. package/esm/client/1_client_generic.d.ts +1158 -1056
  7. package/esm/client/1_client_generic.d.ts.map +1 -1
  8. package/esm/client/2_client_encrypted.d.ts.map +1 -1
  9. package/esm/client/2_client_encrypted.js +19 -12
  10. package/esm/client/2_file_manager.js +1 -1
  11. package/esm/client/3_account_manager.d.ts +6 -0
  12. package/esm/client/3_account_manager.d.ts.map +1 -1
  13. package/esm/client/3_account_manager.js +30 -1
  14. package/esm/client/3_message_manager.d.ts +3 -1
  15. package/esm/client/3_message_manager.d.ts.map +1 -1
  16. package/esm/client/3_message_manager.js +33 -19
  17. package/esm/client/3_secret_chat_manager.d.ts +3 -1
  18. package/esm/client/3_secret_chat_manager.d.ts.map +1 -1
  19. package/esm/client/3_secret_chat_manager.js +77 -3
  20. package/esm/client/4_chat_manager.d.ts +2 -1
  21. package/esm/client/4_chat_manager.d.ts.map +1 -1
  22. package/esm/client/4_chat_manager.js +7 -1
  23. package/esm/client/4_context.d.ts +132 -48
  24. package/esm/client/4_context.d.ts.map +1 -1
  25. package/esm/client/4_context.js +336 -125
  26. package/esm/client/4_poll_manager.d.ts +3 -1
  27. package/esm/client/4_poll_manager.d.ts.map +1 -1
  28. package/esm/client/4_poll_manager.js +16 -5
  29. package/esm/client/6_client.d.ts +1158 -1056
  30. package/esm/client/6_client.d.ts.map +1 -1
  31. package/esm/client/6_client.js +1514 -1386
  32. package/esm/client/6_client_dispatcher.d.ts +1158 -1056
  33. package/esm/client/6_client_dispatcher.d.ts.map +1 -1
  34. package/esm/client/6_client_dispatcher.js +1478 -1356
  35. package/esm/types/0_checklist_changed.d.ts +1 -1
  36. package/esm/types/0_checklist_changed.d.ts.map +1 -1
  37. package/esm/types/0_location.d.ts +2 -2
  38. package/esm/types/0_location.d.ts.map +1 -1
  39. package/esm/types/0_message_viewer.d.ts +29 -0
  40. package/esm/types/0_message_viewer.d.ts.map +1 -0
  41. package/esm/types/0_message_viewer.js +25 -0
  42. package/esm/types/0_secret_chat_action_type.d.ts +69 -0
  43. package/esm/types/0_secret_chat_action_type.d.ts.map +1 -0
  44. package/esm/types/0_secret_chat_action_type.js +46 -0
  45. package/esm/types/1_chat_p.d.ts +1 -5
  46. package/esm/types/1_chat_p.d.ts.map +1 -1
  47. package/esm/types/1_input_poll_media.d.ts +5 -5
  48. package/esm/types/1_input_poll_media.d.ts.map +1 -1
  49. package/esm/types/1_input_sticker.d.ts +1 -1
  50. package/esm/types/1_secret_chat_action.d.ts +30 -0
  51. package/esm/types/1_secret_chat_action.d.ts.map +1 -0
  52. package/esm/types/1_secret_chat_action.js +28 -0
  53. package/esm/types/1_sticker.d.ts +3 -3
  54. package/esm/types/1_sticker.d.ts.map +1 -1
  55. package/esm/types/1_video.d.ts +3 -3
  56. package/esm/types/1_video.d.ts.map +1 -1
  57. package/esm/types/1_video_note.d.ts +3 -3
  58. package/esm/types/1_video_note.d.ts.map +1 -1
  59. package/esm/types/2_poll_voter.d.ts +13 -0
  60. package/esm/types/2_poll_voter.d.ts.map +1 -0
  61. package/esm/types/2_poll_voter.js +18 -0
  62. package/esm/types/3_connected_website.d.ts +35 -0
  63. package/esm/types/3_connected_website.d.ts.map +1 -0
  64. package/esm/types/3_connected_website.js +39 -0
  65. package/esm/types/3_input_media.d.ts +5 -5
  66. package/esm/types/3_input_media.d.ts.map +1 -1
  67. package/esm/types/3_poll_voter_list.d.ts +31 -0
  68. package/esm/types/3_poll_voter_list.d.ts.map +1 -0
  69. package/esm/types/3_poll_voter_list.js +28 -0
  70. package/esm/types/4_reply_to.d.ts +2 -2
  71. package/esm/types/4_reply_to.d.ts.map +1 -1
  72. package/esm/types/6_message_content.d.ts +2 -2
  73. package/esm/types/6_message_content.d.ts.map +1 -1
  74. package/esm/types/9_message.d.ts +8 -1
  75. package/esm/types/9_message.d.ts.map +1 -1
  76. package/esm/types/9_message.js +3 -0
  77. package/esm/types/B_update.d.ts +25 -10
  78. package/esm/types/B_update.d.ts.map +1 -1
  79. package/package.json +1 -1
  80. package/script/3_types.d.ts +6 -0
  81. package/script/3_types.d.ts.map +1 -1
  82. package/script/3_types.js +6 -0
  83. package/script/client/0_params.d.ts +42 -30
  84. package/script/client/0_params.d.ts.map +1 -1
  85. package/script/client/1_client_generic.d.ts +1158 -1056
  86. package/script/client/1_client_generic.d.ts.map +1 -1
  87. package/script/client/2_client_encrypted.d.ts.map +1 -1
  88. package/script/client/2_client_encrypted.js +19 -12
  89. package/script/client/2_file_manager.js +1 -1
  90. package/script/client/3_account_manager.d.ts +6 -0
  91. package/script/client/3_account_manager.d.ts.map +1 -1
  92. package/script/client/3_account_manager.js +29 -0
  93. package/script/client/3_message_manager.d.ts +3 -1
  94. package/script/client/3_message_manager.d.ts.map +1 -1
  95. package/script/client/3_message_manager.js +32 -18
  96. package/script/client/3_secret_chat_manager.d.ts +3 -1
  97. package/script/client/3_secret_chat_manager.d.ts.map +1 -1
  98. package/script/client/3_secret_chat_manager.js +76 -2
  99. package/script/client/4_chat_manager.d.ts +2 -1
  100. package/script/client/4_chat_manager.d.ts.map +1 -1
  101. package/script/client/4_chat_manager.js +7 -1
  102. package/script/client/4_context.d.ts +132 -48
  103. package/script/client/4_context.d.ts.map +1 -1
  104. package/script/client/4_context.js +336 -125
  105. package/script/client/4_poll_manager.d.ts +3 -1
  106. package/script/client/4_poll_manager.d.ts.map +1 -1
  107. package/script/client/4_poll_manager.js +15 -4
  108. package/script/client/6_client.d.ts +1158 -1056
  109. package/script/client/6_client.d.ts.map +1 -1
  110. package/script/client/6_client.js +1514 -1386
  111. package/script/client/6_client_dispatcher.d.ts +1158 -1056
  112. package/script/client/6_client_dispatcher.d.ts.map +1 -1
  113. package/script/client/6_client_dispatcher.js +1478 -1356
  114. package/script/types/0_checklist_changed.d.ts +1 -1
  115. package/script/types/0_checklist_changed.d.ts.map +1 -1
  116. package/script/types/0_location.d.ts +2 -2
  117. package/script/types/0_location.d.ts.map +1 -1
  118. package/script/types/0_message_viewer.d.ts +29 -0
  119. package/script/types/0_message_viewer.d.ts.map +1 -0
  120. package/script/types/0_message_viewer.js +28 -0
  121. package/script/types/0_secret_chat_action_type.d.ts +69 -0
  122. package/script/types/0_secret_chat_action_type.d.ts.map +1 -0
  123. package/script/types/0_secret_chat_action_type.js +49 -0
  124. package/script/types/1_chat_p.d.ts +1 -5
  125. package/script/types/1_chat_p.d.ts.map +1 -1
  126. package/script/types/1_input_poll_media.d.ts +5 -5
  127. package/script/types/1_input_poll_media.d.ts.map +1 -1
  128. package/script/types/1_input_sticker.d.ts +1 -1
  129. package/script/types/1_secret_chat_action.d.ts +30 -0
  130. package/script/types/1_secret_chat_action.d.ts.map +1 -0
  131. package/script/types/1_secret_chat_action.js +31 -0
  132. package/script/types/1_sticker.d.ts +3 -3
  133. package/script/types/1_sticker.d.ts.map +1 -1
  134. package/script/types/1_video.d.ts +3 -3
  135. package/script/types/1_video.d.ts.map +1 -1
  136. package/script/types/1_video_note.d.ts +3 -3
  137. package/script/types/1_video_note.d.ts.map +1 -1
  138. package/script/types/2_poll_voter.d.ts +13 -0
  139. package/script/types/2_poll_voter.d.ts.map +1 -0
  140. package/script/types/2_poll_voter.js +21 -0
  141. package/script/types/3_connected_website.d.ts +35 -0
  142. package/script/types/3_connected_website.d.ts.map +1 -0
  143. package/script/types/3_connected_website.js +42 -0
  144. package/script/types/3_input_media.d.ts +5 -5
  145. package/script/types/3_input_media.d.ts.map +1 -1
  146. package/script/types/3_poll_voter_list.d.ts +31 -0
  147. package/script/types/3_poll_voter_list.d.ts.map +1 -0
  148. package/script/types/3_poll_voter_list.js +31 -0
  149. package/script/types/4_reply_to.d.ts +2 -2
  150. package/script/types/4_reply_to.d.ts.map +1 -1
  151. package/script/types/6_message_content.d.ts +2 -2
  152. package/script/types/6_message_content.d.ts.map +1 -1
  153. package/script/types/9_message.d.ts +8 -1
  154. package/script/types/9_message.d.ts.map +1 -1
  155. package/script/types/9_message.js +3 -0
  156. package/script/types/B_update.d.ts +25 -10
  157. package/script/types/B_update.d.ts.map +1 -1
@@ -18,7 +18,7 @@
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 change in checklist. */
21
+ /** A change to a checklist. */
22
22
  export interface ChecklistChanged {
23
23
  /** The identifiers of the checked items. */
24
24
  checkedItems: number[];
@@ -1 +1 @@
1
- {"version":3,"file":"0_checklist_changed.d.ts","sourceRoot":"","sources":["../../src/types/0_checklist_changed.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEtC,6BAA6B;AAC7B,MAAM,WAAW,gBAAgB;IAC/B,4CAA4C;IAC5C,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,8CAA8C;IAC9C,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,GAAG,CAAC,4BAA4B,GAAG,gBAAgB,CAKpG"}
1
+ {"version":3,"file":"0_checklist_changed.d.ts","sourceRoot":"","sources":["../../src/types/0_checklist_changed.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEtC,+BAA+B;AAC/B,MAAM,WAAW,gBAAgB;IAC/B,4CAA4C;IAC5C,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,8CAA8C;IAC9C,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,GAAG,CAAC,4BAA4B,GAAG,gBAAgB,CAKpG"}
@@ -28,9 +28,9 @@ export interface Location {
28
28
  horizontalAccuracy?: number;
29
29
  /** The duration for which the location can be updated, in seconds. Must be in the range of 80-864,000. */
30
30
  livePeriod?: number;
31
- /** The direction which the user is moving towards. Must be in the range of 1-350. */
31
+ /** The direction in which the user is moving. Must be in the range of 1-350. */
32
32
  heading?: number;
33
- /** The maximum distance for proximity alerts on approaching another chat member in meters. Must be in the range 1-100,000. */
33
+ /** The maximum distance for proximity alerts when approaching another chat member, in meters. Must be in the range of 1-100,000. */
34
34
  proximityAlertRadius?: number;
35
35
  }
36
36
  export declare function constructLocation(geo_: Api.messageMediaGeo | Api.messageMediaGeoLive | Api.geoPoint): Location;
@@ -1 +1 @@
1
- {"version":3,"file":"0_location.d.ts","sourceRoot":"","sources":["../../src/types/0_location.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,yBAAyB;AACzB,MAAM,WAAW,QAAQ;IACvB,oCAAoC;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,qCAAqC;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,qFAAqF;IACrF,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,0GAA0G;IAC1G,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qFAAqF;IACrF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8HAA8H;IAC9H,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,GAAG,CAAC,eAAe,GAAG,GAAG,CAAC,mBAAmB,GAAG,GAAG,CAAC,QAAQ,GAAG,QAAQ,CA0B9G"}
1
+ {"version":3,"file":"0_location.d.ts","sourceRoot":"","sources":["../../src/types/0_location.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,yBAAyB;AACzB,MAAM,WAAW,QAAQ;IACvB,oCAAoC;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,qCAAqC;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,qFAAqF;IACrF,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,0GAA0G;IAC1G,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gFAAgF;IAChF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oIAAoI;IACpI,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,GAAG,CAAC,eAAe,GAAG,GAAG,CAAC,mBAAmB,GAAG,GAAG,CAAC,QAAQ,GAAG,QAAQ,CA0B9G"}
@@ -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
+ import type { Api } from "../2_tl.js";
21
+ /** A message's viewer. */
22
+ export interface MessageViewer {
23
+ /** The user identifier of the message viewer. */
24
+ userId: number;
25
+ /** The point in time when the message was viewed. */
26
+ viewedAt: number;
27
+ }
28
+ export declare function constructMessageViewer(rpd: Api.readParticipantDate): MessageViewer;
29
+ //# sourceMappingURL=0_message_viewer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"0_message_viewer.d.ts","sourceRoot":"","sources":["../../src/types/0_message_viewer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEtC,0BAA0B;AAC1B,MAAM,WAAW,aAAa;IAC5B,iDAAiD;IACjD,MAAM,EAAE,MAAM,CAAC;IACf,qDAAqD;IACrD,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,GAAG,CAAC,mBAAmB,GAAG,aAAa,CAKlF"}
@@ -0,0 +1,25 @@
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 constructMessageViewer(rpd) {
21
+ return {
22
+ userId: Number(rpd.user_id),
23
+ viewedAt: rpd.date,
24
+ };
25
+ }
@@ -0,0 +1,69 @@
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 { SecretChats } from "../2_tl.js";
21
+ /** @unlisted */
22
+ export interface SecretSecretChatActionTypeTyping {
23
+ type: "typing";
24
+ }
25
+ /** @unlisted */
26
+ export interface SecretChatActionTypeUploadingPhoto {
27
+ type: "uploadingPhoto";
28
+ }
29
+ /** @unlisted */
30
+ export interface SecretChatActionTypeRecordingVideo {
31
+ type: "recordingVideo";
32
+ }
33
+ /** @unlisted */
34
+ export interface SecretChatActionTypeUploadingVideo {
35
+ type: "uploadingVideo";
36
+ }
37
+ /** @unlisted */
38
+ export interface SecretChatActionTypeRecordingVoice {
39
+ type: "recordingVoice";
40
+ }
41
+ /** @unlisted */
42
+ export interface SecretChatActionTypeUploadingAudio {
43
+ type: "uploadingAudio";
44
+ }
45
+ /** @unlisted */
46
+ export interface SecretChatActionTypeUploadingDocument {
47
+ type: "uploadingDocument";
48
+ }
49
+ /** @unlisted */
50
+ export interface SecretChatActionTypeChoosingLocation {
51
+ type: "choosingLocation";
52
+ }
53
+ /** @unlisted */
54
+ export interface SecretChatActionTypeRecordingVideoNote {
55
+ type: "recordingVideoNote";
56
+ }
57
+ /** @unlisted */
58
+ export interface SecretChatActionTypeUploadingTypeVideoNote {
59
+ type: "uploadingVideoNote";
60
+ progress?: number;
61
+ }
62
+ /** @unlisted */
63
+ export interface SecretChatActionTypeCancel {
64
+ type: "cancel";
65
+ }
66
+ /** A type of a secret chat action. */
67
+ export type SecretChatActionType = SecretSecretChatActionTypeTyping | SecretChatActionTypeUploadingPhoto | SecretChatActionTypeRecordingVideo | SecretChatActionTypeUploadingVideo | SecretChatActionTypeRecordingVoice | SecretChatActionTypeUploadingAudio | SecretChatActionTypeUploadingDocument | SecretChatActionTypeChoosingLocation | SecretChatActionTypeRecordingVideoNote | SecretChatActionTypeUploadingTypeVideoNote | SecretChatActionTypeCancel;
68
+ export declare function constructSecretChatActionType(action: SecretChats.SendMessageAction): SecretChatActionType | null;
69
+ //# sourceMappingURL=0_secret_chat_action_type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"0_secret_chat_action_type.d.ts","sourceRoot":"","sources":["../../src/types/0_secret_chat_action_type.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,gBAAgB;AAChB,MAAM,WAAW,gCAAgC;IAC/C,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED,gBAAgB;AAChB,MAAM,WAAW,kCAAkC;IACjD,IAAI,EAAE,gBAAgB,CAAC;CACxB;AAED,gBAAgB;AAChB,MAAM,WAAW,kCAAkC;IACjD,IAAI,EAAE,gBAAgB,CAAC;CACxB;AAED,gBAAgB;AAChB,MAAM,WAAW,kCAAkC;IACjD,IAAI,EAAE,gBAAgB,CAAC;CACxB;AAED,gBAAgB;AAChB,MAAM,WAAW,kCAAkC;IACjD,IAAI,EAAE,gBAAgB,CAAC;CACxB;AAED,gBAAgB;AAChB,MAAM,WAAW,kCAAkC;IACjD,IAAI,EAAE,gBAAgB,CAAC;CACxB;AAED,gBAAgB;AAChB,MAAM,WAAW,qCAAqC;IACpD,IAAI,EAAE,mBAAmB,CAAC;CAC3B;AAED,gBAAgB;AAChB,MAAM,WAAW,oCAAoC;IACnD,IAAI,EAAE,kBAAkB,CAAC;CAC1B;AAED,gBAAgB;AAChB,MAAM,WAAW,sCAAsC;IACrD,IAAI,EAAE,oBAAoB,CAAC;CAC5B;AAED,gBAAgB;AAChB,MAAM,WAAW,0CAA0C;IACzD,IAAI,EAAE,oBAAoB,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,gBAAgB;AAChB,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED,sCAAsC;AACtC,MAAM,MAAM,oBAAoB,GAC5B,gCAAgC,GAChC,kCAAkC,GAClC,kCAAkC,GAClC,kCAAkC,GAClC,kCAAkC,GAClC,kCAAkC,GAClC,qCAAqC,GACrC,oCAAoC,GACpC,sCAAsC,GACtC,0CAA0C,GAC1C,0BAA0B,CAAC;AAE/B,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,WAAW,CAAC,iBAAiB,GAAG,oBAAoB,GAAG,IAAI,CA2BhH"}
@@ -0,0 +1,46 @@
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 constructSecretChatActionType(action) {
21
+ switch (action._) {
22
+ case "sendMessageTypingAction":
23
+ return { type: "typing" };
24
+ case "sendMessageCancelAction":
25
+ return { type: "cancel" };
26
+ case "sendMessageRecordVideoAction":
27
+ return { type: "recordingVideoNote" };
28
+ case "sendMessageUploadVideoAction":
29
+ return { type: "uploadingVideo" };
30
+ case "sendMessageRecordAudioAction":
31
+ return { type: "recordingVoice" };
32
+ case "sendMessageUploadAudioAction":
33
+ return { type: "uploadingAudio" };
34
+ case "sendMessageUploadPhotoAction":
35
+ return { type: "uploadingPhoto" };
36
+ case "sendMessageUploadDocumentAction":
37
+ return { type: "uploadingDocument" };
38
+ case "sendMessageGeoLocationAction":
39
+ return { type: "choosingLocation" };
40
+ case "sendMessageRecordRoundAction":
41
+ return { type: "recordingVideoNote" };
42
+ case "sendMessageUploadRoundAction":
43
+ return { type: "uploadingVideoNote" };
44
+ }
45
+ return null;
46
+ }
@@ -23,13 +23,9 @@ import { type EmojiStatus } from "./0_emoji_status.js";
23
23
  import { type RestrictionReason } from "./0_restriction_reason.js";
24
24
  import { type UserStatus } from "./0_user_status.js";
25
25
  /** @unlisted */
26
- export type ChatType = "private" | "group" | "supergroup" | "channel";
27
- /** @unlisted */
28
26
  export interface _ChatPBase {
29
27
  /** The identifier of the chat. */
30
28
  id: number;
31
- /** The type of the chat. */
32
- type: ChatType;
33
29
  /** Identifier of a color that can be displayed instead of the chat's photo. */
34
30
  color: number;
35
31
  /** The chat's photo. */
@@ -128,7 +124,7 @@ export interface ChatPSupergroup extends ChatPChannelBase {
128
124
  /** Whether the chat is a channel's direct messages. */
129
125
  isDirectMessagesChat: boolean;
130
126
  }
131
- /** A chat with lesser fields. */
127
+ /** A partial chat. */
132
128
  export type ChatP = ChatPPrivate | ChatPGroup | ChatPSupergroup | ChatPChannel;
133
129
  export declare function constructChatP(chat: Api.user): ChatPPrivate;
134
130
  export declare function constructChatP(chat: Api.chat | Api.chatForbidden): ChatPGroup;
@@ -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;AACjC,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,OAA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AAI,CAAC;CAC/E;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,IAAI,YAAY,CAE/D"}
@@ -22,7 +22,7 @@ import type { FileSource } from "./0_file_source.js";
22
22
  export interface _InputPollOptionMediaCommon {
23
23
  /** The file name to assign if applicable. */
24
24
  fileName?: string;
25
- /** The mime type to assign if applicable. */
25
+ /** The MIME type to assign if applicable. */
26
26
  mimeType?: string;
27
27
  /** Size of each upload chunk in bytes. */
28
28
  chunkSize?: number;
@@ -43,7 +43,7 @@ export interface InputPollMediaAnimation extends _InputPollOptionMediaCommon {
43
43
  /** The height of the animation file. */
44
44
  height?: number;
45
45
  /** Whether to mark the media as a spoiler. */
46
- hasSpoiler?: boolean;
46
+ isSpoiler?: boolean;
47
47
  }
48
48
  /** @unlisted */
49
49
  export interface InputPollMediaPhoto extends _InputPollOptionMediaCommon {
@@ -55,7 +55,7 @@ export interface InputPollMediaPhoto extends _InputPollOptionMediaCommon {
55
55
  /** The height of the photo in pixels. */
56
56
  height?: number;
57
57
  /** Whether to mark the media as a spoiler. */
58
- hasSpoiler?: boolean;
58
+ isSpoiler?: boolean;
59
59
  }
60
60
  /** @unlisted */
61
61
  export interface InputPollMediaVideo extends _InputPollOptionMediaCommon {
@@ -71,9 +71,9 @@ export interface InputPollMediaVideo extends _InputPollOptionMediaCommon {
71
71
  /** The height of the video in pixels. */
72
72
  height?: number;
73
73
  /** Whether the video is suitable for streaming. */
74
- supportsStreaming?: boolean;
74
+ isStreamingSupported?: boolean;
75
75
  /** Whether to mark the media as a spoiler. */
76
- hasSpoiler?: boolean;
76
+ isSpoiler?: boolean;
77
77
  }
78
78
  /** @unlisted */
79
79
  export interface InputPollMediaSticker extends _InputPollOptionMediaCommon {
@@ -1 +1 @@
1
- {"version":3,"file":"1_input_poll_media.d.ts","sourceRoot":"","sources":["../../src/types/1_input_poll_media.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAA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AAE,WAAW,CAAC;IAClB,iBAAiB;IACjB,KAAK,EAAE,UAAU,CAAC;IAClB,sCAAsC;IACtC,KAAK,EAAE,UAAU,CAAC;CACnB;AAED,gBAAgB;AAChB,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,UAAU,CAAC;IACjB,oCAAoC;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,qCAAqC;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,qFAAqF;IACrF,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,iCAAiC;AACjC,MAAM,MAAM,cAAc,GAAG,uBAAuB,GAAG,mBAAmB,GAAG,mBAAmB,GAAG,qBAAqB,GAAG,uBAAuB,GAAG,sBAAsB,GAAG,mBAAmB,GAAG,kBAAkB,CAAC"}
@@ -28,7 +28,7 @@ export interface InputSticker {
28
28
  fileName?: string;
29
29
  /** The file's size. */
30
30
  fileSize?: number;
31
- /** The mime type to assign if applicable. */
31
+ /** The MIME type to assign if applicable. */
32
32
  mimeType?: string;
33
33
  /** Size of each upload chunk in bytes. */
34
34
  chunkSize?: number;
@@ -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 { SecretChats } from "../2_tl.js";
21
+ import type { ChatActionType } from "./0_chat_action_type.js";
22
+ /** A sign of a possible action by a member of a secret chat. */
23
+ export interface SecretChatAction {
24
+ /** The type of the action. */
25
+ type: ChatActionType;
26
+ /** The identifier of the secret chat that the chat action belongs to. */
27
+ chatId: number;
28
+ }
29
+ export declare function constructSecretChatAction(chatId: number, update: SecretChats.decryptedMessageActionTyping): SecretChatAction | null;
30
+ //# sourceMappingURL=1_secret_chat_action.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1_secret_chat_action.d.ts","sourceRoot":"","sources":["../../src/types/1_secret_chat_action.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAG9D,gEAAgE;AAChE,MAAM,WAAW,gBAAgB;IAC/B,8BAA8B;IAC9B,IAAI,EAAE,cAAc,CAAC;IACrB,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,4BAA4B,GAAG,gBAAgB,GAAG,IAAI,CAOnI"}
@@ -0,0 +1,28 @@
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 { cleanObject } from "../1_utilities.js";
21
+ import { constructSecretChatActionType } from "./0_secret_chat_action_type.js";
22
+ export function constructSecretChatAction(chatId, update) {
23
+ const type = constructSecretChatActionType(update.action);
24
+ if (type === null) {
25
+ return null;
26
+ }
27
+ return cleanObject({ type, chatId });
28
+ }
@@ -43,13 +43,13 @@ export interface Sticker {
43
43
  emoji?: string;
44
44
  /** Name of the sticker set where the sticker belongs. */
45
45
  setName?: string;
46
- /** For mask stickers, the position where the mask should be placed */
46
+ /** For mask stickers, the position where the mask should be placed. */
47
47
  maskPosition?: MaskPosition;
48
- /** For custom emoji stickers, unique identifier of the custom emoji */
48
+ /** For custom emoji stickers, unique identifier of the custom emoji. */
49
49
  customEmojiId?: string;
50
50
  /** Whether the sticker needs repainting. */
51
51
  isRepaintingNeeded?: boolean;
52
- /** File size in bytes */
52
+ /** File size in bytes. */
53
53
  fileSize?: number;
54
54
  }
55
55
  /** @unlisted */
@@ -1 +1 @@
1
- {"version":3,"file":"1_sticker.d.ts","sourceRoot":"","sources":["../../src/types/1_sticker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAe,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAyB,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAsB,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEtE,iBAAiB;AACjB,MAAM,WAAW,OAAO;IACtB,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,YAAY,EAAE,MAAM,CAAC;IACrB,gMAAgM;IAChM,IAAI,EAAE,SAAS,GAAG,MAAM,GAAG,aAAa,CAAC;IACzC,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,iCAAiC;IACjC,MAAM,EAAE,MAAM,CA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,YAAY,EAAE,MAAM,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,aAAa,SAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAKlL;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,SAAS,EAAE,aAAa,SAAK,GAAG,OAAO,CAsBxJ;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,WAAW,CAAC,qCAAqC,GAAG,WAAW,CAAC,+BAA+B,GAAG,WAAW,CAAC,6BAA6B,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAkBtO"}
@@ -29,11 +29,11 @@ export interface Video {
29
29
  width: number;
30
30
  /** Video height as defined by its sender. */
31
31
  height: number;
32
- /** Duration of the video in seconds as defined by sender */
32
+ /** Duration of the video in seconds as defined by sender. */
33
33
  duration: number;
34
- /** Video thumbnail */
34
+ /** The video's thumbnails. */
35
35
  thumbnails: Thumbnail[];
36
- /** Original filename as defined by sender */
36
+ /** Original filename as defined by sender. */
37
37
  fileName?: string;
38
38
  /** MIME type of the file. */
39
39
  mimeType: string;
@@ -1 +1 @@
1
- {"version":3,"file":"1_video.d.ts","sourceRoot":"","sources":["../../src/types/1_video.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAsB,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEtE,oBAAoB;AACpB,MAAM,WAAW,KAAK;IACpB,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,YAAY,EAAE,MAAM,CAAC;IACrB,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf,4DAA4D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E,MAAM,GAAG,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,KAAK,CAY5K"}
@@ -27,11 +27,11 @@ export interface VideoNote {
27
27
  fileUniqueId: string;
28
28
  /** Video width and height (diameter of the video message) as defined by its sender. */
29
29
  length: number;
30
- /** Duration of the video in seconds as defined by sender */
30
+ /** Duration of the video in seconds as defined by sender. */
31
31
  duration: number;
32
- /** Video thumbnail */
32
+ /** The video note's thumbnails. */
33
33
  thumbnails: Thumbnail[];
34
- /** Original filename as defined by sender */
34
+ /** Original filename as defined by sender. */
35
35
  fileName?: string;
36
36
  /** Size of the file in bytes. */
37
37
  fileSize: number;
@@ -1 +1 @@
1
- {"version":3,"file":"1_video_note.d.ts","sourceRoot":"","sources":["../../src/types/1_video_note.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAsB,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEtE,oBAAoB;AACpB,MAAM,WAAW,SAAS;IACxB,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,YAAY,EAAE,MAAM,CAAC;IACrB,uFAAuF;IACvF,MAAM,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,QAAQ,EAAE,MAAM,CAAC;IACjB,sBAAsB;IACtB,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iCAAiC;IACjC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,cAAc,EAAE,GAAG,CAAC,sBAAsB,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,SAAS,CAStJ"}
1
+ {"version":3,"file":"1_video_note.d.ts","sourceRoot":"","sources":["../../src/types/1_video_note.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAsB,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEtE,oBAAoB;AACpB,MAAM,WAAW,SAAS;IACxB,yEAAyE;IACzE,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,YAAY,EAAE,MAAM,CAAC;IACrB,uFAAuF;IACvF,MAAM,EAAE,MAAM,CAAC;IACf,6DAA6D;IAC7D,QAAQ,EAAE,MAAM,CAAC;IACjB,mCAAmC;IACnC,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iCAAiC;IACjC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,GAAG,CAAC,QAAQ,EAAE,cAAc,EAAE,GAAG,CAAC,sBAAsB,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,SAAS,CAStJ"}
@@ -0,0 +1,13 @@
1
+ import { Api } from "../2_tl.js";
2
+ import type { ChatP, PeerGetter } from "./1_chat_p.js";
3
+ /** A poll voter. */
4
+ export interface PollVoter {
5
+ /** The voter chat. */
6
+ voter: ChatP;
7
+ /** The indexes of the cast options. */
8
+ optionIndexes: number[];
9
+ /** The point in time when the vote was cast. */
10
+ votedAt: number;
11
+ }
12
+ export declare function constructPollVoter(mpv: Api.MessagePeerVote, getPeer: PeerGetter): PollVoter;
13
+ //# sourceMappingURL=2_poll_voter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"2_poll_voter.d.ts","sourceRoot":"","sources":["../../src/types/2_poll_voter.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEvD,oBAAoB;AACpB,MAAM,WAAW,SAAS;IACxB,sBAAsB;IACtB,KAAK,EAAE,KAAK,CAAC;IACb,uCAAuC;IACvC,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,gDAAgD;IAChD,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,GAAG,CAAC,eAAe,EAAE,OAAO,EAAE,UAAU,GAAG,SAAS,CAe3F"}
@@ -0,0 +1,18 @@
1
+ import { unreachable } from "../0_deps.js";
2
+ import { decodeText } from "../1_utilities.js";
3
+ import { Api } from "../2_tl.js";
4
+ export function constructPollVoter(mpv, getPeer) {
5
+ if (Api.is("messagePeerVoteInputOption", mpv)) {
6
+ unreachable();
7
+ }
8
+ const peer = getPeer(mpv.peer);
9
+ if (peer === null) {
10
+ unreachable();
11
+ }
12
+ const options = Api.is("messagePeerVote", mpv) ? [mpv.option] : mpv.options;
13
+ return {
14
+ voter: peer[0],
15
+ optionIndexes: options.map(decodeText).map(Number),
16
+ votedAt: mpv.date,
17
+ };
18
+ }
@@ -0,0 +1,35 @@
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
+ import type { PeerGetter } from "./1_chat_p.js";
22
+ import { type User } from "./2_user.js";
23
+ export interface ConnectedWebsite {
24
+ id: string;
25
+ bot: User;
26
+ domain: string;
27
+ browser: string;
28
+ platform: string;
29
+ createdAt: number;
30
+ lastActiveAt: number;
31
+ ipAddress: string;
32
+ ipAddressRegion: string;
33
+ }
34
+ export declare function constructConnectedWebsite(wa: Api.WebAuthorization, getPeer: PeerGetter): ConnectedWebsite;
35
+ //# sourceMappingURL=3_connected_website.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"3_connected_website.d.ts","sourceRoot":"","sources":["../../src/types/3_connected_website.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAkB,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;AAExD,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,IAAI,CAAC;IACV,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,wBAAgB,yBAAyB,CAAC,EAAE,EAAE,GAAG,CAAC,gBAAgB,EAAE,OAAO,EAAE,UAAU,GAAG,gBAAgB,CAiBzG"}
@@ -0,0 +1,39 @@
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 { unreachable } from "../0_deps.js";
21
+ import { constructUser2 } from "./2_user.js";
22
+ export function constructConnectedWebsite(wa, getPeer) {
23
+ const peer = getPeer({ _: "peerUser", user_id: wa.bot_id });
24
+ if (peer === null || peer[0].type !== "private") {
25
+ unreachable();
26
+ }
27
+ const bot = constructUser2(peer[0]);
28
+ return {
29
+ id: String(wa.hash),
30
+ bot,
31
+ domain: wa.domain,
32
+ browser: wa.browser,
33
+ platform: wa.platform,
34
+ createdAt: wa.date_created,
35
+ lastActiveAt: wa.date_active,
36
+ ipAddress: wa.ip,
37
+ ipAddressRegion: wa.region,
38
+ };
39
+ }
@@ -25,7 +25,7 @@ import type { MessageEntity } from "./2_message_entity.js";
25
25
  export interface _InputMediaCommon {
26
26
  /** The file name to assign if applicable. */
27
27
  fileName?: string;
28
- /** The mime type to assign if applicable. */
28
+ /** The MIME type to assign if applicable. */
29
29
  mimeType?: string;
30
30
  /** Size of each upload chunk in bytes. */
31
31
  chunkSize?: number;
@@ -52,7 +52,7 @@ export interface InputMediaAnimation extends _InputMediaCommon {
52
52
  /** The height of the animation file. */
53
53
  height?: number;
54
54
  /** Whether to mark the media as a spoiler. */
55
- hasSpoiler?: boolean;
55
+ isSpoiler?: boolean;
56
56
  }
57
57
  /** @unlisted */
58
58
  export interface InputMediaAudio extends _InputMediaCommon {
@@ -86,7 +86,7 @@ export interface InputMediaPhoto extends _InputMediaCommon {
86
86
  /** The height of the photo in pixels. */
87
87
  height?: number;
88
88
  /** Whether to mark the media as a spoiler. */
89
- hasSpoiler?: boolean;
89
+ isSpoiler?: boolean;
90
90
  selfDestruct?: SelfDestructOption;
91
91
  }
92
92
  /** @unlisted */
@@ -103,9 +103,9 @@ export interface InputMediaVideo extends _InputMediaCommon {
103
103
  /** The height of the video in pixels. */
104
104
  height?: number;
105
105
  /** Whether the video is suitable for streaming. */
106
- supportsStreaming?: boolean;
106
+ isStreamingSupported?: boolean;
107
107
  /** Whether to mark the media as a spoiler. */
108
- hasSpoiler?: boolean;
108
+ isSpoiler?: boolean;
109
109
  selfDestruct?: SelfDestructOption;
110
110
  }
111
111
  /** An input media. */