Socket
Socket
Sign inDemoInstall

typegram

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typegram - npm Package Compare versions

Comparing version 3.1.10 to 3.2.0

6

inline.d.ts

@@ -118,3 +118,3 @@ import { User } from "./manage";

Note: It is necessary to enable inline feedback via @Botfather in order to receive these objects in updates. */
Note: All URLs passed in inline query results will be available to end users and therefore must be assumed to be public. */
export type InlineQueryResult =

@@ -739,3 +739,5 @@ | InlineQueryResultCachedAudio

/** Represents a result of an inline query that was chosen by the user and sent to their chat partner. */
/** Represents a result of an inline query that was chosen by the user and sent to their chat partner.
Note: It is necessary to enable inline feedback via @Botfather in order to receive these objects in updates. */
export interface ChosenInlineResult {

@@ -742,0 +744,0 @@ /** The unique identifier for the result that was chosen */

@@ -19,3 +19,3 @@ import { Location, Message, PhotoSize } from "./message";

max_connections: number;
/** A list of update types the bot is subscribed to. Defaults to all update types */
/** A list of update types the bot is subscribed to. Defaults to all update types except chat_member */
allowed_updates: string[];

@@ -26,3 +26,3 @@ }

export interface User {
/** Unique identifier for this user or bot */
/** Unique identifier for this user or bot. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. */
id: number;

@@ -59,3 +59,3 @@ /** True, if this user is a bot */

type: string;
/** Unique identifier for this chat. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. */
/** Unique identifier for this chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier. */
id: number;

@@ -108,2 +108,4 @@ }

pinned_message?: Message;
/** The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in getChat. */
message_auto_delete_time?: number;
}

@@ -114,3 +116,3 @@ /** Internal type holding properties that those group, supergroup, and channel chats returned from `getChat` share. */

description?: string;
/** Chat invite link, for groups, supergroups and channel chats. Each administrator in a chat generates their own invite links, so the bot must first generate the link using exportChatInviteLink. Returned only in getChat. */
/** Primary invite link, for groups, supergroups and channel chats. Returned only in getChat. */
invite_link?: string;

@@ -189,2 +191,18 @@ }

/** Represents an invite link for a chat. */
export interface ChatInviteLink {
/** The invite link. If the link was created by another chat administrator, then the second part of the link will be replaced with “…”. */
invite_link: string;
/** Creator of the link */
creator: User;
/** True, if the link is primary */
is_primary: boolean;
/** True, if the link is revoked */
is_revoked: boolean;
/** Point in time (Unix timestamp) when the link will expire or has been expired */
expire_date?: number;
/** Maximum number of users that can be members of the chat simultaneously after joining the chat via this invite link; 1-99999 */
member_limit?: number;
}
/** This object contains information about one member of a chat. */

@@ -208,2 +226,4 @@ export interface ChatMember {

can_be_edited?: boolean;
/** Administrators only. True, if the administrator can access the chat event log, chat statistics, message statistics in channels, see channel members, see anonymous administrators in supergoups and ignore slow mode. Implied by any other administrator privilege */
can_manage_chat?: boolean;
/** Administrators only. True, if the administrator can post in the channel; channels only */

@@ -215,2 +235,4 @@ can_post_messages?: boolean;

can_delete_messages?: boolean;
/** Administrators only. True, if the administrator can manage voice chats */
can_manage_voice_chats?: boolean;
/** Administrators only. True, if the administrator can restrict, ban or unban chat members */

@@ -242,2 +264,18 @@ can_restrict_members?: boolean;

/** This object represents changes in the status of a chat member. */
export interface ChatMemberUpdated {
/** Chat the user belongs to */
chat: Chat;
/** Performer of the action, which resulted in the change */
from: User;
/** Date the change was done in Unix time */
date: number;
/** Previous information about the chat member */
old_chat_member: ChatMember;
/** New information about the chat member */
new_chat_member: ChatMember;
/** Chat invite link, which was used by the user to join the chat; for joining by invite link events only. */
invite_link?: ChatInviteLink;
}
/** Describes actions that a non-administrator user is allowed to take in a chat. */

@@ -281,3 +319,3 @@ export interface ChatPermissions {

export interface ResponseParameters {
/** The group has been migrated to a supergroup with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. */
/** The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier. */
migrate_to_chat_id?: number;

@@ -284,0 +322,0 @@ /** In case of exceeding flood control, the number of seconds left to wait before the request can be repeated */

@@ -147,8 +147,12 @@ import { InlineKeyboardMarkup } from "./inline";

}
export interface MessageAutoDeleteTimerChangedMessage extends ServiceMessage {
/** Service message: auto-delete timer settings changed in the chat */
message_auto_delete_timer_changed: MessageAutoDeleteTimerChanged;
}
export interface MigrateToChatIdMessage extends ServiceMessage {
/** The group has been migrated to a supergroup with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. */
/** The group has been migrated to a supergroup with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier. */
migrate_to_chat_id: number;
}
export interface MigrateFromChatIdMessage extends ServiceMessage {
/** The supergroup has been migrated from a group with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier. */
/** The supergroup has been migrated from a group with the specified identifier. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type are safe for storing this identifier. */
migrate_from_chat_id: number;

@@ -180,2 +184,14 @@ }

}
export interface VoiceChatStartedMessage extends ServiceMessage {
/** Service message: voice chat started */
voice_chat_started: VoiceChatStarted;
}
export interface VoiceChatEndedMessage extends ServiceMessage {
/** Service message: voice chat ended */
voice_chat_ended: VoiceChatEnded;
}
export interface VoiceChatParticipantsInvitedMessage extends ServiceMessage {
/** Service message: new participants invited to a voice chat */
voice_chat_participants_invited: VoiceChatParticipantsInvited;
}
}

@@ -191,2 +207,3 @@

| Message.LeftChatMemberMessage
| Message.MessageAutoDeleteTimerChangedMessage
| Message.MigrateFromChatIdMessage

@@ -201,3 +218,6 @@ | Message.MigrateToChatIdMessage

| Message.SuccessfulPaymentMessage
| Message.SupergroupChatCreated;
| Message.SupergroupChatCreated
| Message.VoiceChatStartedMessage
| Message.VoiceChatEndedMessage
| Message.VoiceChatParticipantsInvitedMessage;

@@ -507,3 +527,3 @@ /** Helper type that bundles all possible `Message.CommonMessage`s. More specifically, bundles all messages that do have a `reply_to_message` field, i.e. are a `Message.CommonMessage`. */

last_name?: string;
/** Contact's user identifier in Telegram */
/** Contact's user identifier in Telegram. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. */
user_id?: number;

@@ -518,3 +538,3 @@ /** Additional data about the contact in the form of a vCard */

emoji: string;
/** Value of the dice, 1-6 for “🎲” and “🎯” base emoji, 1-5 for “🏀” and “⚽” base emoji, 1-64 for “🎰” base emoji */
/** Value of the dice, 1-6 for “🎲”, “🎯” and “🎳” base emoji, 1-5 for “🏀” and “⚽” base emoji, 1-64 for “🎰” base emoji */
value: number;

@@ -621,2 +641,23 @@ }

/** This object represents a service message about a change in auto-delete timer settings. */
export interface MessageAutoDeleteTimerChanged {
/** New auto-delete time for messages in the chat */
message_auto_delete_time: number;
}
/** This object represents a service message about a voice chat started in the chat. Currently holds no information. */
export interface VoiceChatStarted {}
/** This object represents a service message about a voice chat ended in the chat. */
export interface VoiceChatEnded {
/** Voice chat duration; in seconds */
duration: number;
}
/** This object represents a service message about new members invited to a voice chat. */
export interface VoiceChatParticipantsInvited {
/** New members that were invited to the voice chat */
users: User[];
}
/** This object represents a sticker. */

@@ -623,0 +664,0 @@ export interface Sticker {

{
"name": "typegram",
"version": "3.1.10",
"version": "3.2.0",
"description": "Type declarations for the Telegram API",

@@ -5,0 +5,0 @@ "main": "index.js",

# Types for the Telegram Bot API
This project provides TypeScript types for the entire [Telegram Bot API](https://core.telegram.org/bots/api) in version 5.0 which was released on November 4, 2020.
This project provides TypeScript types for the entire [Telegram Bot API](https://core.telegram.org/bots/api) in version 5.1 which was released on March 9, 2021.

@@ -5,0 +5,0 @@ It contains zero bytes of executable code.

import { CallbackQuery } from "./callback";
import { ChosenInlineResult, InlineQuery } from "./inline";
import { Chat, User } from "./manage";
import { Chat, ChatMemberUpdated, User } from "./manage";
import { Message, Poll, PollAnswer } from "./message";

@@ -36,50 +36,58 @@ import { PreCheckoutQuery, ShippingQuery } from "./payment";

export interface AbstractMessageUpdate {
export interface AbstractUpdate {
/** The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This ID becomes especially handy if you're using Webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially. */
update_id: number;
}
export interface MessageUpdate extends AbstractMessageUpdate {
export interface MessageUpdate extends AbstractUpdate {
/** New incoming message of any kind — text, photo, sticker, etc. */
message: New & NonChannel & Message;
}
export interface EditedMessageUpdate extends AbstractMessageUpdate {
export interface EditedMessageUpdate extends AbstractUpdate {
/** New version of a message that is known to the bot and was edited */
edited_message: Edited & NonChannel & Message;
}
export interface ChannelPostUpdate extends AbstractMessageUpdate {
export interface ChannelPostUpdate extends AbstractUpdate {
/** New incoming channel post of any kind — text, photo, sticker, etc. */
channel_post: New & Channel & Message;
}
export interface EditedChannelPostUpdate extends AbstractMessageUpdate {
export interface EditedChannelPostUpdate extends AbstractUpdate {
/** New version of a channel post that is known to the bot and was edited */
edited_channel_post: Edited & Channel & Message;
}
export interface InlineQueryUpdate extends AbstractMessageUpdate {
export interface InlineQueryUpdate extends AbstractUpdate {
/** New incoming inline query */
inline_query: InlineQuery;
}
export interface ChosenInlineResultUpdate extends AbstractMessageUpdate {
export interface ChosenInlineResultUpdate extends AbstractUpdate {
/** The result of an inline query that was chosen by a user and sent to their chat partner. Please see our documentation on the feedback collecting for details on how to enable these updates for your bot. */
chosen_inline_result: ChosenInlineResult;
}
export interface CallbackQueryUpdate extends AbstractMessageUpdate {
export interface CallbackQueryUpdate extends AbstractUpdate {
/** New incoming callback query */
callback_query: CallbackQuery;
}
export interface ShippingQueryUpdate extends AbstractMessageUpdate {
export interface ShippingQueryUpdate extends AbstractUpdate {
/** New incoming shipping query. Only for invoices with flexible price */
shipping_query: ShippingQuery;
}
export interface PreCheckoutQueryUpdate extends AbstractMessageUpdate {
export interface PreCheckoutQueryUpdate extends AbstractUpdate {
/** New incoming pre-checkout query. Contains full information about checkout */
pre_checkout_query: PreCheckoutQuery;
}
export interface PollUpdate extends AbstractMessageUpdate {
export interface PollUpdate extends AbstractUpdate {
/** New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot */
poll: Poll;
}
export interface PollAnswerUpdate extends AbstractMessageUpdate {
export interface PollAnswerUpdate extends AbstractUpdate {
/** A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself. */
poll_answer: PollAnswer;
}
export interface MyChatMemberUpdate extends AbstractUpdate {
/** The bot's chat member status was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user. */
my_chat_member: ChatMemberUpdated;
}
export interface ChatMemberUpdate extends AbstractUpdate {
/** A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify “chat_member” in the list of allowed_updates to receive these updates. */
chat_member: ChatMemberUpdated;
}
}

@@ -92,2 +100,3 @@

| Update.ChannelPostUpdate
| Update.ChatMemberUpdate
| Update.ChosenInlineResultUpdate

@@ -98,2 +107,3 @@ | Update.EditedChannelPostUpdate

| Update.MessageUpdate
| Update.MyChatMemberUpdate
| Update.PreCheckoutQueryUpdate

@@ -100,0 +110,0 @@ | Update.PollAnswerUpdate

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc