@mtkruto/node 0.1.133 → 0.1.134

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 (162) hide show
  1. package/esm/3_errors.d.ts +519 -510
  2. package/esm/3_errors.js +521 -509
  3. package/esm/3_types.d.ts +16 -7
  4. package/esm/3_types.js +16 -7
  5. package/esm/4_constants.d.ts +1 -1
  6. package/esm/4_constants.js +1 -1
  7. package/esm/4_errors.d.ts +7 -12
  8. package/esm/4_errors.js +6 -7
  9. package/esm/5_client.d.ts +3 -3
  10. package/esm/5_client.js +3 -3
  11. package/esm/client/0_utilities.d.ts +28 -0
  12. package/esm/client/0_utilities.js +10 -0
  13. package/esm/client/1_composer.d.ts +30 -0
  14. package/esm/client/{4_composer.js → 1_composer.js} +3 -2
  15. package/esm/client/2_client_plain.d.ts +1 -1
  16. package/esm/client/2_client_plain.js +1 -1
  17. package/{script/client/3_types.d.ts → esm/client/3_params.d.ts} +68 -177
  18. package/esm/client/3_params.js +1 -0
  19. package/esm/client/{5_client.d.ts → 4_client.d.ts} +57 -25
  20. package/esm/client/{5_client.js → 4_client.js} +347 -160
  21. package/esm/client/5_composer.d.ts +4 -0
  22. package/esm/client/5_composer.js +3 -0
  23. package/esm/storage/0_storage.d.ts +4 -1
  24. package/esm/storage/0_storage.js +36 -7
  25. package/esm/storage/1_storage_indexed_db.d.ts +6 -2
  26. package/esm/storage/1_storage_indexed_db.js +7 -5
  27. package/esm/storage/1_storage_local_storage.d.ts +1 -1
  28. package/esm/storage/1_storage_local_storage.js +1 -1
  29. package/esm/storage/1_storage_memory.d.ts +1 -1
  30. package/esm/storage/1_storage_memory.js +1 -1
  31. package/esm/storage/1_storage_session_storage.d.ts +1 -1
  32. package/esm/storage/1_storage_session_storage.js +1 -1
  33. package/esm/tl/3_utilities.d.ts +1 -0
  34. package/esm/tl/3_utilities.js +14 -0
  35. package/esm/tl/6_message.js +1 -1
  36. package/esm/types/0_authorization_state.d.ts +5 -0
  37. package/esm/types/0_authorization_state.js +1 -0
  38. package/esm/types/0_connection_state.d.ts +17 -0
  39. package/esm/types/0_connection_state.js +1 -0
  40. package/esm/types/0_login_url.d.ts +0 -4
  41. package/esm/types/0_mask_position.d.ts +0 -4
  42. package/esm/types/0_message_entity.d.ts +0 -2
  43. package/esm/types/0_message_identifier.d.ts +4 -0
  44. package/esm/types/0_message_identifier.js +1 -0
  45. package/esm/types/0_network_statistics_entry.d.ts +4 -0
  46. package/esm/types/0_network_statistics_entry.js +1 -0
  47. package/esm/types/0_reaction.d.ts +1 -0
  48. package/esm/types/0_reaction.js +13 -0
  49. package/esm/types/1__getters.d.ts +3 -0
  50. package/esm/types/1_chat_p.d.ts +1 -0
  51. package/esm/types/1_keyboard_button.d.ts +1 -23
  52. package/esm/types/1_network_statistics.d.ts +5 -0
  53. package/esm/types/1_network_statistics.js +1 -0
  54. package/esm/types/1_poll.d.ts +0 -13
  55. package/esm/types/1_reaction_count.d.ts +7 -0
  56. package/esm/types/1_reaction_count.js +6 -0
  57. package/esm/types/2_game.d.ts +0 -7
  58. package/esm/types/2_inline_keyboard_button.d.ts +0 -8
  59. package/esm/types/2_inline_query.d.ts +0 -6
  60. package/esm/types/2_message_interactions.d.ts +8 -0
  61. package/esm/types/2_message_interactions.js +1 -0
  62. package/esm/types/2_message_reaction_count.d.ts +8 -0
  63. package/esm/types/2_message_reaction_count.js +1 -0
  64. package/esm/types/2_reply_keyboard_markup.d.ts +0 -7
  65. package/esm/types/3_inline_keyboard_markup.d.ts +0 -2
  66. package/{script/types/3_message.d.ts → esm/types/4_message.d.ts} +225 -7
  67. package/esm/types/{3_message.js → 4_message.js} +14 -24
  68. package/{script/types/4_callback_query.d.ts → esm/types/5_callback_query.d.ts} +1 -1
  69. package/esm/types/{4_chat.d.ts → 5_chat.d.ts} +3 -3
  70. package/esm/types/{4_chat.js → 5_chat.js} +2 -2
  71. package/esm/types/6_update.d.ts +134 -0
  72. package/esm/types/6_update.js +1 -0
  73. package/package.json +1 -1
  74. package/script/3_errors.d.ts +519 -510
  75. package/script/3_errors.js +533 -520
  76. package/script/3_types.d.ts +16 -7
  77. package/script/3_types.js +16 -7
  78. package/script/4_constants.d.ts +1 -1
  79. package/script/4_constants.js +1 -1
  80. package/script/4_errors.d.ts +7 -12
  81. package/script/4_errors.js +5 -6
  82. package/script/5_client.d.ts +3 -3
  83. package/script/5_client.js +3 -3
  84. package/script/client/0_utilities.d.ts +28 -0
  85. package/script/client/0_utilities.js +12 -1
  86. package/script/client/1_composer.d.ts +30 -0
  87. package/script/client/{4_composer.js → 1_composer.js} +5 -4
  88. package/script/client/2_client_plain.d.ts +1 -1
  89. package/script/client/2_client_plain.js +2 -2
  90. package/{esm/client/3_types.d.ts → script/client/3_params.d.ts} +68 -177
  91. package/script/client/3_params.js +2 -0
  92. package/script/client/{5_client.d.ts → 4_client.d.ts} +57 -25
  93. package/script/client/{5_client.js → 4_client.js} +353 -166
  94. package/script/client/5_composer.d.ts +4 -0
  95. package/script/client/{6_composer.js → 5_composer.js} +2 -2
  96. package/script/storage/0_storage.d.ts +4 -1
  97. package/script/storage/0_storage.js +36 -7
  98. package/script/storage/1_storage_indexed_db.d.ts +6 -2
  99. package/script/storage/1_storage_indexed_db.js +7 -5
  100. package/script/storage/1_storage_local_storage.d.ts +1 -1
  101. package/script/storage/1_storage_local_storage.js +1 -1
  102. package/script/storage/1_storage_memory.d.ts +1 -1
  103. package/script/storage/1_storage_memory.js +1 -1
  104. package/script/storage/1_storage_session_storage.d.ts +1 -1
  105. package/script/storage/1_storage_session_storage.js +1 -1
  106. package/script/tl/3_utilities.d.ts +1 -0
  107. package/script/tl/3_utilities.js +16 -1
  108. package/script/tl/6_message.js +1 -1
  109. package/script/types/0_authorization_state.d.ts +5 -0
  110. package/script/types/0_authorization_state.js +2 -0
  111. package/script/types/0_connection_state.d.ts +17 -0
  112. package/script/types/0_connection_state.js +2 -0
  113. package/script/types/0_login_url.d.ts +0 -4
  114. package/script/types/0_mask_position.d.ts +0 -4
  115. package/script/types/0_message_entity.d.ts +0 -2
  116. package/script/types/0_message_identifier.d.ts +4 -0
  117. package/script/types/0_message_identifier.js +2 -0
  118. package/script/types/0_network_statistics_entry.d.ts +4 -0
  119. package/script/types/0_network_statistics_entry.js +2 -0
  120. package/script/types/0_reaction.d.ts +1 -0
  121. package/script/types/0_reaction.js +15 -1
  122. package/script/types/1__getters.d.ts +3 -0
  123. package/script/types/1_chat_p.d.ts +1 -0
  124. package/script/types/1_keyboard_button.d.ts +1 -23
  125. package/script/types/1_network_statistics.d.ts +5 -0
  126. package/script/types/1_network_statistics.js +2 -0
  127. package/script/types/1_poll.d.ts +0 -13
  128. package/script/types/1_reaction_count.d.ts +7 -0
  129. package/script/types/1_reaction_count.js +10 -0
  130. package/script/types/2_game.d.ts +0 -7
  131. package/script/types/2_inline_keyboard_button.d.ts +0 -8
  132. package/script/types/2_inline_query.d.ts +0 -6
  133. package/script/types/2_message_interactions.d.ts +8 -0
  134. package/script/types/2_message_interactions.js +2 -0
  135. package/script/types/2_message_reaction_count.d.ts +8 -0
  136. package/script/types/2_message_reaction_count.js +2 -0
  137. package/script/types/2_reply_keyboard_markup.d.ts +0 -7
  138. package/script/types/3_inline_keyboard_markup.d.ts +0 -2
  139. package/{esm/types/3_message.d.ts → script/types/4_message.d.ts} +225 -7
  140. package/script/types/{3_message.js → 4_message.js} +15 -25
  141. package/{esm/types/4_callback_query.d.ts → script/types/5_callback_query.d.ts} +1 -1
  142. package/script/types/{4_chat.d.ts → 5_chat.d.ts} +3 -3
  143. package/script/types/{4_chat.js → 5_chat.js} +3 -3
  144. package/script/types/6_update.d.ts +134 -0
  145. package/script/types/6_update.js +2 -0
  146. package/esm/client/3_types.js +0 -11
  147. package/esm/client/4_composer.d.ts +0 -31
  148. package/esm/client/6_composer.d.ts +0 -4
  149. package/esm/client/6_composer.js +0 -3
  150. package/script/client/3_types.js +0 -15
  151. package/script/client/4_composer.d.ts +0 -31
  152. package/script/client/6_composer.d.ts +0 -4
  153. /package/esm/client/{1_client_abstract.d.ts → 0_client_abstract.d.ts} +0 -0
  154. /package/esm/client/{1_client_abstract.js → 0_client_abstract.js} +0 -0
  155. /package/esm/types/{0_audio.d.ts → 1_audio.d.ts} +0 -0
  156. /package/esm/types/{0_audio.js → 1_audio.js} +0 -0
  157. /package/esm/types/{4_callback_query.js → 5_callback_query.js} +0 -0
  158. /package/script/client/{1_client_abstract.d.ts → 0_client_abstract.d.ts} +0 -0
  159. /package/script/client/{1_client_abstract.js → 0_client_abstract.js} +0 -0
  160. /package/script/types/{0_audio.d.ts → 1_audio.d.ts} +0 -0
  161. /package/script/types/{0_audio.js → 1_audio.js} +0 -0
  162. /package/script/types/{4_callback_query.js → 5_callback_query.js} +0 -0
@@ -1,9 +1,9 @@
1
1
  import { enums, types } from "../2_tl.js";
2
- import { ChatPChannel, ChatPGroup, ChatPPrivate, ChatPSupergroup } from "./1_chat_p.js";
3
2
  import { ChatPhotoChat, ChatPhotoUser } from "./0_chat_photo.js";
4
- import { Message, MessageGetter } from "./3_message.js";
5
- import { StickerSetNameGetter } from "./1_sticker.js";
6
3
  import { EntityGetter } from "./1__getters.js";
4
+ import { ChatPChannel, ChatPGroup, ChatPPrivate, ChatPSupergroup } from "./1_chat_p.js";
5
+ import { StickerSetNameGetter } from "./1_sticker.js";
6
+ import { Message, MessageGetter } from "./4_message.js";
7
7
  /** @unlisted */
8
8
  export interface ChatBase {
9
9
  order: string;
@@ -1,8 +1,8 @@
1
1
  import { cleanObject, UNREACHABLE } from "../1_utilities.js";
2
2
  import { chatIdToPeer, peerToChatId, types } from "../2_tl.js";
3
- import { constructChatP } from "./1_chat_p.js";
4
3
  import { constructChatPhoto } from "./0_chat_photo.js";
5
- import { constructMessage } from "./3_message.js";
4
+ import { constructChatP } from "./1_chat_p.js";
5
+ import { constructMessage } from "./4_message.js";
6
6
  function getChatPAlsoPhoto(entity) {
7
7
  let chatP;
8
8
  let also = undefined;
@@ -0,0 +1,134 @@
1
+ import { AuthorizationState } from "./0_authorization_state.js";
2
+ import { ConnectionState } from "./0_connection_state.js";
3
+ import { MessageIdentifier } from "./0_message_identifier.js";
4
+ import { ChosenInlineResult } from "./2_chosen_inline_result.js";
5
+ import { InlineQuery } from "./2_inline_query.js";
6
+ import { MessageInteractions } from "./2_message_interactions.js";
7
+ import { MessageReactionCount } from "./2_message_reaction_count.js";
8
+ import { Message } from "./4_message.js";
9
+ import { CallbackQuery } from "./5_callback_query.js";
10
+ import { Chat } from "./5_chat.js";
11
+ /**
12
+ * The client's connection state was changed.
13
+ * @unlisted
14
+ */
15
+ export interface UpdateConnectionState {
16
+ /** The client's new connection state. */
17
+ connectionState: ConnectionState;
18
+ }
19
+ /**
20
+ * The client's authorization state was changed.
21
+ * @unlisted
22
+ */
23
+ export interface UpdateAuthorizationState {
24
+ /** The client's new authorization state. */
25
+ authorizationState: AuthorizationState;
26
+ }
27
+ /**
28
+ * A message was sent or received.
29
+ * @unlisted
30
+ */
31
+ export interface UpdateNewMessage {
32
+ /** The sent or received message. */
33
+ message: Message;
34
+ }
35
+ /**
36
+ * A message was edited.
37
+ * @unlisted
38
+ */
39
+ export interface UpdateEditedMessage {
40
+ /** The edited message. */
41
+ editedMessage: Message;
42
+ }
43
+ /**
44
+ * One or more messages were deleted.
45
+ * @unlisted
46
+ */
47
+ export interface UpdateDeletedMessages {
48
+ /** The deleted messages. */
49
+ deletedMessages: MessageIdentifier[];
50
+ }
51
+ /**
52
+ * A callback query was received. Bot-only.
53
+ * @unlisted
54
+ */
55
+ export interface UpdateCallbackQuery {
56
+ /** The received callback query. */
57
+ callbackQuery: CallbackQuery;
58
+ }
59
+ /**
60
+ * An inline query was received. Bot-only.
61
+ * @unlisted
62
+ */
63
+ export interface UpdateInlineQuery {
64
+ /** The received inline query. */
65
+ inlineQuery: InlineQuery;
66
+ }
67
+ /**
68
+ * An inline result was chosen. Bot-only.
69
+ * @unlisted
70
+ */
71
+ export interface UpdateChosenInlineResult {
72
+ /** The chosen inline result. */
73
+ chosenInlineResult: ChosenInlineResult;
74
+ }
75
+ /**
76
+ * A new chat was added. User-only.
77
+ * @unlisted
78
+ */
79
+ export interface UpdateNewChat {
80
+ /** The newly added chat. */
81
+ newChat: Chat;
82
+ }
83
+ /**
84
+ * A chat was deleted. User-only.
85
+ * @unlisted
86
+ */
87
+ export interface UpdateEditedChat {
88
+ editedChat: Chat;
89
+ }
90
+ /**
91
+ * A chat was deleted. User-only.
92
+ * @unlisted
93
+ */
94
+ export interface UpdateDeletedChat {
95
+ /** The chat that was deleted. */
96
+ deletedChat: {
97
+ chatId: number;
98
+ };
99
+ }
100
+ /**
101
+ * The interactions of a message were updated. User-only.
102
+ * @unlisted
103
+ */
104
+ export interface UpdateMessageInteractions {
105
+ /** The new message interactions. */
106
+ messageInteractions: MessageInteractions;
107
+ }
108
+ /**
109
+ * The anonymous reactions made to a message were changed. Bot-only.
110
+ * @unlisted
111
+ */
112
+ export interface UpdateMessageReactionCount {
113
+ /** The new message reactions. */
114
+ messageReactionCount: MessageReactionCount;
115
+ }
116
+ /** @unlisted */
117
+ export interface UpdateMap {
118
+ message: UpdateNewMessage;
119
+ editedMessage: UpdateEditedMessage;
120
+ connectionState: UpdateConnectionState;
121
+ authorizationState: UpdateAuthorizationState;
122
+ deletedMessages: UpdateDeletedMessages;
123
+ callbackQuery: UpdateCallbackQuery;
124
+ inlineQuery: UpdateInlineQuery;
125
+ chosenInlineResult: UpdateChosenInlineResult;
126
+ newChat: UpdateNewChat;
127
+ editedChat: UpdateEditedChat;
128
+ deletedChat: UpdateDeletedChat;
129
+ messageInteractions: UpdateMessageInteractions;
130
+ messageReactionCount: UpdateMessageReactionCount;
131
+ }
132
+ /** @unlisted */
133
+ export type UpdateIntersection<T> = T & Partial<UpdateConnectionState & UpdateAuthorizationState & UpdateNewMessage & UpdateEditedMessage & UpdateDeletedMessages & UpdateCallbackQuery & UpdateInlineQuery & UpdateChosenInlineResult & UpdateNewChat & UpdateEditedChat & UpdateDeletedChat & UpdateMessageInteractions & UpdateMessageReactionCount>;
134
+ export type Update = UpdateConnectionState | UpdateAuthorizationState | UpdateNewMessage | UpdateEditedMessage | UpdateDeletedMessages | UpdateCallbackQuery | UpdateInlineQuery | UpdateChosenInlineResult | UpdateNewChat | UpdateEditedChat | UpdateDeletedChat | UpdateMessageInteractions | UpdateMessageReactionCount;
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mtkruto/node",
3
- "version": "0.1.133",
3
+ "version": "0.1.134",
4
4
  "description": "MTKruto for Node.js",
5
5
  "author": "Roj <rojvv@icloud.com>",
6
6
  "repository": {