@mtkruto/node 0.1.133 → 0.1.135
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/3_errors.d.ts +519 -510
- package/esm/3_errors.js +521 -509
- package/esm/3_types.d.ts +16 -7
- package/esm/3_types.js +16 -7
- package/esm/4_constants.d.ts +1 -1
- package/esm/4_constants.js +1 -1
- package/esm/4_errors.d.ts +7 -12
- package/esm/4_errors.js +6 -7
- package/esm/5_client.d.ts +3 -3
- package/esm/5_client.js +3 -3
- package/esm/client/0_utilities.d.ts +28 -0
- package/esm/client/0_utilities.js +10 -0
- package/esm/client/1_composer.d.ts +30 -0
- package/esm/client/{4_composer.js → 1_composer.js} +3 -2
- package/esm/client/2_client_plain.d.ts +1 -1
- package/esm/client/2_client_plain.js +1 -1
- package/{script/client/3_types.d.ts → esm/client/3_params.d.ts} +68 -177
- package/esm/client/3_params.js +1 -0
- package/esm/client/{5_client.d.ts → 4_client.d.ts} +57 -25
- package/esm/client/{5_client.js → 4_client.js} +347 -160
- package/esm/client/5_composer.d.ts +4 -0
- package/esm/client/5_composer.js +3 -0
- package/esm/storage/0_storage.d.ts +4 -1
- package/esm/storage/0_storage.js +36 -7
- package/esm/storage/1_storage_indexed_db.d.ts +6 -2
- package/esm/storage/1_storage_indexed_db.js +7 -5
- package/esm/storage/1_storage_local_storage.d.ts +1 -1
- package/esm/storage/1_storage_local_storage.js +1 -1
- package/esm/storage/1_storage_memory.d.ts +1 -1
- package/esm/storage/1_storage_memory.js +1 -1
- package/esm/storage/1_storage_session_storage.d.ts +1 -1
- package/esm/storage/1_storage_session_storage.js +1 -1
- package/esm/tl/3_utilities.d.ts +1 -0
- package/esm/tl/3_utilities.js +14 -0
- package/esm/tl/6_message.js +1 -1
- package/esm/types/0_authorization_state.d.ts +5 -0
- package/esm/types/0_authorization_state.js +1 -0
- package/esm/types/0_connection_state.d.ts +17 -0
- package/esm/types/0_connection_state.js +1 -0
- package/esm/types/0_login_url.d.ts +0 -4
- package/esm/types/0_mask_position.d.ts +0 -4
- package/esm/types/0_message_entity.d.ts +0 -2
- package/esm/types/0_message_identifier.d.ts +4 -0
- package/esm/types/0_message_identifier.js +1 -0
- package/esm/types/0_network_statistics_entry.d.ts +4 -0
- package/esm/types/0_network_statistics_entry.js +1 -0
- package/esm/types/0_reaction.d.ts +1 -0
- package/esm/types/0_reaction.js +13 -0
- package/esm/types/1__getters.d.ts +3 -0
- package/esm/types/1_chat_p.d.ts +1 -0
- package/esm/types/1_keyboard_button.d.ts +1 -23
- package/esm/types/1_network_statistics.d.ts +5 -0
- package/esm/types/1_network_statistics.js +1 -0
- package/esm/types/1_poll.d.ts +0 -13
- package/esm/types/1_reaction_count.d.ts +7 -0
- package/esm/types/1_reaction_count.js +6 -0
- package/esm/types/2_game.d.ts +0 -7
- package/esm/types/2_inline_keyboard_button.d.ts +0 -8
- package/esm/types/2_inline_query.d.ts +0 -6
- package/esm/types/2_message_interactions.d.ts +8 -0
- package/esm/types/2_message_interactions.js +1 -0
- package/esm/types/2_message_reaction_count.d.ts +8 -0
- package/esm/types/2_message_reaction_count.js +1 -0
- package/esm/types/2_reply_keyboard_markup.d.ts +0 -7
- package/esm/types/3_inline_keyboard_markup.d.ts +0 -2
- package/{script/types/3_message.d.ts → esm/types/4_message.d.ts} +225 -7
- package/esm/types/{3_message.js → 4_message.js} +14 -24
- package/{script/types/4_callback_query.d.ts → esm/types/5_callback_query.d.ts} +1 -1
- package/esm/types/{4_chat.d.ts → 5_chat.d.ts} +3 -3
- package/esm/types/{4_chat.js → 5_chat.js} +2 -2
- package/esm/types/6_update.d.ts +134 -0
- package/esm/types/6_update.js +1 -0
- package/package.json +1 -1
- package/script/3_errors.d.ts +519 -510
- package/script/3_errors.js +533 -520
- package/script/3_types.d.ts +16 -7
- package/script/3_types.js +16 -7
- package/script/4_constants.d.ts +1 -1
- package/script/4_constants.js +1 -1
- package/script/4_errors.d.ts +7 -12
- package/script/4_errors.js +5 -6
- package/script/5_client.d.ts +3 -3
- package/script/5_client.js +3 -3
- package/script/client/0_utilities.d.ts +28 -0
- package/script/client/0_utilities.js +12 -1
- package/script/client/1_composer.d.ts +30 -0
- package/script/client/{4_composer.js → 1_composer.js} +5 -4
- package/script/client/2_client_plain.d.ts +1 -1
- package/script/client/2_client_plain.js +2 -2
- package/{esm/client/3_types.d.ts → script/client/3_params.d.ts} +68 -177
- package/script/client/3_params.js +2 -0
- package/script/client/{5_client.d.ts → 4_client.d.ts} +57 -25
- package/script/client/{5_client.js → 4_client.js} +353 -166
- package/script/client/5_composer.d.ts +4 -0
- package/script/client/{6_composer.js → 5_composer.js} +2 -2
- package/script/storage/0_storage.d.ts +4 -1
- package/script/storage/0_storage.js +36 -7
- package/script/storage/1_storage_indexed_db.d.ts +6 -2
- package/script/storage/1_storage_indexed_db.js +7 -5
- package/script/storage/1_storage_local_storage.d.ts +1 -1
- package/script/storage/1_storage_local_storage.js +1 -1
- package/script/storage/1_storage_memory.d.ts +1 -1
- package/script/storage/1_storage_memory.js +1 -1
- package/script/storage/1_storage_session_storage.d.ts +1 -1
- package/script/storage/1_storage_session_storage.js +1 -1
- package/script/tl/3_utilities.d.ts +1 -0
- package/script/tl/3_utilities.js +16 -1
- package/script/tl/6_message.js +1 -1
- package/script/types/0_authorization_state.d.ts +5 -0
- package/script/types/0_authorization_state.js +2 -0
- package/script/types/0_connection_state.d.ts +17 -0
- package/script/types/0_connection_state.js +2 -0
- package/script/types/0_login_url.d.ts +0 -4
- package/script/types/0_mask_position.d.ts +0 -4
- package/script/types/0_message_entity.d.ts +0 -2
- package/script/types/0_message_identifier.d.ts +4 -0
- package/script/types/0_message_identifier.js +2 -0
- package/script/types/0_network_statistics_entry.d.ts +4 -0
- package/script/types/0_network_statistics_entry.js +2 -0
- package/script/types/0_reaction.d.ts +1 -0
- package/script/types/0_reaction.js +15 -1
- package/script/types/1__getters.d.ts +3 -0
- package/script/types/1_chat_p.d.ts +1 -0
- package/script/types/1_keyboard_button.d.ts +1 -23
- package/script/types/1_network_statistics.d.ts +5 -0
- package/script/types/1_network_statistics.js +2 -0
- package/script/types/1_poll.d.ts +0 -13
- package/script/types/1_reaction_count.d.ts +7 -0
- package/script/types/1_reaction_count.js +10 -0
- package/script/types/2_game.d.ts +0 -7
- package/script/types/2_inline_keyboard_button.d.ts +0 -8
- package/script/types/2_inline_query.d.ts +0 -6
- package/script/types/2_message_interactions.d.ts +8 -0
- package/script/types/2_message_interactions.js +2 -0
- package/script/types/2_message_reaction_count.d.ts +8 -0
- package/script/types/2_message_reaction_count.js +2 -0
- package/script/types/2_reply_keyboard_markup.d.ts +0 -7
- package/script/types/3_inline_keyboard_markup.d.ts +0 -2
- package/{esm/types/3_message.d.ts → script/types/4_message.d.ts} +225 -7
- package/script/types/{3_message.js → 4_message.js} +15 -25
- package/{esm/types/4_callback_query.d.ts → script/types/5_callback_query.d.ts} +1 -1
- package/script/types/{4_chat.d.ts → 5_chat.d.ts} +3 -3
- package/script/types/{4_chat.js → 5_chat.js} +3 -3
- package/script/types/6_update.d.ts +134 -0
- package/script/types/6_update.js +2 -0
- package/esm/client/3_types.js +0 -11
- package/esm/client/4_composer.d.ts +0 -31
- package/esm/client/6_composer.d.ts +0 -4
- package/esm/client/6_composer.js +0 -3
- package/script/client/3_types.js +0 -15
- package/script/client/4_composer.d.ts +0 -31
- package/script/client/6_composer.d.ts +0 -4
- /package/esm/client/{1_client_abstract.d.ts → 0_client_abstract.d.ts} +0 -0
- /package/esm/client/{1_client_abstract.js → 0_client_abstract.js} +0 -0
- /package/esm/types/{0_audio.d.ts → 1_audio.d.ts} +0 -0
- /package/esm/types/{0_audio.js → 1_audio.js} +0 -0
- /package/esm/types/{4_callback_query.js → 5_callback_query.js} +0 -0
- /package/script/client/{1_client_abstract.d.ts → 0_client_abstract.d.ts} +0 -0
- /package/script/client/{1_client_abstract.js → 0_client_abstract.js} +0 -0
- /package/script/types/{0_audio.d.ts → 1_audio.d.ts} +0 -0
- /package/script/types/{0_audio.js → 1_audio.js} +0 -0
- /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 {
|
|
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 {};
|