@telegram.ts/types 1.22.0 → 1.22.1
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 +11 -11
- package/src/invoiceTypes.d.ts +1 -1
- package/src/manageTypes.d.ts +2 -1
- package/src/messageTypes.d.ts +4 -0
- package/src/storyTypes.d.ts +1 -1
package/package.json
CHANGED
package/src/apiMethodsTypes.d.ts
CHANGED
|
@@ -216,7 +216,7 @@ export type ApiMethods = {
|
|
|
216
216
|
/** New caption for media, 0-1024 characters after entities parsing. If not specified, the original caption is kept */
|
|
217
217
|
caption?: string;
|
|
218
218
|
/** Mode for parsing entities in the new caption. See formatting options for more details. */
|
|
219
|
-
parse_mode?:
|
|
219
|
+
parse_mode?: ParseMode;
|
|
220
220
|
/** A list of special entities that appear in the new caption, which can be specified instead of parse_mode */
|
|
221
221
|
caption_entities?: MessageEntity[];
|
|
222
222
|
/** Pass True, if the caption must be shown above the message media. Ignored if a new caption isn't specified. */
|
|
@@ -666,7 +666,7 @@ export type ApiMethods = {
|
|
|
666
666
|
/** Media caption, 0-1024 characters after entities parsing */
|
|
667
667
|
caption?: string;
|
|
668
668
|
/** Mode for parsing entities in the media caption. See formatting options for more details. */
|
|
669
|
-
parse_mode?:
|
|
669
|
+
parse_mode?: ParseMode;
|
|
670
670
|
/** A list of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
671
671
|
caption_entities?: MessageEntity[];
|
|
672
672
|
/** Pass True, if the caption must be shown above the message media */
|
|
@@ -774,7 +774,7 @@ export type ApiMethods = {
|
|
|
774
774
|
/** Poll question, 1-300 characters */
|
|
775
775
|
question: string;
|
|
776
776
|
/** Mode for parsing entities in the question. See formatting options for more details. Currently, only custom emoji entities are allowed */
|
|
777
|
-
question_parse_mode?:
|
|
777
|
+
question_parse_mode?: ParseMode;
|
|
778
778
|
/** A list of special entities that appear in the poll question. It can be specified instead of question_parse_mode */
|
|
779
779
|
question_entities?: MessageEntity[];
|
|
780
780
|
/** A list of 2-10 answer options */
|
|
@@ -883,7 +883,7 @@ export type ApiMethods = {
|
|
|
883
883
|
}): true;
|
|
884
884
|
|
|
885
885
|
/** Use this method to change the chosen reactions on a message. Service messages of some types can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. In albums, bots must react to the first message. Returns True on success. */
|
|
886
|
-
(args: {
|
|
886
|
+
setMessageReaction(args: {
|
|
887
887
|
/** Unique identifier for the target chat or username of the target channel (in the format @channelusername) */
|
|
888
888
|
chat_id: number | string;
|
|
889
889
|
/** Identifier of the target message */
|
|
@@ -1484,7 +1484,7 @@ export type ApiMethods = {
|
|
|
1484
1484
|
/** Unique identifier of the business connection */
|
|
1485
1485
|
business_connection_id: string;
|
|
1486
1486
|
/** The new profile photo to set */
|
|
1487
|
-
photo: InputProfilePhoto
|
|
1487
|
+
photo: InputProfilePhoto;
|
|
1488
1488
|
/** Pass True to set the public photo, which will be visible even if the main photo is hidden by the business account's privacy settings. An account can have only one public photo. */
|
|
1489
1489
|
is_public?: boolean;
|
|
1490
1490
|
}): true;
|
|
@@ -1853,13 +1853,13 @@ export type ApiMethods = {
|
|
|
1853
1853
|
/** Unique identifier of the business connection */
|
|
1854
1854
|
business_connection_id: string;
|
|
1855
1855
|
/** Content of the story */
|
|
1856
|
-
content: InputStoryContent
|
|
1856
|
+
content: InputStoryContent;
|
|
1857
1857
|
/** Period after which the story is moved to the archive, in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400 */
|
|
1858
1858
|
active_period: number;
|
|
1859
1859
|
/** Caption of the story, 0-2048 characters after entities parsing */
|
|
1860
1860
|
caption?: string;
|
|
1861
1861
|
/** Mode for parsing entities in the story caption. See formatting options for more details. */
|
|
1862
|
-
parse_mode?:
|
|
1862
|
+
parse_mode?: ParseMode;
|
|
1863
1863
|
/** A list of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
1864
1864
|
caption_entities?: MessageEntity[];
|
|
1865
1865
|
/** A list of clickable areas to be shown on the story */
|
|
@@ -1877,11 +1877,11 @@ export type ApiMethods = {
|
|
|
1877
1877
|
/** Unique identifier of the story to edit */
|
|
1878
1878
|
story_id: number;
|
|
1879
1879
|
/** Content of the story */
|
|
1880
|
-
content: InputStoryContent
|
|
1880
|
+
content: InputStoryContent;
|
|
1881
1881
|
/** Caption of the story, 0-2048 characters after entities parsing */
|
|
1882
1882
|
caption?: string;
|
|
1883
1883
|
/** Mode for parsing entities in the story caption. See formatting options for more details. */
|
|
1884
|
-
parse_mode?:
|
|
1884
|
+
parse_mode?: ParseMode;
|
|
1885
1885
|
/** A list of special entities that appear in the caption, which can be specified instead of parse_mode */
|
|
1886
1886
|
caption_entities?: MessageEntity[];
|
|
1887
1887
|
/** A list of clickable areas to be shown on the story */
|
|
@@ -1928,7 +1928,7 @@ export type ApiMethods = {
|
|
|
1928
1928
|
/** Text that will be shown along with the service message about the subscription; 0-128 characters */
|
|
1929
1929
|
text?: string;
|
|
1930
1930
|
/** Mode for parsing entities in the text. See formatting options for more details. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored. */
|
|
1931
|
-
text_parse_mode?:
|
|
1931
|
+
text_parse_mode?: ParseMode;
|
|
1932
1932
|
/** A list of special entities that appear in the gift text. It can be specified instead of text_parse_mode. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored. */
|
|
1933
1933
|
text_entities?: MessageEntity[];
|
|
1934
1934
|
}): true;
|
|
@@ -2435,7 +2435,7 @@ export interface InputProfilePhotoAnimated {
|
|
|
2435
2435
|
/** Type of the profile photo, must be “animated” */
|
|
2436
2436
|
type: "animated";
|
|
2437
2437
|
/** The animated profile photo. Profile photos can't be reused and can only be uploaded as a new file, so you can pass “attach://<file_attach_name>” if the photo was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files » */
|
|
2438
|
-
animation:
|
|
2438
|
+
animation: Buffer | ReadStream | string;
|
|
2439
2439
|
/** Timestamp in seconds of the frame that will be used as the static profile photo. Defaults to 0.0. */
|
|
2440
2440
|
main_frame_timestamp?: number;
|
|
2441
2441
|
}
|
package/src/invoiceTypes.d.ts
CHANGED
|
@@ -422,7 +422,7 @@ export interface PaidMessagePriceChanged {
|
|
|
422
422
|
export interface StarAmount {
|
|
423
423
|
/** Integer amount of Telegram Stars, rounded to 0; can be negative */
|
|
424
424
|
amount: number;
|
|
425
|
-
/** The number of 1/1000000000 shares of Telegram Stars; from -999999999 to 999999999; can be negative if amount is
|
|
425
|
+
/** The number of 1/1000000000 shares of Telegram Stars; from -999999999 to 999999999; can be negative if and only if amount is non-positive */
|
|
426
426
|
nanostar_amount?: number;
|
|
427
427
|
}
|
|
428
428
|
|
package/src/manageTypes.d.ts
CHANGED
|
@@ -975,6 +975,7 @@ export interface UserChatBoosts {
|
|
|
975
975
|
boosts: ChatBoost[];
|
|
976
976
|
}
|
|
977
977
|
|
|
978
|
+
/** Represents the rights of a business bot. */
|
|
978
979
|
export interface BusinessBotRights {
|
|
979
980
|
/** True, if the bot can send and edit messages in the private chats that had incoming messages in the last 24 hours */
|
|
980
981
|
can_reply?: true;
|
|
@@ -1002,7 +1003,7 @@ export interface BusinessBotRights {
|
|
|
1002
1003
|
can_transfer_and_upgrade_gifts?: true;
|
|
1003
1004
|
/** True, if the bot can transfer Telegram Stars received by the business account to its own account, or use them to upgrade and transfer gifts */
|
|
1004
1005
|
can_transfer_stars?: true;
|
|
1005
|
-
/** True, if the bot can
|
|
1006
|
+
/** True, if the bot can post, edit and delete stories on behalf of the business account */
|
|
1006
1007
|
can_manage_stories?: true;
|
|
1007
1008
|
}
|
|
1008
1009
|
|
package/src/messageTypes.d.ts
CHANGED
|
@@ -156,6 +156,10 @@ export declare namespace Message {
|
|
|
156
156
|
MsgWith<"giveaway_winners">;
|
|
157
157
|
export type GiveawayCompletedMessage = ServiceMessage &
|
|
158
158
|
MsgWith<"giveaway_completed">;
|
|
159
|
+
export type GiftMessage = ServiceMessage & MsgWith<"gift">;
|
|
160
|
+
export type UniqueGiftMessage = ServiceMessage & MsgWith<"unique_gift">;
|
|
161
|
+
export type PaidMessagePriceChangedMessage = ServiceMessage &
|
|
162
|
+
MsgWith<"paid_message_price_changed">;
|
|
159
163
|
export type VideoChatScheduledMessage = ServiceMessage &
|
|
160
164
|
MsgWith<"video_chat_scheduled">;
|
|
161
165
|
export type VideoChatStartedMessage = ServiceMessage &
|
package/src/storyTypes.d.ts
CHANGED