telegram-webapps-types-new
Advanced tools
Comparing version 1.2.1 to 1.2.2
@@ -16,2 +16,3 @@ export declare namespace TelegramWebApps { | ||
mainButtonClicked: () => void; | ||
secondaryButtonClicked: () => void; | ||
backButtonClicked: () => void; | ||
@@ -22,2 +23,3 @@ settingsButtonClicked: () => void; | ||
qrTextReceived: (event: { data: string }) => void; | ||
scanQrPopupClosed: () => void; | ||
clipboardTextReceived: (event: { data: string | null }) => void; | ||
@@ -30,2 +32,4 @@ writeAccessRequested: (event: { status: 'allowed' | 'cancelled' }) => void; | ||
type PositionTypes = "left" | "right" | "top" | "bottom"; | ||
interface WebApp { | ||
@@ -123,2 +127,7 @@ /** | ||
/** | ||
* Bot API 7.10+ | ||
* A method that sets the app's bottom bar color in the #RRGGBB format. You can also use the keywords bg_color, secondary_bg_color and bottom_bar_bg_color. | ||
*/ | ||
setBottomBarColor(color: string): void; | ||
/** | ||
* Bot API 6.2+ | ||
@@ -187,2 +196,8 @@ * A method that enables a confirmation dialog while the user is trying to close the Web App. | ||
/** | ||
* Bot API 7.8+ | ||
* A method that opens the native story editor with the media specified in the media_url parameter as an HTTPS URL. | ||
* An optional params argument of the type StoryShareParams describes additional sharing settings. | ||
*/ | ||
shareToStory(media_url: string, params?: StoryShareParams): void; | ||
/** | ||
* Bot API 6.2+ | ||
@@ -324,2 +339,7 @@ * A method that shows a native popup described by the params argument of the type PopupParams. | ||
/** | ||
* Bot API 7.10+ Bottom background color in the #RRGGBB format. | ||
* Also available as the CSS variable var(--tg-theme-bottom-bar-bg-color). | ||
*/ | ||
bottom_bar_bg_color?: string; | ||
/** | ||
* Bot API 7.0+ | ||
@@ -344,2 +364,7 @@ * Accent text color in the #RRGGBB format. | ||
/** | ||
* Bot API 7.6+ Section separator color in the #RRGGBB format. | ||
* Also available as the CSS variable var(--tg-theme-section-separator-color). | ||
*/ | ||
section_separator_color?: string; | ||
/** | ||
* Bot API 7.0+ | ||
@@ -358,2 +383,33 @@ * Subtitle text color in the #RRGGBB format. | ||
interface StoryShareParams { | ||
/** | ||
* The caption to be added to the media, 0-200 characters for regular users and 0-2048 characters for premium subscribers. | ||
*/ | ||
text?: string; | ||
/** | ||
* An object that describes a widget link to be included in the story. | ||
* | ||
* Note that only premium subscribers can post stories with links. | ||
*/ | ||
widget_link?: StoryWidgetLink; | ||
} | ||
interface StoryWidgetLink { | ||
/** | ||
* The URL to be included in the story. | ||
*/ | ||
url: string; | ||
/** | ||
* The name to be displayed for the widget link, 0-48 characters. | ||
*/ | ||
name?: string; | ||
} | ||
interface ScanQrPopupParams { | ||
/** | ||
* Optional. The text to be displayed under the 'Scan QR' heading, 0-64 characters. | ||
*/ | ||
text?: String; | ||
} | ||
interface PopupParams { | ||
@@ -375,9 +431,2 @@ /** | ||
interface ScanQrPopupParams { | ||
/** | ||
* Optional. The text to be displayed under the 'Scan QR' heading, 0-64 characters. | ||
*/ | ||
text?: String; | ||
} | ||
interface PopupButton { | ||
@@ -617,2 +666,16 @@ /** | ||
/** | ||
* Bot API 7.10+ Shows whether the button has a shine effect. Set to false by default. | ||
*/ | ||
hasShineEffect: boolean; | ||
/** | ||
* Bot API 7.10+ Position of the secondary button. Not defined for the main button. It applies only if both the main and secondary buttons are visible. Set to left by default. | ||
* | ||
* Supported values: | ||
* - left, displayed to the left of the main button, | ||
* - right, displayed to the right of the main button, | ||
* - top, displayed above the main button, | ||
* - bottom, displayed below the main button. | ||
*/ | ||
position: PositionTypes; | ||
/** | ||
* Readonly. Shows whether the button is displaying a loading indicator. | ||
@@ -678,2 +741,6 @@ */ | ||
/** | ||
* Bot API 7.10+ enable shine effect. | ||
*/ | ||
has_shine_effect?: boolean; | ||
/** | ||
* Enable the button. | ||
@@ -680,0 +747,0 @@ */ |
{ | ||
"name": "telegram-webapps-types-new", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "TypeScript typings for Telegram Web Apps for Bots. See https://core.telegram.org/bots/webapps", | ||
@@ -5,0 +5,0 @@ "scripts": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
41037
863