@telegram.ts/types 1.8.0 → 1.10.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.
- package/package.json +1 -1
- package/src/apiMethodsTypes.d.ts +130 -65
- package/src/inlineTypes.d.ts +30 -14
- package/src/invoiceTypes.d.ts +3 -3
- package/src/manageTypes.d.ts +415 -143
- package/src/markupTypes.d.ts +14 -14
- package/src/messageTypes.d.ts +158 -9
- package/src/updateTypes.d.ts +1 -1
package/src/manageTypes.d.ts
CHANGED
|
@@ -64,189 +64,450 @@ export interface UserFromGetMe extends User {
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
export declare namespace Chat {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
interface AbstractChat {
|
|
67
|
+
/** Internal type for private chats */
|
|
68
|
+
export interface PrivateChat {
|
|
70
69
|
/** Unique identifier for this chat. */
|
|
71
70
|
id: number;
|
|
72
|
-
/** Type of chat, can be either “private”, “group”, “supergroup” or “channel” */
|
|
73
|
-
type:
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
// HELPERS
|
|
77
|
-
/** Internal type holding properties that those chats with user names share. */
|
|
78
|
-
interface UserNameChat {
|
|
71
|
+
/** Type of the chat, can be either “private”, “group”, “supergroup” or “channel” */
|
|
72
|
+
type: "private";
|
|
73
|
+
/** Title, for supergroups, channels and group chats */
|
|
74
|
+
title?: undefined;
|
|
79
75
|
/** Username, for private chats, supergroups and channels if available */
|
|
80
76
|
username?: string;
|
|
81
|
-
}
|
|
82
|
-
/** Internal type holding properties that those chats with titles share. */
|
|
83
|
-
interface TitleChat {
|
|
84
|
-
/** Title, for supergroups, channels and group chats */
|
|
85
|
-
title: string;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
// ==> CHATS
|
|
89
|
-
/** Internal type representing private chats. */
|
|
90
|
-
export interface PrivateChat extends AbstractChat, UserNameChat {
|
|
91
|
-
type: "private";
|
|
92
77
|
/** First name of the other party in a private chat */
|
|
93
78
|
first_name: string;
|
|
94
79
|
/** Last name of the other party in a private chat */
|
|
95
80
|
last_name?: string;
|
|
81
|
+
/** True, if the supergroup chat is a forum (has topics enabled) */
|
|
82
|
+
is_forum?: undefined;
|
|
96
83
|
}
|
|
97
|
-
/** Internal type
|
|
98
|
-
export interface GroupChat
|
|
84
|
+
/** Internal type for group chats */
|
|
85
|
+
export interface GroupChat {
|
|
86
|
+
/** Unique identifier for this chat. */
|
|
87
|
+
id: number;
|
|
88
|
+
/** Type of the chat, can be either “private”, “group”, “supergroup” or “channel” */
|
|
99
89
|
type: "group";
|
|
90
|
+
/** Title, for supergroups, channels and group chats */
|
|
91
|
+
title: string;
|
|
92
|
+
/** Username, for private chats, supergroups and channels if available */
|
|
93
|
+
username?: undefined;
|
|
94
|
+
/** First name of the other party in a private chat */
|
|
95
|
+
first_name?: undefined;
|
|
96
|
+
/** Last name of the other party in a private chat */
|
|
97
|
+
last_name?: undefined;
|
|
98
|
+
/** True, if the supergroup chat is a forum (has topics enabled) */
|
|
99
|
+
is_forum?: undefined;
|
|
100
100
|
}
|
|
101
|
-
/** Internal type
|
|
102
|
-
export interface SupergroupChat
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
101
|
+
/** Internal type for supergroup chats */
|
|
102
|
+
export interface SupergroupChat {
|
|
103
|
+
/** Unique identifier for this chat. */
|
|
104
|
+
id: number;
|
|
105
|
+
/** Type of the chat, can be either “private”, “group”, “supergroup” or “channel” */
|
|
106
106
|
type: "supergroup";
|
|
107
|
+
/** Title, for supergroups, channels and group chats */
|
|
108
|
+
title: string;
|
|
109
|
+
/** Username, for private chats, supergroups and channels if available */
|
|
110
|
+
username?: string;
|
|
111
|
+
/** First name of the other party in a private chat */
|
|
112
|
+
first_name?: undefined;
|
|
113
|
+
/** Last name of the other party in a private chat */
|
|
114
|
+
last_name?: undefined;
|
|
107
115
|
/** True, if the supergroup chat is a forum (has topics enabled) */
|
|
108
116
|
is_forum?: true;
|
|
109
117
|
}
|
|
110
|
-
/** Internal type
|
|
111
|
-
export interface ChannelChat
|
|
118
|
+
/** Internal type for channel chats */
|
|
119
|
+
export interface ChannelChat {
|
|
120
|
+
/** Unique identifier for this chat. */
|
|
121
|
+
id: number;
|
|
122
|
+
/** Type of the chat, can be either “private”, “group”, “supergroup” or “channel” */
|
|
112
123
|
type: "channel";
|
|
124
|
+
/** Title, for supergroups, channels and group chats */
|
|
125
|
+
title: string;
|
|
126
|
+
/** Username, for private chats, supergroups and channels if available */
|
|
127
|
+
username?: string;
|
|
128
|
+
/** First name of the other party in a private chat */
|
|
129
|
+
first_name?: undefined;
|
|
130
|
+
/** Last name of the other party in a private chat */
|
|
131
|
+
last_name?: undefined;
|
|
132
|
+
/** True, if the supergroup chat is a forum (has topics enabled) */
|
|
133
|
+
is_forum?: undefined;
|
|
113
134
|
}
|
|
135
|
+
}
|
|
114
136
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
137
|
+
/** This object represents a chat. */
|
|
138
|
+
export type Chat =
|
|
139
|
+
| Chat.PrivateChat
|
|
140
|
+
| Chat.GroupChat
|
|
141
|
+
| Chat.SupergroupChat
|
|
142
|
+
| Chat.ChannelChat;
|
|
143
|
+
|
|
144
|
+
export declare namespace ChatFullInfo {
|
|
145
|
+
/** Internal type for private chats */
|
|
146
|
+
export interface PrivateChat {
|
|
147
|
+
/** Unique identifier for this chat. */
|
|
148
|
+
id: number;
|
|
149
|
+
/** Type of the chat, can be either “private”, “group”, “supergroup” or “channel” */
|
|
150
|
+
type: "private";
|
|
151
|
+
/** Title, for supergroups, channels and group chats */
|
|
152
|
+
title?: undefined;
|
|
153
|
+
/** Username, for private chats, supergroups and channels if available */
|
|
154
|
+
username?: string;
|
|
155
|
+
/** First name of the other party in a private chat */
|
|
156
|
+
first_name: string;
|
|
157
|
+
/** Last name of the other party in a private chat */
|
|
158
|
+
last_name?: string;
|
|
159
|
+
/** True, if the supergroup chat is a forum (has topics enabled) */
|
|
160
|
+
is_forum?: undefined;
|
|
161
|
+
/** Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details. */
|
|
162
|
+
accent_color_id: number;
|
|
163
|
+
/** The maximum number of reactions that can be set on a message in the chat */
|
|
164
|
+
max_reaction_count: number;
|
|
165
|
+
/** Chat photo */
|
|
119
166
|
photo?: ChatPhoto;
|
|
120
|
-
/**
|
|
167
|
+
/** If non-empty, the list of all active chat usernames; for private chats, supergroups and channels */
|
|
168
|
+
active_usernames?: string[];
|
|
169
|
+
/** For private chats, the date of birth of the user */
|
|
170
|
+
birthdate?: Birthdate;
|
|
171
|
+
/** For private chats with business accounts, the intro of the business */
|
|
172
|
+
business_intro?: BusinessIntro;
|
|
173
|
+
/** For private chats with business accounts, the location of the business */
|
|
174
|
+
business_location?: BusinessLocation;
|
|
175
|
+
/** For private chats with business accounts, the opening hours of the business */
|
|
176
|
+
business_opening_hours?: BusinessOpeningHours;
|
|
177
|
+
/** For private chats, the personal channel of the user */
|
|
178
|
+
personal_chat?: Chat;
|
|
179
|
+
/** List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed. */
|
|
180
|
+
available_reactions?: ReactionType[];
|
|
181
|
+
/** Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background */
|
|
182
|
+
background_custom_emoji_id?: string;
|
|
183
|
+
/** Identifier of the accent color for the chat's profile background. See profile accent colors for more details. */
|
|
184
|
+
profile_accent_color_id?: number;
|
|
185
|
+
/** Custom emoji identifier of the emoji chosen by the chat for its profile background */
|
|
186
|
+
profile_background_custom_emoji_id?: string;
|
|
187
|
+
/** Custom emoji identifier of the emoji status of the chat or the other party in a private chat */
|
|
188
|
+
emoji_status_custom_emoji_id?: string;
|
|
189
|
+
/** Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any */
|
|
190
|
+
emoji_status_expiration_date?: number;
|
|
191
|
+
/** Bio of the other party in a private chat */
|
|
192
|
+
bio?: string;
|
|
193
|
+
/** True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user */
|
|
194
|
+
has_private_forwards?: true;
|
|
195
|
+
/** True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat */
|
|
196
|
+
has_restricted_voice_and_video_messages?: true;
|
|
197
|
+
/** True, if users need to join the supergroup before they can send messages */
|
|
198
|
+
join_to_send_messages?: undefined;
|
|
199
|
+
/** True, if all users directly joining the supergroup without using an invite link need to be approved by supergroup administrators */
|
|
200
|
+
join_by_request?: undefined;
|
|
201
|
+
/** Description, for groups, supergroups and channel chats */
|
|
202
|
+
description?: undefined;
|
|
203
|
+
/** Primary invite link, for groups, supergroups and channel chats */
|
|
204
|
+
invite_link?: undefined;
|
|
205
|
+
/** The most recent pinned message (by sending date) */
|
|
121
206
|
pinned_message?: Message;
|
|
122
|
-
/**
|
|
207
|
+
/** Default chat member permissions, for groups and supergroups */
|
|
208
|
+
permissions?: undefined;
|
|
209
|
+
/** For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds */
|
|
210
|
+
slow_mode_delay?: undefined;
|
|
211
|
+
/** For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions */
|
|
212
|
+
unrestrict_boost_count?: undefined;
|
|
213
|
+
/** The time after which all messages sent to the chat will be automatically deleted; in seconds */
|
|
123
214
|
message_auto_delete_time?: number;
|
|
124
|
-
/** True, if
|
|
215
|
+
/** True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. */
|
|
216
|
+
has_aggressive_anti_spam_enabled?: undefined;
|
|
217
|
+
/** True, if non-administrators can only get the list of bots and administrators in the chat */
|
|
218
|
+
has_hidden_members?: undefined;
|
|
219
|
+
/** True, if messages from the chat can't be forwarded to other chats */
|
|
125
220
|
has_protected_content?: true;
|
|
221
|
+
/** True, if new chat members will have access to old messages; available only to chat administrators */
|
|
222
|
+
has_visible_history?: undefined;
|
|
223
|
+
/** For supergroups, name of the group sticker set */
|
|
224
|
+
sticker_set_name?: undefined;
|
|
225
|
+
/** True, if the bot can change the group sticker set */
|
|
226
|
+
can_set_sticker_set?: undefined;
|
|
227
|
+
/** For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group. */
|
|
228
|
+
custom_emoji_sticker_set_name?: undefined;
|
|
229
|
+
/** Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. */
|
|
230
|
+
linked_chat_id?: undefined;
|
|
231
|
+
/** For supergroups, the location to which the supergroup is connected */
|
|
232
|
+
location?: undefined;
|
|
126
233
|
}
|
|
127
|
-
/** Internal type
|
|
128
|
-
interface
|
|
129
|
-
/**
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
234
|
+
/** Internal type for group chats */
|
|
235
|
+
export interface GroupChat {
|
|
236
|
+
/** Unique identifier for this chat. */
|
|
237
|
+
id: number;
|
|
238
|
+
/** Type of the chat, can be either “private”, “group”, “supergroup” or “channel” */
|
|
239
|
+
type: "group";
|
|
240
|
+
/** Title, for supergroups, channels and group chats */
|
|
241
|
+
title?: string;
|
|
242
|
+
/** Username, for private chats, supergroups and channels if available */
|
|
243
|
+
username?: undefined;
|
|
244
|
+
/** First name of the other party in a private chat */
|
|
245
|
+
first_name?: undefined;
|
|
246
|
+
/** Last name of the other party in a private chat */
|
|
247
|
+
last_name?: undefined;
|
|
248
|
+
/** True, if the supergroup chat is a forum (has topics enabled) */
|
|
249
|
+
is_forum?: undefined;
|
|
250
|
+
/** Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details. */
|
|
251
|
+
accent_color_id: number;
|
|
252
|
+
/** The maximum number of reactions that can be set on a message in the chat */
|
|
253
|
+
max_reaction_count: number;
|
|
254
|
+
/** Chat photo */
|
|
255
|
+
photo?: ChatPhoto;
|
|
256
|
+
/** If non-empty, the list of all active chat usernames; for private chats, supergroups and channels */
|
|
257
|
+
active_usernames?: undefined;
|
|
258
|
+
/** For private chats, the date of birth of the user */
|
|
259
|
+
birthdate?: undefined;
|
|
260
|
+
/** For private chats with business accounts, the intro of the business */
|
|
261
|
+
business_intro?: undefined;
|
|
262
|
+
/** For private chats with business accounts, the location of the business */
|
|
263
|
+
business_location?: undefined;
|
|
264
|
+
/** For private chats with business accounts, the opening hours of the business */
|
|
265
|
+
business_opening_hours?: undefined;
|
|
266
|
+
/** For private chats, the personal channel of the user */
|
|
267
|
+
personal_chat?: undefined;
|
|
268
|
+
/** List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed. */
|
|
269
|
+
available_reactions?: ReactionType[];
|
|
270
|
+
/** Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background */
|
|
271
|
+
background_custom_emoji_id?: string;
|
|
272
|
+
/** Identifier of the accent color for the chat's profile background. See profile accent colors for more details. */
|
|
273
|
+
profile_accent_color_id?: number;
|
|
274
|
+
/** Custom emoji identifier of the emoji chosen by the chat for its profile background */
|
|
275
|
+
profile_background_custom_emoji_id?: string;
|
|
276
|
+
/** Custom emoji identifier of the emoji status of the chat or the other party in a private chat */
|
|
277
|
+
emoji_status_custom_emoji_id?: string;
|
|
278
|
+
/** Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any */
|
|
279
|
+
emoji_status_expiration_date?: number;
|
|
280
|
+
/** Bio of the other party in a private chat */
|
|
281
|
+
bio?: undefined;
|
|
282
|
+
/** True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user */
|
|
283
|
+
has_private_forwards?: undefined;
|
|
284
|
+
/** True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat */
|
|
285
|
+
has_restricted_voice_and_video_messages?: undefined;
|
|
286
|
+
/** True, if users need to join the supergroup before they can send messages */
|
|
287
|
+
join_to_send_messages?: undefined;
|
|
288
|
+
/** True, if all users directly joining the supergroup without using an invite link need to be approved by supergroup administrators */
|
|
289
|
+
join_by_request?: undefined;
|
|
290
|
+
/** Description, for groups, supergroups and channel chats */
|
|
135
291
|
description?: string;
|
|
136
|
-
/**
|
|
292
|
+
/** Primary invite link, for groups, supergroups and channel chats */
|
|
137
293
|
invite_link?: string;
|
|
138
|
-
/**
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
/** Internal type holding properties that those group and supergroup chats returned from `getChat` share. */
|
|
142
|
-
interface MultiUserGetChat {
|
|
143
|
-
/** Default chat member permissions, for groups and supergroups. Returned only in getChat. */
|
|
294
|
+
/** The most recent pinned message (by sending date) */
|
|
295
|
+
pinned_message?: Message;
|
|
296
|
+
/** Default chat member permissions, for groups and supergroups */
|
|
144
297
|
permissions?: ChatPermissions;
|
|
298
|
+
/** For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds */
|
|
299
|
+
slow_mode_delay?: undefined;
|
|
300
|
+
/** For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions */
|
|
301
|
+
unrestrict_boost_count?: undefined;
|
|
302
|
+
/** The time after which all messages sent to the chat will be automatically deleted; in seconds */
|
|
303
|
+
message_auto_delete_time?: number;
|
|
304
|
+
/** True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. */
|
|
305
|
+
has_aggressive_anti_spam_enabled?: undefined;
|
|
306
|
+
/** True, if non-administrators can only get the list of bots and administrators in the chat */
|
|
307
|
+
has_hidden_members?: true;
|
|
308
|
+
/** True, if messages from the chat can't be forwarded to other chats */
|
|
309
|
+
has_protected_content?: true;
|
|
310
|
+
/** True, if new chat members will have access to old messages; available only to chat administrators */
|
|
311
|
+
has_visible_history?: true;
|
|
312
|
+
/** For supergroups, name of the group sticker set */
|
|
313
|
+
sticker_set_name?: undefined;
|
|
314
|
+
/** True, if the bot can change the group sticker set */
|
|
315
|
+
can_set_sticker_set?: true;
|
|
316
|
+
/** For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group. */
|
|
317
|
+
custom_emoji_sticker_set_name?: undefined;
|
|
318
|
+
/** Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. */
|
|
319
|
+
linked_chat_id?: undefined;
|
|
320
|
+
/** For supergroups, the location to which the supergroup is connected */
|
|
321
|
+
location?: undefined;
|
|
145
322
|
}
|
|
146
|
-
/** Internal type
|
|
147
|
-
interface
|
|
148
|
-
/**
|
|
323
|
+
/** Internal type for supergroup chats */
|
|
324
|
+
export interface SupergroupChat {
|
|
325
|
+
/** Unique identifier for this chat. */
|
|
326
|
+
id: number;
|
|
327
|
+
/** Type of the chat, can be either “private”, “group”, “supergroup” or “channel” */
|
|
328
|
+
type: "supergroup";
|
|
329
|
+
/** Title, for supergroups, channels and group chats */
|
|
330
|
+
title?: string;
|
|
331
|
+
/** Username, for private chats, supergroups and channels if available */
|
|
332
|
+
username?: string;
|
|
333
|
+
/** First name of the other party in a private chat */
|
|
334
|
+
first_name?: undefined;
|
|
335
|
+
/** Last name of the other party in a private chat */
|
|
336
|
+
last_name?: undefined;
|
|
337
|
+
/** True, if the supergroup chat is a forum (has topics enabled) */
|
|
338
|
+
is_forum?: true;
|
|
339
|
+
/** Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details. */
|
|
149
340
|
accent_color_id: number;
|
|
150
|
-
/**
|
|
341
|
+
/** The maximum number of reactions that can be set on a message in the chat */
|
|
342
|
+
max_reaction_count: number;
|
|
343
|
+
/** Chat photo */
|
|
344
|
+
photo?: ChatPhoto;
|
|
345
|
+
/** If non-empty, the list of all active chat usernames; for private chats, supergroups and channels */
|
|
346
|
+
active_usernames?: string[];
|
|
347
|
+
/** For private chats, the date of birth of the user */
|
|
348
|
+
birthdate?: undefined;
|
|
349
|
+
/** For private chats with business accounts, the intro of the business */
|
|
350
|
+
business_intro?: undefined;
|
|
351
|
+
/** For private chats with business accounts, the location of the business */
|
|
352
|
+
business_location?: undefined;
|
|
353
|
+
/** For private chats with business accounts, the opening hours of the business */
|
|
354
|
+
business_opening_hours?: undefined;
|
|
355
|
+
/** For private chats, the personal channel of the user */
|
|
356
|
+
personal_chat?: undefined;
|
|
357
|
+
/** List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed. */
|
|
358
|
+
available_reactions?: ReactionType[];
|
|
359
|
+
/** Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background */
|
|
151
360
|
background_custom_emoji_id?: string;
|
|
152
|
-
/**
|
|
361
|
+
/** Identifier of the accent color for the chat's profile background. See profile accent colors for more details. */
|
|
362
|
+
profile_accent_color_id?: number;
|
|
363
|
+
/** Custom emoji identifier of the emoji chosen by the chat for its profile background */
|
|
364
|
+
profile_background_custom_emoji_id?: string;
|
|
365
|
+
/** Custom emoji identifier of the emoji status of the chat or the other party in a private chat */
|
|
153
366
|
emoji_status_custom_emoji_id?: string;
|
|
154
|
-
/** Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any
|
|
367
|
+
/** Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any */
|
|
155
368
|
emoji_status_expiration_date?: number;
|
|
156
|
-
|
|
157
|
-
/** Internal type holding properties that those supergroup and channel chats returned from `getChat` share. */
|
|
158
|
-
interface LargeGetChat {
|
|
159
|
-
/** Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. Returned only in getChat. */
|
|
160
|
-
linked_chat_id?: number;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
// ==> GET CHATS
|
|
164
|
-
/** Internal type representing private chats returned from `getChat`. */
|
|
165
|
-
export interface PrivateGetChat
|
|
166
|
-
extends PrivateChat,
|
|
167
|
-
GetChat,
|
|
168
|
-
NonGroupGetChat,
|
|
169
|
-
NonMultiUserGetChat {
|
|
170
|
-
/** For private chats, the date of birth of the user. Returned only in getChat. */
|
|
171
|
-
birthdate?: Birthdate;
|
|
172
|
-
/** For private chats with business accounts, the intro of the business. Returned only in getChat. */
|
|
173
|
-
business_intro?: BusinessIntro;
|
|
174
|
-
/** For private chats with business accounts, the location of the business. Returned only in getChat. */
|
|
175
|
-
business_location?: BusinessLocation;
|
|
176
|
-
/** For private chats with business accounts, the opening hours of the business. Returned only in getChat. */
|
|
177
|
-
business_opening_hours?: BusinessOpeningHours;
|
|
178
|
-
/** For private chats, the personal channel of the user. Returned only in getChat. */
|
|
179
|
-
personal_chat?: Chat.ChannelChat;
|
|
180
|
-
/** Bio of the other party in a private chat. Returned only in getChat. */
|
|
369
|
+
/** Bio of the other party in a private chat */
|
|
181
370
|
bio?: string;
|
|
182
|
-
/** True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user
|
|
183
|
-
has_private_forwards?:
|
|
184
|
-
/** True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat
|
|
185
|
-
has_restricted_voice_and_video_messages?:
|
|
186
|
-
|
|
187
|
-
/** Internal type representing group chats returned from `getChat`. */
|
|
188
|
-
export interface GroupGetChat
|
|
189
|
-
extends GroupChat,
|
|
190
|
-
GetChat,
|
|
191
|
-
NonPrivateGetChat,
|
|
192
|
-
MultiUserGetChat {}
|
|
193
|
-
/** Internal type representing supergroup chats returned from `getChat`. */
|
|
194
|
-
export interface SupergroupGetChat
|
|
195
|
-
extends SupergroupChat,
|
|
196
|
-
GetChat,
|
|
197
|
-
NonGroupGetChat,
|
|
198
|
-
NonPrivateGetChat,
|
|
199
|
-
MultiUserGetChat,
|
|
200
|
-
LargeGetChat {
|
|
201
|
-
/** True, if users need to join the supergroup before they can send messages. Returned only in getChat. */
|
|
371
|
+
/** True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user */
|
|
372
|
+
has_private_forwards?: undefined;
|
|
373
|
+
/** True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat */
|
|
374
|
+
has_restricted_voice_and_video_messages?: undefined;
|
|
375
|
+
/** True, if users need to join the supergroup before they can send messages */
|
|
202
376
|
join_to_send_messages?: true;
|
|
203
|
-
/** True, if all users directly joining the supergroup need to be approved by supergroup administrators
|
|
377
|
+
/** True, if all users directly joining the supergroup without using an invite link need to be approved by supergroup administrators */
|
|
204
378
|
join_by_request?: true;
|
|
205
|
-
/**
|
|
379
|
+
/** Description, for groups, supergroups and channel chats */
|
|
380
|
+
description?: string;
|
|
381
|
+
/** Primary invite link, for groups, supergroups and channel chats */
|
|
382
|
+
invite_link?: string;
|
|
383
|
+
/** The most recent pinned message (by sending date) */
|
|
384
|
+
pinned_message?: Message;
|
|
385
|
+
/** Default chat member permissions, for groups and supergroups */
|
|
386
|
+
permissions?: ChatPermissions;
|
|
387
|
+
/** For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds */
|
|
206
388
|
slow_mode_delay?: number;
|
|
207
|
-
/**
|
|
389
|
+
/** For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions */
|
|
208
390
|
unrestrict_boost_count?: number;
|
|
209
|
-
/**
|
|
210
|
-
|
|
211
|
-
/** True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators.
|
|
391
|
+
/** The time after which all messages sent to the chat will be automatically deleted; in seconds */
|
|
392
|
+
message_auto_delete_time?: number;
|
|
393
|
+
/** True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. */
|
|
212
394
|
has_aggressive_anti_spam_enabled?: true;
|
|
213
|
-
/**
|
|
395
|
+
/** True, if non-administrators can only get the list of bots and administrators in the chat */
|
|
396
|
+
has_hidden_members?: true;
|
|
397
|
+
/** True, if messages from the chat can't be forwarded to other chats */
|
|
398
|
+
has_protected_content?: true;
|
|
399
|
+
/** True, if new chat members will have access to old messages; available only to chat administrators */
|
|
400
|
+
has_visible_history?: true;
|
|
401
|
+
/** For supergroups, name of the group sticker set */
|
|
214
402
|
sticker_set_name?: string;
|
|
215
|
-
/** True, if the bot can change the group sticker set
|
|
403
|
+
/** True, if the bot can change the group sticker set */
|
|
216
404
|
can_set_sticker_set?: true;
|
|
217
|
-
/** For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group.
|
|
405
|
+
/** For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group. */
|
|
218
406
|
custom_emoji_sticker_set_name?: string;
|
|
219
|
-
/**
|
|
407
|
+
/** Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. */
|
|
408
|
+
linked_chat_id?: number;
|
|
409
|
+
/** For supergroups, the location to which the supergroup is connected */
|
|
220
410
|
location?: ChatLocation;
|
|
221
411
|
}
|
|
222
|
-
/** Internal type
|
|
223
|
-
export interface
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
/**
|
|
412
|
+
/** Internal type for channel chats */
|
|
413
|
+
export interface ChannelChat {
|
|
414
|
+
/** Unique identifier for this chat. */
|
|
415
|
+
id: number;
|
|
416
|
+
/** Type of the chat, can be either “private”, “group”, “supergroup” or “channel” */
|
|
417
|
+
type: "channel";
|
|
418
|
+
/** Title, for supergroups, channels and group chats */
|
|
419
|
+
title?: string;
|
|
420
|
+
/** Username, for private chats, supergroups and channels if available */
|
|
421
|
+
username?: string;
|
|
422
|
+
/** First name of the other party in a private chat */
|
|
423
|
+
first_name?: undefined;
|
|
424
|
+
/** Last name of the other party in a private chat */
|
|
425
|
+
last_name?: undefined;
|
|
426
|
+
/** True, if the supergroup chat is a forum (has topics enabled) */
|
|
427
|
+
is_forum?: undefined;
|
|
428
|
+
/** Identifier of the accent color for the chat name and backgrounds of the chat photo, reply header, and link preview. See accent colors for more details. */
|
|
429
|
+
accent_color_id: number;
|
|
430
|
+
/** The maximum number of reactions that can be set on a message in the chat */
|
|
431
|
+
max_reaction_count: number;
|
|
432
|
+
/** Chat photo */
|
|
433
|
+
photo?: ChatPhoto;
|
|
434
|
+
/** If non-empty, the list of all active chat usernames; for private chats, supergroups and channels */
|
|
435
|
+
active_usernames?: string[];
|
|
436
|
+
/** For private chats, the date of birth of the user */
|
|
437
|
+
birthdate?: undefined;
|
|
438
|
+
/** For private chats with business accounts, the intro of the business */
|
|
439
|
+
business_intro?: undefined;
|
|
440
|
+
/** For private chats with business accounts, the location of the business */
|
|
441
|
+
business_location?: undefined;
|
|
442
|
+
/** For private chats with business accounts, the opening hours of the business */
|
|
443
|
+
business_opening_hours?: undefined;
|
|
444
|
+
/** For private chats, the personal channel of the user */
|
|
445
|
+
personal_chat?: undefined;
|
|
446
|
+
/** List of available reactions allowed in the chat. If omitted, then all emoji reactions are allowed. */
|
|
447
|
+
available_reactions?: ReactionType[];
|
|
448
|
+
/** Custom emoji identifier of the emoji chosen by the chat for the reply header and link preview background */
|
|
449
|
+
background_custom_emoji_id?: string;
|
|
450
|
+
/** Identifier of the accent color for the chat's profile background. See profile accent colors for more details. */
|
|
231
451
|
profile_accent_color_id?: number;
|
|
232
|
-
/** Custom emoji identifier of the emoji chosen by the chat for its profile background
|
|
452
|
+
/** Custom emoji identifier of the emoji chosen by the chat for its profile background */
|
|
233
453
|
profile_background_custom_emoji_id?: string;
|
|
454
|
+
/** Custom emoji identifier of the emoji status of the chat or the other party in a private chat */
|
|
455
|
+
emoji_status_custom_emoji_id?: string;
|
|
456
|
+
/** Expiration date of the emoji status of the chat or the other party in a private chat, in Unix time, if any */
|
|
457
|
+
emoji_status_expiration_date?: number;
|
|
458
|
+
/** Bio of the other party in a private chat */
|
|
459
|
+
bio?: undefined;
|
|
460
|
+
/** True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user */
|
|
461
|
+
has_private_forwards?: undefined;
|
|
462
|
+
/** True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat */
|
|
463
|
+
has_restricted_voice_and_video_messages?: undefined;
|
|
464
|
+
/** True, if users need to join the supergroup before they can send messages */
|
|
465
|
+
join_to_send_messages?: true;
|
|
466
|
+
/** True, if all users directly joining the supergroup without using an invite link need to be approved by supergroup administrators */
|
|
467
|
+
join_by_request?: undefined;
|
|
468
|
+
/** Description, for groups, supergroups and channel chats */
|
|
469
|
+
description?: string;
|
|
470
|
+
/** Primary invite link, for groups, supergroups and channel chats */
|
|
471
|
+
invite_link?: string;
|
|
472
|
+
/** The most recent pinned message (by sending date) */
|
|
473
|
+
pinned_message?: Message;
|
|
474
|
+
/** Default chat member permissions, for groups and supergroups */
|
|
475
|
+
permissions?: undefined;
|
|
476
|
+
/** For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds */
|
|
477
|
+
slow_mode_delay?: undefined;
|
|
478
|
+
/** For supergroups, the minimum number of boosts that a non-administrator user needs to add in order to ignore slow mode and chat permissions */
|
|
479
|
+
unrestrict_boost_count?: undefined;
|
|
480
|
+
/** The time after which all messages sent to the chat will be automatically deleted; in seconds */
|
|
481
|
+
message_auto_delete_time?: number;
|
|
482
|
+
/** True, if aggressive anti-spam checks are enabled in the supergroup. The field is only available to chat administrators. */
|
|
483
|
+
has_aggressive_anti_spam_enabled?: undefined;
|
|
484
|
+
/** True, if non-administrators can only get the list of bots and administrators in the chat */
|
|
485
|
+
has_hidden_members?: undefined;
|
|
486
|
+
/** True, if messages from the chat can't be forwarded to other chats */
|
|
487
|
+
has_protected_content?: true;
|
|
488
|
+
/** True, if new chat members will have access to old messages; available only to chat administrators */
|
|
489
|
+
has_visible_history?: undefined;
|
|
490
|
+
/** For supergroups, name of the group sticker set */
|
|
491
|
+
sticker_set_name?: undefined;
|
|
492
|
+
/** True, if the bot can change the group sticker set */
|
|
493
|
+
can_set_sticker_set?: undefined;
|
|
494
|
+
/** For supergroups, the name of the group's custom emoji sticker set. Custom emoji from this set can be used by all users and bots in the group. */
|
|
495
|
+
custom_emoji_sticker_set_name?: undefined;
|
|
496
|
+
/** Unique identifier for the linked chat, i.e. the discussion group identifier for a channel and vice versa; for supergroups and channel chats. */
|
|
497
|
+
linked_chat_id?: number;
|
|
498
|
+
/** For supergroups, the location to which the supergroup is connected */
|
|
499
|
+
location?: undefined;
|
|
234
500
|
}
|
|
235
501
|
}
|
|
236
502
|
|
|
237
|
-
/** This object
|
|
238
|
-
export type
|
|
239
|
-
|
|
|
240
|
-
|
|
|
241
|
-
|
|
|
242
|
-
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
export type ChatFromGetChat =
|
|
246
|
-
| Chat.PrivateGetChat
|
|
247
|
-
| Chat.GroupGetChat
|
|
248
|
-
| Chat.SupergroupGetChat
|
|
249
|
-
| Chat.ChannelGetChat;
|
|
503
|
+
/** This object contains full information about a chat. */
|
|
504
|
+
export type ChatFullInfo =
|
|
505
|
+
| ChatFullInfo.PrivateChat
|
|
506
|
+
| ChatFullInfo.GroupChat
|
|
507
|
+
| ChatFullInfo.SupergroupChat
|
|
508
|
+
| ChatFullInfo.ChannelChat;
|
|
509
|
+
/** @deprecated use ChatFullInfo instead */
|
|
510
|
+
export type ChatFromGetChat = ChatFullInfo;
|
|
250
511
|
|
|
251
512
|
/** This object represent a user's profile pictures. */
|
|
252
513
|
export interface UserProfilePhotos {
|
|
@@ -310,9 +571,9 @@ export interface ChatAdministratorRights {
|
|
|
310
571
|
can_invite_users: boolean;
|
|
311
572
|
/** True, if the administrator can post stories to the chat */
|
|
312
573
|
can_post_stories: boolean;
|
|
313
|
-
/** True, if the administrator can edit stories posted by other users */
|
|
574
|
+
/** True, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive */
|
|
314
575
|
can_edit_stories: boolean;
|
|
315
|
-
/** True, if the administrator can delete stories posted by other users
|
|
576
|
+
/** True, if the administrator can delete stories posted by other users */
|
|
316
577
|
can_delete_stories: boolean;
|
|
317
578
|
/** True, if the administrator can post messages in the channel, or access channel statistics; for channels only */
|
|
318
579
|
can_post_messages?: boolean;
|
|
@@ -338,6 +599,8 @@ export interface ChatMemberUpdated {
|
|
|
338
599
|
new_chat_member: ChatMember;
|
|
339
600
|
/** Chat invite link, which was used by the user to join the chat; for joining by invite link events only. */
|
|
340
601
|
invite_link?: ChatInviteLink;
|
|
602
|
+
/** True, if the user joined the chat after sending a direct join request without using an invite link without using an invite link and being approved by an administrator */
|
|
603
|
+
via_join_request?: boolean;
|
|
341
604
|
/** True, if the user joined the chat via a chat folder invite link */
|
|
342
605
|
via_chat_folder_invite_link?: boolean;
|
|
343
606
|
}
|
|
@@ -395,7 +658,7 @@ export interface ChatMemberAdministrator {
|
|
|
395
658
|
can_invite_users: boolean;
|
|
396
659
|
/** True, if the administrator can post stories to the chat */
|
|
397
660
|
can_post_stories: boolean;
|
|
398
|
-
/** True, if the administrator can edit stories posted by other users */
|
|
661
|
+
/** True, if the administrator can edit stories posted by other users, post stories to the chat page, pin chat stories, and access the chat's story archive */
|
|
399
662
|
can_edit_stories: boolean;
|
|
400
663
|
/** True, if the administrator can delete stories posted by other users */
|
|
401
664
|
can_delete_stories: boolean;
|
|
@@ -525,6 +788,7 @@ export interface ChatPermissions {
|
|
|
525
788
|
can_manage_topics?: boolean;
|
|
526
789
|
}
|
|
527
790
|
|
|
791
|
+
/** Describes the birthdate of a user. */
|
|
528
792
|
export interface Birthdate {
|
|
529
793
|
/** Day of the user's birth; 1-31 */
|
|
530
794
|
day: number;
|
|
@@ -534,6 +798,7 @@ export interface Birthdate {
|
|
|
534
798
|
year?: number;
|
|
535
799
|
}
|
|
536
800
|
|
|
801
|
+
/** Contains information about the start page settings of a Telegram Business account. */
|
|
537
802
|
export interface BusinessIntro {
|
|
538
803
|
/** Title text of the business intro */
|
|
539
804
|
title?: string;
|
|
@@ -543,6 +808,7 @@ export interface BusinessIntro {
|
|
|
543
808
|
sticker?: Sticker;
|
|
544
809
|
}
|
|
545
810
|
|
|
811
|
+
/** Contains information about the location of a Telegram Business account. */
|
|
546
812
|
export interface BusinessLocation {
|
|
547
813
|
/** Address of the business */
|
|
548
814
|
address: string;
|
|
@@ -550,13 +816,15 @@ export interface BusinessLocation {
|
|
|
550
816
|
location?: Location;
|
|
551
817
|
}
|
|
552
818
|
|
|
819
|
+
/** Describes an interval of time during which a business is open. */
|
|
553
820
|
export interface BusinessOpeningHoursInterval {
|
|
554
|
-
/** The minute's sequence number in a week, starting on Monday, marking the start of the time interval during which the business is open; 0 - 7 24 60 */
|
|
821
|
+
/** The minute's sequence number in a week, starting on Monday, marking the start of the time interval during which the business is open; 0 - 7 * 24 * 60 */
|
|
555
822
|
opening_minute: number;
|
|
556
|
-
/** The minute's sequence number in a week, starting on Monday, marking the end of the time interval during which the business is open; 0 - 8 24 60 */
|
|
823
|
+
/** The minute's sequence number in a week, starting on Monday, marking the end of the time interval during which the business is open; 0 - 8 * 24 * 60 */
|
|
557
824
|
closing_minute: number;
|
|
558
825
|
}
|
|
559
826
|
|
|
827
|
+
/** Describes the opening hours of a business. */
|
|
560
828
|
export interface BusinessOpeningHours {
|
|
561
829
|
/** Unique name of the time zone for which the opening hours are defined */
|
|
562
830
|
time_zone_name: string;
|
|
@@ -624,6 +892,10 @@ export interface ChatBoostSourceGiveaway {
|
|
|
624
892
|
source: "giveaway";
|
|
625
893
|
/** Identifier of a message in the chat with the giveaway; the message could have been deleted already */
|
|
626
894
|
giveaway_message_id: number;
|
|
895
|
+
/** User that won the prize in the giveaway if any */
|
|
896
|
+
user?: User;
|
|
897
|
+
/** True, if the giveaway was completed, but there was no user to win the prize */
|
|
898
|
+
is_unclaimed?: true;
|
|
627
899
|
}
|
|
628
900
|
|
|
629
901
|
/** This object contains information about a chat boost. */
|
|
@@ -642,7 +914,7 @@ export interface ChatBoost {
|
|
|
642
914
|
export interface ChatBoostUpdated {
|
|
643
915
|
/** Chat which was boosted */
|
|
644
916
|
chat: Chat;
|
|
645
|
-
/**
|
|
917
|
+
/** Information about the chat boost */
|
|
646
918
|
boost: ChatBoost;
|
|
647
919
|
}
|
|
648
920
|
|
|
@@ -686,6 +958,6 @@ export interface BusinessMessagesDeleted {
|
|
|
686
958
|
business_connection_id: string;
|
|
687
959
|
/** Information about a chat in the business account. The bot may not have access to the chat or the corresponding user. */
|
|
688
960
|
chat: Chat.PrivateChat;
|
|
689
|
-
/**
|
|
961
|
+
/** The list of identifiers of deleted messages in the chat of the business account */
|
|
690
962
|
message_ids: number[];
|
|
691
963
|
}
|